1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #define SIOCYAMRESERVED (0)
18 #define SIOCYAMSCFG (1)
19 #define SIOCYAMGCFG (2)
20 #define SIOCYAMSMCS (3)
21
22 #define YAM_IOBASE (1 << 0)
23 #define YAM_IRQ (1 << 1)
24 #define YAM_BITRATE (1 << 2)
25 #define YAM_MODE (1 << 3)
26 #define YAM_HOLDDLY (1 << 4)
27 #define YAM_TXDELAY (1 << 5)
28 #define YAM_TXTAIL (1 << 6)
29 #define YAM_PERSIST (1 << 7)
30 #define YAM_SLOTTIME (1 << 8)
31 #define YAM_BAUDRATE (1 << 9)
32
33 #define YAM_MAXBITRATE 57600
34 #define YAM_MAXBAUDRATE 115200
35 #define YAM_MAXMODE 2
36 #define YAM_MAXHOLDDLY 99
37 #define YAM_MAXTXDELAY 999
38 #define YAM_MAXTXTAIL 999
39 #define YAM_MAXPERSIST 255
40 #define YAM_MAXSLOTTIME 999
41
42 #define YAM_FPGA_SIZE 5302
43
44 struct yamcfg {
45 unsigned int mask;
46 unsigned int iobase;
47 unsigned int irq;
48 unsigned int bitrate;
49 unsigned int baudrate;
50 unsigned int txdelay;
51 unsigned int txtail;
52 unsigned int persist;
53 unsigned int slottime;
54 unsigned int mode;
55 unsigned int holddly;
56 };
57
58 struct yamdrv_ioctl_cfg {
59 int cmd;
60 struct yamcfg cfg;
61 };
62
63 struct yamdrv_ioctl_mcs {
64 int cmd;
65 unsigned int bitrate;
66 unsigned char bits[YAM_FPGA_SIZE];
67 };