home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE2.DMS / in.adf / INCLUDE / devices / serial.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-10  |  2.7 KB  |  140 lines

  1. #ifndef DEVICES_SERIAL_H
  2. #define DEVICES_SERIAL_H
  3. /*
  4. ** $Filename: devices/serial.h $
  5. ** $Release: 2.04 Includes, V37.4 $
  6. ** $Revision: 33.6 $
  7. ** $Date: 90/11/06 $
  8. **
  9. ** external declarations for the serial device
  10. **
  11. ** (C) Copyright 1985-1991 Commodore-Amiga, Inc.
  12. ** All Rights Reserved
  13. */
  14.  
  15. #ifndef EXEC_IO_H
  16. #include "exec/io.h"
  17. #endif 
  18.  
  19.  
  20.  
  21.  
  22.  struct IOTArray {
  23.  ULONG TermArray0;
  24.  ULONG TermArray1;
  25. };
  26.  
  27.  
  28. #define SER_DEFAULT_CTLCHAR 0x11130000 
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  struct IOExtSer {
  36.  struct IOStdReq IOSer;
  37.  
  38.  
  39.  ULONG io_CtlChar; 
  40.  ULONG io_RBufLen; 
  41.  ULONG io_ExtFlags; 
  42.  ULONG io_Baud; 
  43.  ULONG io_BrkTime; 
  44.  struct IOTArray io_TermArray; 
  45.  UBYTE io_ReadLen; 
  46.  UBYTE io_WriteLen; 
  47.  UBYTE io_StopBits; 
  48.  UBYTE io_SerFlags; 
  49.  UWORD io_Status;
  50. };
  51.  
  52.  
  53. #define SDCMD_QUERY CMD_NONSTD 
  54. #define SDCMD_BREAK (CMD_NONSTD+1) 
  55. #define SDCMD_SETPARAMS (CMD_NONSTD+2) 
  56.  
  57.  
  58. #define SERB_XDISABLED 7 
  59. #define SERF_XDISABLED (1<<7) 
  60. #define SERB_EOFMODE 6 
  61. #define SERF_EOFMODE (1<<6) 
  62. #define SERB_SHARED 5 
  63. #define SERF_SHARED (1<<5) 
  64. #define SERB_RAD_BOOGIE 4 
  65. #define SERF_RAD_BOOGIE (1<<4) 
  66. #define SERB_QUEUEDBRK 3 
  67. #define SERF_QUEUEDBRK (1<<3) 
  68. #define SERB_7WIRE 2 
  69. #define SERF_7WIRE (1<<2) 
  70. #define SERB_PARTY_ODD 1 
  71. #define SERF_PARTY_ODD (1<<1) 
  72. #define SERB_PARTY_ON 0 
  73. #define SERF_PARTY_ON (1<<0) 
  74.  
  75.  
  76. #define IO_STATB_XOFFREAD 12 
  77. #define IO_STATF_XOFFREAD (1<<12) 
  78. #define IO_STATB_XOFFWRITE 11 
  79. #define IO_STATF_XOFFWRITE (1<<11) 
  80. #define IO_STATB_READBREAK 10 
  81. #define IO_STATF_READBREAK (1<<10) 
  82. #define IO_STATB_WROTEBREAK 9 
  83. #define IO_STATF_WROTEBREAK (1<<9) 
  84. #define IO_STATB_OVERRUN 8 
  85. #define IO_STATF_OVERRUN (1<<8) 
  86.  
  87.  
  88. #define SEXTB_MSPON 1 
  89.  
  90. #define SEXTF_MSPON (1<<1) 
  91. #define SEXTB_MARK 0 
  92. #define SEXTF_MARK (1<<0) 
  93.  
  94.  
  95. #define SerErr_DevBusy 1
  96. #define SerErr_BaudMismatch 2 
  97. #define SerErr_BufErr 4 
  98. #define SerErr_InvParam 5
  99. #define SerErr_LineErr 6
  100. #define SerErr_ParityErr 9
  101. #define SerErr_TimerErr 11 
  102. #define SerErr_BufOverflow 12
  103. #define SerErr_NoDSR 13
  104. #define SerErr_DetectedBreak 15
  105.  
  106.  
  107. #ifdef DEVICES_SERIAL_H_OBSOLETE
  108. #define SerErr_InvBaud 3 
  109. #define SerErr_NotOpen 7 
  110. #define SerErr_PortReset 8 
  111. #define SerErr_InitErr 10 
  112. #define SerErr_NoCTS 14 
  113.  
  114.  
  115. #define IOSTB_XOFFREAD 4 
  116. #define IOSTF_XOFFREAD (1<<4) 
  117. #define IOSTB_XOFFWRITE 3 
  118. #define IOSTF_XOFFWRITE (1<<3) 
  119. #define IOSTB_READBREAK 2 
  120. #define IOSTF_READBREAK (1<<2) 
  121. #define IOSTB_WROTEBREAK 1 
  122. #define IOSTF_WROTEBREAK (1<<1) 
  123. #define IOSTB_OVERRUN 0 
  124. #define IOSTF_OVERRUN (1<<0) 
  125.  
  126. #define IOSERB_BUFRREAD 7 
  127. #define IOSERF_BUFRREAD (1<<7) 
  128. #define IOSERB_QUEUED 6 
  129. #define IOSERF_QUEUED (1<<6) 
  130. #define IOSERB_ABORT 5 
  131. #define IOSERF_ABORT (1<<5) 
  132. #define IOSERB_ACTIVE 4 
  133. #define IOSERF_ACTIVE (1<<4) 
  134. #endif
  135.  
  136.  
  137. #define SERIALNAME "serial.device"
  138.  
  139. #endif 
  140.