yam.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*****************************************************************************/
  3. /*
  4. * yam.h -- YAM radio modem driver.
  5. *
  6. * Copyright (C) 1998 Frederic Rible F1OAT ([email protected])
  7. * Adapted from baycom.c driver written by Thomas Sailer ([email protected])
  8. *
  9. * Please note that the GPL allows you to use the driver, NOT the radio.
  10. * In order to use the radio, you need a license from the communications
  11. * authority of your country.
  12. */
  13. /*****************************************************************************/
  14. #define SIOCYAMRESERVED (0)
  15. #define SIOCYAMSCFG (1) /* Set configuration */
  16. #define SIOCYAMGCFG (2) /* Get configuration */
  17. #define SIOCYAMSMCS (3) /* Set mcs data */
  18. #define YAM_IOBASE (1 << 0)
  19. #define YAM_IRQ (1 << 1)
  20. #define YAM_BITRATE (1 << 2) /* Bit rate of radio port ->57600 */
  21. #define YAM_MODE (1 << 3) /* 0=simplex 1=duplex 2=duplex+tempo */
  22. #define YAM_HOLDDLY (1 << 4) /* duplex tempo (sec) */
  23. #define YAM_TXDELAY (1 << 5) /* Tx Delay (ms) */
  24. #define YAM_TXTAIL (1 << 6) /* Tx Tail (ms) */
  25. #define YAM_PERSIST (1 << 7) /* Persist (ms) */
  26. #define YAM_SLOTTIME (1 << 8) /* Slottime (ms) */
  27. #define YAM_BAUDRATE (1 << 9) /* Baud rate of rs232 port ->115200 */
  28. #define YAM_MAXBITRATE 57600
  29. #define YAM_MAXBAUDRATE 115200
  30. #define YAM_MAXMODE 2
  31. #define YAM_MAXHOLDDLY 99
  32. #define YAM_MAXTXDELAY 999
  33. #define YAM_MAXTXTAIL 999
  34. #define YAM_MAXPERSIST 255
  35. #define YAM_MAXSLOTTIME 999
  36. #define YAM_FPGA_SIZE 5302
  37. struct yamcfg {
  38. unsigned int mask; /* Mask of commands */
  39. unsigned int iobase; /* IO Base of COM port */
  40. unsigned int irq; /* IRQ of COM port */
  41. unsigned int bitrate; /* Bit rate of radio port */
  42. unsigned int baudrate; /* Baud rate of the RS232 port */
  43. unsigned int txdelay; /* TxDelay */
  44. unsigned int txtail; /* TxTail */
  45. unsigned int persist; /* Persistence */
  46. unsigned int slottime; /* Slottime */
  47. unsigned int mode; /* mode 0 (simp), 1(Dupl), 2(Dupl+delay) */
  48. unsigned int holddly; /* PTT delay in FullDuplex 2 mode */
  49. };
  50. struct yamdrv_ioctl_cfg {
  51. int cmd;
  52. struct yamcfg cfg;
  53. };
  54. struct yamdrv_ioctl_mcs {
  55. int cmd;
  56. unsigned int bitrate;
  57. unsigned char bits[YAM_FPGA_SIZE];
  58. };