0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _UAPI_HDLCDRV_H
0009 #define _UAPI_HDLCDRV_H
0010
0011
0012
0013
0014
0015
0016 struct hdlcdrv_params {
0017 int iobase;
0018 int irq;
0019 int dma;
0020 int dma2;
0021 int seriobase;
0022 int pariobase;
0023 int midiiobase;
0024 };
0025
0026 struct hdlcdrv_channel_params {
0027 int tx_delay;
0028 int tx_tail;
0029 int slottime;
0030 int ppersist;
0031 int fulldup;
0032
0033 };
0034
0035 struct hdlcdrv_old_channel_state {
0036 int ptt;
0037 int dcd;
0038 int ptt_keyed;
0039 };
0040
0041 struct hdlcdrv_channel_state {
0042 int ptt;
0043 int dcd;
0044 int ptt_keyed;
0045 unsigned long tx_packets;
0046 unsigned long tx_errors;
0047 unsigned long rx_packets;
0048 unsigned long rx_errors;
0049 };
0050
0051 struct hdlcdrv_ioctl {
0052 int cmd;
0053 union {
0054 struct hdlcdrv_params mp;
0055 struct hdlcdrv_channel_params cp;
0056 struct hdlcdrv_channel_state cs;
0057 struct hdlcdrv_old_channel_state ocs;
0058 unsigned int calibrate;
0059 unsigned char bits;
0060 char modename[128];
0061 char drivername[32];
0062 } data;
0063 };
0064
0065
0066
0067
0068
0069
0070 #define HDLCDRVCTL_GETMODEMPAR 0
0071 #define HDLCDRVCTL_SETMODEMPAR 1
0072 #define HDLCDRVCTL_MODEMPARMASK 2
0073 #define HDLCDRVCTL_GETCHANNELPAR 10
0074 #define HDLCDRVCTL_SETCHANNELPAR 11
0075 #define HDLCDRVCTL_OLDGETSTAT 20
0076 #define HDLCDRVCTL_CALIBRATE 21
0077 #define HDLCDRVCTL_GETSTAT 22
0078
0079
0080
0081
0082 #define HDLCDRVCTL_GETSAMPLES 30
0083 #define HDLCDRVCTL_GETBITS 31
0084
0085
0086
0087
0088 #define HDLCDRVCTL_GETMODE 40
0089 #define HDLCDRVCTL_SETMODE 41
0090 #define HDLCDRVCTL_MODELIST 42
0091 #define HDLCDRVCTL_DRIVERNAME 43
0092
0093
0094
0095
0096 #define HDLCDRV_PARMASK_IOBASE (1<<0)
0097 #define HDLCDRV_PARMASK_IRQ (1<<1)
0098 #define HDLCDRV_PARMASK_DMA (1<<2)
0099 #define HDLCDRV_PARMASK_DMA2 (1<<3)
0100 #define HDLCDRV_PARMASK_SERIOBASE (1<<4)
0101 #define HDLCDRV_PARMASK_PARIOBASE (1<<5)
0102 #define HDLCDRV_PARMASK_MIDIIOBASE (1<<6)
0103
0104
0105
0106
0107
0108
0109 #endif
0110
0111