simpletext library  v0.99.1
Compact variations of put/get write/read and print/scan for smaller program sizes
serial.h
Go to the documentation of this file.
1 
32 #ifndef __SERIAL_H
33 #define __SERIAL_H
34 
35 #include "simpletext.h"
36 
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #endif
41 
45 #define SERIAL_MIN_PIN 0
46 
50 #define SERIAL_MAX_PIN 31
51 
55 typedef struct serial_info
56 { int rx_pin; int tx_pin; int mode; int baud; int ticks;
62 } Serial_t;
63 
68 typedef text_t serial;
69 
85 serial *serial_open(int rxpin, int txpin, int mode, int baudrate);
86 
87 
93 void serial_close(serial *device);
94 
95 
103 int serial_rxChar(serial *device);
104 
105 
115 int serial_txChar(serial *device, int txbyte);
116 
117 #ifdef __cplusplus
118 }
119 #endif
120 
121 #endif
122 /* __SERIAL_H */
123 
124