Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


hdlcdrv.h
001: /*
002:  * hdlcdrv.h  -- HDLC packet radio network driver.
003:  * The Linux soundcard driver for 1200 baud and 9600 baud packet radio
004:  * (C) 1996-1998 by Thomas Sailer, HB9JNX/AE4WA
005:  */
006: 
007: #ifndef _HDLCDRV_H
008: #define _HDLCDRV_H
009: 
010: /* -------------------------------------------------------------------- */
011: /*
012:  * structs for the IOCTL commands
013:  */
014: 
015: struct hdlcdrv_params {
016:         int iobase;
017:         int irq;
018:         int dma;
019:         int dma2;
020:         int seriobase;
021:         int pariobase;
022:         int midiiobase;
023: };      
024: 
025: struct hdlcdrv_channel_params {
026:         int tx_delay;  /* the transmitter keyup delay in 10ms units */
027:         int tx_tail;   /* the transmitter keyoff delay in 10ms units */
028:         int slottime;  /* the slottime in 10ms; usually 10 = 100ms */
029:         int ppersist;  /* the p-persistence 0..255 */
030:         int fulldup;   /* some driver do not support full duplex, setting */
031:                        /* this just makes them send even if DCD is on */
032: };      
033: 
034: struct hdlcdrv_old_channel_state {
035:         int ptt;
036:         int dcd;
037:         int ptt_keyed;
038: };
039: 
040: struct hdlcdrv_channel_state {
041:         int ptt;
042:         int dcd;
043:         int ptt_keyed;
044:         unsigned long tx_packets;
045:         unsigned long tx_errors;
046:         unsigned long rx_packets;
047:         unsigned long rx_errors;
048: };
049: 
050: struct hdlcdrv_ioctl {
051:         int cmd;
052:         union {
053:                 struct hdlcdrv_params mp;
054:                 struct hdlcdrv_channel_params cp;
055:                 struct hdlcdrv_channel_state cs;
056:                 struct hdlcdrv_old_channel_state ocs;
057:                 unsigned int calibrate;
058:                 unsigned char bits;
059:                 char modename[128];
060:                 char drivername[32];
061:         } data;
062: };
063: 
064: /* -------------------------------------------------------------------- */
065: 
066: /*
067:  * ioctl values
068:  */
069: #define HDLCDRVCTL_GETMODEMPAR       0
070: #define HDLCDRVCTL_SETMODEMPAR       1
071: #define HDLCDRVCTL_MODEMPARMASK      2  /* not handled by hdlcdrv */
072: #define HDLCDRVCTL_GETCHANNELPAR    10
073: #define HDLCDRVCTL_SETCHANNELPAR    11
074: #define HDLCDRVCTL_OLDGETSTAT       20
075: #define HDLCDRVCTL_CALIBRATE        21
076: #define HDLCDRVCTL_GETSTAT          22
077: 
078: /*
079:  * these are mainly for debugging purposes
080:  */
081: #define HDLCDRVCTL_GETSAMPLES       30
082: #define HDLCDRVCTL_GETBITS          31
083: 
084: /*
085:  * not handled by hdlcdrv, but by its depending drivers
086:  */
087: #define HDLCDRVCTL_GETMODE          40
088: #define HDLCDRVCTL_SETMODE          41
089: #define HDLCDRVCTL_MODELIST         42
090: #define HDLCDRVCTL_DRIVERNAME       43
091: 
092: /*
093:  * mask of needed modem parameters, returned by HDLCDRVCTL_MODEMPARMASK
094:  */
095: #define HDLCDRV_PARMASK_IOBASE      (1<<0)
096: #define HDLCDRV_PARMASK_IRQ         (1<<1)
097: #define HDLCDRV_PARMASK_DMA         (1<<2)
098: #define HDLCDRV_PARMASK_DMA2        (1<<3)
099: #define HDLCDRV_PARMASK_SERIOBASE   (1<<4)
100: #define HDLCDRV_PARMASK_PARIOBASE   (1<<5)
101: #define HDLCDRV_PARMASK_MIDIIOBASE  (1<<6)
102: 
103: /* -------------------------------------------------------------------- */
104: 
105: 
106: /* -------------------------------------------------------------------- */
107: 
108: #endif /* _HDLCDRV_H */
109: 
110: /* -------------------------------------------------------------------- */
111: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/