simpletext library  v0.98
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 
52 typedef struct serial_info
53 {
54  int rx_pin;
55  int tx_pin;
56  int mode;
57  int baud;
58  int ticks;
59 } Serial_t;
60 
65 typedef text_t serial;
66 
82 serial *serial_open(int rxpin, int txpin, int mode, int baudrate);
83 
84 
90 void serial_close(serial *device);
91 
92 
100 int serial_rxChar(serial *device);
101 
102 
112 int serial_txChar(serial *device, int txbyte);
113 
114 #ifdef __cplusplus
115 }
116 #endif
117 
118 #endif
119 /* __SERIAL_H */
120 
121