fdserial library
v0.86
Functions for connecting with full duplex serial devices
Main Page
Data Structures
Files
File List
Globals
fdserial.h
Go to the documentation of this file.
1
32
#ifndef __FDSerial_H
33
#define __FDSerial_H
34
35
#include "simpletext.h"
36
37
#ifdef __cplusplus
38
extern
"C"
39
{
40
#endif
41
49
typedef
text_t
fdserial
;
50
54
#define FDSERIAL_BUFF_MASK 0x3f
55
59
#define FDSERIAL_MODE_NONE 0
60
64
#define FDSERIAL_MODE_INVERT_RX 1
65
69
#define FDSERIAL_MODE_INVERT_TX 2
70
75
#define FDSERIAL_MODE_OPENDRAIN_TX 4
76
80
#define FDSERIAL_MODE_IGNORE_TX_ECHO 8
81
85
typedef
struct
fdserial_struct
86
{
int
rx_head
;
int
rx_tail
;
int
tx_head
;
int
tx_tail
;
int
rx_pin
;
int
tx_pin
;
int
mode
;
int
ticks
;
char
*
buffptr
;
96
}
fdserial_st
;
97
118
fdserial *
fdserial_open
(
int
rxpin,
int
txpin,
int
mode,
int
baudrate);
119
125
void
fdserial_close
(fdserial *term);
126
136
int
fdserial_rxCheck
(fdserial *term);
137
143
void
fdserial_rxFlush
(fdserial *term);
144
153
int
fdserial_rxReady
(fdserial *term);
154
165
int
fdserial_rxTime
(fdserial *term,
int
ms);
166
175
int
fdserial_rxChar
(fdserial *term);
176
186
int
fdserial_rxCount
(fdserial *term);
187
193
int
fdserial_rxPeek
(fdserial *term);
194
205
int
fdserial_txChar
(fdserial *term,
int
txbyte);
206
214
int
fdserial_txEmpty
(fdserial *term);
215
219
void
fdserial_txFlush
(fdserial *term);
220
221
#ifdef __cplusplus
222
}
223
#endif
224
225
#endif
226
/* __FDSerial_H */
227
228
Generated on Sun Aug 17 2014 21:00:19 for fdserial library by
1.8.1.2