digi1.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* Definitions for DigiBoard ditty(1) command. */
  2. #if !defined(TIOCMODG)
  3. #define TIOCMODG (('d'<<8) | 250) /* get modem ctrl state */
  4. #define TIOCMODS (('d'<<8) | 251) /* set modem ctrl state */
  5. #endif
  6. #if !defined(TIOCMSET)
  7. #define TIOCMSET (('d'<<8) | 252) /* set modem ctrl state */
  8. #define TIOCMGET (('d'<<8) | 253) /* set modem ctrl state */
  9. #endif
  10. #if !defined(TIOCMBIC)
  11. #define TIOCMBIC (('d'<<8) | 254) /* set modem ctrl state */
  12. #define TIOCMBIS (('d'<<8) | 255) /* set modem ctrl state */
  13. #endif
  14. #if !defined(TIOCSDTR)
  15. #define TIOCSDTR (('e'<<8) | 0) /* set DTR */
  16. #define TIOCCDTR (('e'<<8) | 1) /* clear DTR */
  17. #endif
  18. /************************************************************************
  19. * Ioctl command arguments for DIGI parameters.
  20. ************************************************************************/
  21. #define DIGI_GETA (('e'<<8) | 94) /* Read params */
  22. #define DIGI_SETA (('e'<<8) | 95) /* Set params */
  23. #define DIGI_SETAW (('e'<<8) | 96) /* Drain & set params */
  24. #define DIGI_SETAF (('e'<<8) | 97) /* Drain, flush & set params */
  25. #define DIGI_GETFLOW (('e'<<8) | 99) /* Get startc/stopc flow */
  26. /* control characters */
  27. #define DIGI_SETFLOW (('e'<<8) | 100) /* Set startc/stopc flow */
  28. /* control characters */
  29. #define DIGI_GETAFLOW (('e'<<8) | 101) /* Get Aux. startc/stopc */
  30. /* flow control chars */
  31. #define DIGI_SETAFLOW (('e'<<8) | 102) /* Set Aux. startc/stopc */
  32. /* flow control chars */
  33. #define DIGI_GETINFO (('e'<<8) | 103) /* Fill in digi_info */
  34. #define DIGI_POLLER (('e'<<8) | 104) /* Turn on/off poller */
  35. #define DIGI_INIT (('e'<<8) | 105) /* Allow things to run. */
  36. struct digiflow_struct
  37. {
  38. unsigned char startc; /* flow cntl start char */
  39. unsigned char stopc; /* flow cntl stop char */
  40. };
  41. typedef struct digiflow_struct digiflow_t;
  42. /************************************************************************
  43. * Values for digi_flags
  44. ************************************************************************/
  45. #define DIGI_IXON 0x0001 /* Handle IXON in the FEP */
  46. #define DIGI_FAST 0x0002 /* Fast baud rates */
  47. #define RTSPACE 0x0004 /* RTS input flow control */
  48. #define CTSPACE 0x0008 /* CTS output flow control */
  49. #define DSRPACE 0x0010 /* DSR output flow control */
  50. #define DCDPACE 0x0020 /* DCD output flow control */
  51. #define DTRPACE 0x0040 /* DTR input flow control */
  52. #define DIGI_FORCEDCD 0x0100 /* Force carrier */
  53. #define DIGI_ALTPIN 0x0200 /* Alternate RJ-45 pin config */
  54. #define DIGI_AIXON 0x0400 /* Aux flow control in fep */
  55. /************************************************************************
  56. * Values for digiDload
  57. ************************************************************************/
  58. #define NORMAL 0
  59. #define PCI_CTL 1
  60. #define SIZE8 0
  61. #define SIZE16 1
  62. #define SIZE32 2
  63. /************************************************************************
  64. * Structure used with ioctl commands for DIGI parameters.
  65. ************************************************************************/
  66. struct digi_struct
  67. {
  68. unsigned short digi_flags; /* Flags (see above) */
  69. };
  70. typedef struct digi_struct digi_t;
  71. struct digi_info
  72. {
  73. unsigned long board; /* Which board is this ? */
  74. unsigned char status; /* Alive or dead */
  75. unsigned char type; /* see epca.h */
  76. unsigned char subtype; /* For future XEM, XR, etc ... */
  77. unsigned short numports; /* Number of ports configured */
  78. unsigned char *port; /* I/O Address */
  79. unsigned char *membase; /* DPR Address */
  80. unsigned char *version; /* For future ... */
  81. unsigned short windowData; /* For future ... */
  82. } ;