brintos

brintos / linux-shallow public Read only

0
0
Text · 2.9 KiB · 9fe9499 Raw
112 lines · c
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */2/*3 * hdlcdrv.h  -- HDLC packet radio network driver.4 * The Linux soundcard driver for 1200 baud and 9600 baud packet radio5 * (C) 1996-1998 by Thomas Sailer, HB9JNX/AE4WA6 */7 8#ifndef _UAPI_HDLCDRV_H9#define _UAPI_HDLCDRV_H10 11/* -------------------------------------------------------------------- */12/*13 * structs for the IOCTL commands14 */15 16struct hdlcdrv_params {17	int iobase;18	int irq;19	int dma;20	int dma2;21	int seriobase;22	int pariobase;23	int midiiobase;24};	25 26struct hdlcdrv_channel_params {27	int tx_delay;  /* the transmitter keyup delay in 10ms units */28	int tx_tail;   /* the transmitter keyoff delay in 10ms units */29	int slottime;  /* the slottime in 10ms; usually 10 = 100ms */30	int ppersist;  /* the p-persistence 0..255 */31	int fulldup;   /* some driver do not support full duplex, setting */32	               /* this just makes them send even if DCD is on */33};	34 35struct hdlcdrv_old_channel_state {36  	int ptt;37  	int dcd;38  	int ptt_keyed;39};40 41struct hdlcdrv_channel_state {42 	int ptt;43 	int dcd;44 	int ptt_keyed;45 	unsigned long tx_packets;46 	unsigned long tx_errors;47 	unsigned long rx_packets;48 	unsigned long rx_errors;49};50 51struct hdlcdrv_ioctl {52	int cmd;53	union {54		struct hdlcdrv_params mp;55		struct hdlcdrv_channel_params cp;56		struct hdlcdrv_channel_state cs;57		struct hdlcdrv_old_channel_state ocs;58		unsigned int calibrate;59		unsigned char bits;60		char modename[128];61		char drivername[32];62	} data;63};64 65/* -------------------------------------------------------------------- */66 67/*68 * ioctl values69 */70#define HDLCDRVCTL_GETMODEMPAR       071#define HDLCDRVCTL_SETMODEMPAR       172#define HDLCDRVCTL_MODEMPARMASK      2  /* not handled by hdlcdrv */73#define HDLCDRVCTL_GETCHANNELPAR    1074#define HDLCDRVCTL_SETCHANNELPAR    1175#define HDLCDRVCTL_OLDGETSTAT       2076#define HDLCDRVCTL_CALIBRATE        2177#define HDLCDRVCTL_GETSTAT          2278 79/*80 * these are mainly for debugging purposes81 */82#define HDLCDRVCTL_GETSAMPLES       3083#define HDLCDRVCTL_GETBITS          3184 85/*86 * not handled by hdlcdrv, but by its depending drivers87 */88#define HDLCDRVCTL_GETMODE          4089#define HDLCDRVCTL_SETMODE          4190#define HDLCDRVCTL_MODELIST         4291#define HDLCDRVCTL_DRIVERNAME       4392 93/*94 * mask of needed modem parameters, returned by HDLCDRVCTL_MODEMPARMASK95 */96#define HDLCDRV_PARMASK_IOBASE      (1<<0)97#define HDLCDRV_PARMASK_IRQ         (1<<1)98#define HDLCDRV_PARMASK_DMA         (1<<2)99#define HDLCDRV_PARMASK_DMA2        (1<<3)100#define HDLCDRV_PARMASK_SERIOBASE   (1<<4)101#define HDLCDRV_PARMASK_PARIOBASE   (1<<5)102#define HDLCDRV_PARMASK_MIDIIOBASE  (1<<6)103 104/* -------------------------------------------------------------------- */105 106 107/* -------------------------------------------------------------------- */108 109#endif /* _UAPI_HDLCDRV_H */110 111/* -------------------------------------------------------------------- */112