Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*****************************************************************************/
0003 
0004 /*
0005  *  yam.h  -- YAM radio modem driver.
0006  *
0007  *  Copyright (C) 1998 Frederic Rible F1OAT (frible@teaser.fr)
0008  *  Adapted from baycom.c driver written by Thomas Sailer (sailer@ife.ee.ethz.ch)
0009  *
0010  *  Please note that the GPL allows you to use the driver, NOT the radio.
0011  *  In order to use the radio, you need a license from the communications
0012  *  authority of your country.
0013  */
0014 
0015 /*****************************************************************************/
0016 
0017 #define SIOCYAMRESERVED (0)
0018 #define SIOCYAMSCFG     (1) /* Set configuration */
0019 #define SIOCYAMGCFG     (2) /* Get configuration */
0020 #define SIOCYAMSMCS     (3) /* Set mcs data */
0021 
0022 #define YAM_IOBASE   (1 << 0)
0023 #define YAM_IRQ      (1 << 1)
0024 #define YAM_BITRATE  (1 << 2) /* Bit rate of radio port ->57600 */
0025 #define YAM_MODE     (1 << 3) /* 0=simplex 1=duplex 2=duplex+tempo */
0026 #define YAM_HOLDDLY  (1 << 4) /* duplex tempo (sec) */
0027 #define YAM_TXDELAY  (1 << 5) /* Tx Delay (ms) */
0028 #define YAM_TXTAIL   (1 << 6) /* Tx Tail  (ms) */
0029 #define YAM_PERSIST  (1 << 7) /* Persist  (ms) */
0030 #define YAM_SLOTTIME (1 << 8) /* Slottime (ms) */
0031 #define YAM_BAUDRATE (1 << 9) /* Baud rate of rs232 port ->115200 */
0032 
0033 #define YAM_MAXBITRATE  57600
0034 #define YAM_MAXBAUDRATE 115200
0035 #define YAM_MAXMODE     2
0036 #define YAM_MAXHOLDDLY  99
0037 #define YAM_MAXTXDELAY  999
0038 #define YAM_MAXTXTAIL   999
0039 #define YAM_MAXPERSIST  255
0040 #define YAM_MAXSLOTTIME 999
0041 
0042 #define YAM_FPGA_SIZE   5302
0043 
0044 struct yamcfg {
0045     unsigned int mask;      /* Mask of commands */
0046     unsigned int iobase;    /* IO Base of COM port */
0047     unsigned int irq;       /* IRQ of COM port */
0048     unsigned int bitrate;   /* Bit rate of radio port */
0049     unsigned int baudrate;  /* Baud rate of the RS232 port */
0050     unsigned int txdelay;   /* TxDelay */
0051     unsigned int txtail;    /* TxTail */
0052     unsigned int persist;   /* Persistence */
0053     unsigned int slottime;  /* Slottime */
0054     unsigned int mode;      /* mode 0 (simp), 1(Dupl), 2(Dupl+delay) */
0055     unsigned int holddly;   /* PTT delay in FullDuplex 2 mode */
0056 };
0057 
0058 struct yamdrv_ioctl_cfg {
0059     int cmd;
0060     struct yamcfg cfg;
0061 };
0062 
0063 struct yamdrv_ioctl_mcs {
0064     int cmd;
0065     unsigned int bitrate;
0066     unsigned char bits[YAM_FPGA_SIZE];
0067 };