15 #define A_CHAN_IN 0x00
16 #define A_CHAN_OUT 0x01
17 #define B_CHAN_IN 0x00
18 #define B_CHAN_OUT 0x02
19 #define C_CHAN_IN 0x00
20 #define C_CHAN_OUT 0x04
21 #define VMODTTL_O 0x08
23 #define A_CHAN_OPEN_COLLECTOR 0x01
24 #define B_CHAN_OPEN_COLLECTOR 0x02
25 #define C_CHAN_OPEN_COLLECTOR 0x04
29 #define DEFAULT_DELAY 1 /* Used to wait for a while to allow the Z8536 to perform the read/write operations */
36 struct vmodttl_pattern
{
37 unsigned char port
; /* Port A (0) or B (1) */
38 unsigned char pos
; /* Position of the bit [0 - 7] */
39 unsigned char ptr
; /* Pattern Transition register */
40 unsigned char pmr
; /* Pattern mask register */
41 unsigned char ppr
; /* Pattern Polarity Register */
44 struct vmodttlconfig
{
49 int pattern_mode_a
; /* 1: AND 0: OR */
50 int pattern_mode_b
; /* 1: AND 0: OR */
51 struct vmodttl_pattern bit_pattern_a
[NR_BITS
];
52 struct vmodttl_pattern bit_pattern_b
[NR_BITS
];
58 #define VMODTTL_READ_CHAN _IOR('v', 0, struct vmodttlarg)
59 #define VMODTTL_WRITE_CHAN _IOW('v', 1, struct vmodttlarg)
60 #define VMODTTL_CONFIG _IOW('v', 2, struct vmodttlconfig)
61 #define VMODTTL_PATTERN _IOW('v', 3, struct vmodttl_pattern)
62 #define VMODTTL_SIMPIO _IOW('v', 4, int)
63 #define VMODTTL_READ_CONFIG _IOR('v', 5, struct vmodttlconfig)
67 #define VMODTTL_MAX_BOARDS 64 /* max. # of boards supported */
69 #define VMODTTL_PORTC 0
70 #define VMODTTL_PORTB 2
71 #define VMODTTL_PORTA 4
72 #define VMODTTL_CONTROL 6
75 int lun
; /** logical unit number */
76 char *cname
; /** carrier name */
77 int carrier
; /** supporting carrier */
78 int slot
; /** slot we're plugged in */
79 unsigned long address
; /** address space */
80 int is_big_endian
; /** endianness */
87 #endif /* __VMODTTL_H__ */