blob: 94d4eab5d3ca30e494e6cf90feab98607725d48b [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* Definitions for DigiBoard ditty(1) command. */
2
3#if !defined(TIOCMODG)
Alan Coxf2cf8e22005-09-06 15:16:44 -07004#define TIOCMODG (('d'<<8) | 250) /* get modem ctrl state */
5#define TIOCMODS (('d'<<8) | 251) /* set modem ctrl state */
Linus Torvalds1da177e2005-04-16 15:20:36 -07006#endif
7
8#if !defined(TIOCMSET)
Alan Coxf2cf8e22005-09-06 15:16:44 -07009#define TIOCMSET (('d'<<8) | 252) /* set modem ctrl state */
10#define TIOCMGET (('d'<<8) | 253) /* set modem ctrl state */
Linus Torvalds1da177e2005-04-16 15:20:36 -070011#endif
12
13#if !defined(TIOCMBIC)
Alan Coxf2cf8e22005-09-06 15:16:44 -070014#define TIOCMBIC (('d'<<8) | 254) /* set modem ctrl state */
15#define TIOCMBIS (('d'<<8) | 255) /* set modem ctrl state */
Linus Torvalds1da177e2005-04-16 15:20:36 -070016#endif
17
18#if !defined(TIOCSDTR)
Alan Coxf2cf8e22005-09-06 15:16:44 -070019#define TIOCSDTR (('e'<<8) | 0) /* set DTR */
20#define TIOCCDTR (('e'<<8) | 1) /* clear DTR */
Linus Torvalds1da177e2005-04-16 15:20:36 -070021#endif
22
23/************************************************************************
24 * Ioctl command arguments for DIGI parameters.
25 ************************************************************************/
Alan Coxf2cf8e22005-09-06 15:16:44 -070026#define DIGI_GETA (('e'<<8) | 94) /* Read params */
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
Alan Coxf2cf8e22005-09-06 15:16:44 -070028#define DIGI_SETA (('e'<<8) | 95) /* Set params */
29#define DIGI_SETAW (('e'<<8) | 96) /* Drain & set params */
30#define DIGI_SETAF (('e'<<8) | 97) /* Drain, flush & set params */
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
Alan Coxf2cf8e22005-09-06 15:16:44 -070032#define DIGI_GETFLOW (('e'<<8) | 99) /* Get startc/stopc flow */
Linus Torvalds1da177e2005-04-16 15:20:36 -070033 /* control characters */
Alan Coxf2cf8e22005-09-06 15:16:44 -070034#define DIGI_SETFLOW (('e'<<8) | 100) /* Set startc/stopc flow */
Linus Torvalds1da177e2005-04-16 15:20:36 -070035 /* control characters */
Alan Coxf2cf8e22005-09-06 15:16:44 -070036#define DIGI_GETAFLOW (('e'<<8) | 101) /* Get Aux. startc/stopc */
Linus Torvalds1da177e2005-04-16 15:20:36 -070037 /* flow control chars */
Alan Coxf2cf8e22005-09-06 15:16:44 -070038#define DIGI_SETAFLOW (('e'<<8) | 102) /* Set Aux. startc/stopc */
Linus Torvalds1da177e2005-04-16 15:20:36 -070039 /* flow control chars */
40
Alan Coxf2cf8e22005-09-06 15:16:44 -070041#define DIGI_GETINFO (('e'<<8) | 103) /* Fill in digi_info */
42#define DIGI_POLLER (('e'<<8) | 104) /* Turn on/off poller */
43#define DIGI_INIT (('e'<<8) | 105) /* Allow things to run. */
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
45struct digiflow_struct
46{
47 unsigned char startc; /* flow cntl start char */
48 unsigned char stopc; /* flow cntl stop char */
49};
50
51typedef struct digiflow_struct digiflow_t;
52
53
54/************************************************************************
55 * Values for digi_flags
56 ************************************************************************/
57#define DIGI_IXON 0x0001 /* Handle IXON in the FEP */
58#define DIGI_FAST 0x0002 /* Fast baud rates */
59#define RTSPACE 0x0004 /* RTS input flow control */
60#define CTSPACE 0x0008 /* CTS output flow control */
61#define DSRPACE 0x0010 /* DSR output flow control */
62#define DCDPACE 0x0020 /* DCD output flow control */
63#define DTRPACE 0x0040 /* DTR input flow control */
64#define DIGI_FORCEDCD 0x0100 /* Force carrier */
65#define DIGI_ALTPIN 0x0200 /* Alternate RJ-45 pin config */
66#define DIGI_AIXON 0x0400 /* Aux flow control in fep */
67
68
69/************************************************************************
70 * Values for digiDload
71 ************************************************************************/
72#define NORMAL 0
73#define PCI_CTL 1
74
75#define SIZE8 0
76#define SIZE16 1
77#define SIZE32 2
78
79/************************************************************************
80 * Structure used with ioctl commands for DIGI parameters.
81 ************************************************************************/
82struct digi_struct
83{
84 unsigned short digi_flags; /* Flags (see above) */
85};
86
87typedef struct digi_struct digi_t;
88
89struct digi_info
90{
91 unsigned long board; /* Which board is this ? */
92 unsigned char status; /* Alive or dead */
93 unsigned char type; /* see epca.h */
94 unsigned char subtype; /* For future XEM, XR, etc ... */
95 unsigned short numports; /* Number of ports configured */
96 unsigned char *port; /* I/O Address */
97 unsigned char *membase; /* DPR Address */
98 unsigned char *version; /* For future ... */
99 unsigned short windowData; /* For future ... */
100} ;