]> git.sur5r.net Git - cc65/blobdiff - include/serial.h
Added _ted.h header file and TED definition
[cc65] / include / serial.h
index 4c649eb69eb7e80ec9409bf0393a87e56cf74aed..23934e9264b4599f5288e2864d8b7b02e2e8d91f 100644 (file)
 #define SER_BAUD_1200                  0x08
 #define SER_BAUD_1800           0x09
 #define SER_BAUD_2400                  0x0A
-#define SER_BAUD_4800                  0x0B
-#define SER_BAUD_9600                  0x0C
-#define SER_BAUD_19200                 0x0D
-#define SER_BAUD_38400                 0x0E
-#define SER_BAUD_57600                 0x0F
-#define SER_BAUD_115200                0x10
-#define SER_BAUD_230400                0x11
+#define SER_BAUD_3600           0x0B
+#define SER_BAUD_4800                  0x0C
+#define SER_BAUD_7200           0x0D
+#define SER_BAUD_9600                  0x0E
+#define SER_BAUD_19200                 0x0F
+#define SER_BAUD_38400                 0x10
+#define SER_BAUD_57600                 0x11
+#define SER_BAUD_115200                0x12
+#define SER_BAUD_230400                0x13
 
 /* Data bit settings */
 #define SER_BITS_5                     0x00
@@ -86,7 +88,9 @@
 #define SER_HS_HW               0x01    /* Hardware (RTS/CTS) handshake */
 #define SER_HS_SW               0x02    /* Software handshake */
 
-/* Bit masks to mask out things from the status returned by rs232_status */
+/* Bit masks to mask out things from the status returned by ser_status.
+ * These are 6551 specific and must be mapped by drivers for other chips.
+ */
 #define SER_STATUS_PE                  0x01    /* Parity error */
 #define SER_STATUS_FE                  0x02    /* Framing error */
 #define SER_STATUS_OE           0x04   /* Overrun error */
@@ -135,8 +139,11 @@ unsigned char __fastcall__ ser_uninstall (void);
  * Note: This call does not free allocated memory.
  */
 
-unsigned char __fastcall__ ser_params (const struct ser_params* params);
-/* Set the port parameters. This will also enable the port. */
+unsigned char __fastcall__ ser_open (const struct ser_params* params);
+/* "Open" the port by setting the port parameters and enable interrupts. */
+
+unsigned char __fastcall__ ser_close (void);
+/* "Close" the port. Clear buffers and and disable interrupts. */
 
 unsigned char __fastcall__ ser_get (char* b);
 /* Get a character from the serial port. If no characters are available, the
@@ -149,12 +156,6 @@ unsigned char __fastcall__ ser_put (char b);
  * SER_ERR_OVERFLOW if there is no space left in the transmit buffer.
  */
 
-unsigned char __fastcall__ ser_pause (void);
-/* Assert flow control and disable interrupts. */
-
-unsigned char __fastcall__ ser_unpause (void);
-/* Re-enable interrupts and release flow control */
-
 unsigned char __fastcall__ ser_status (unsigned char* status);
 /* Return the serial port status. */