simpletext library
v0.8
Compact variations of put/get write/read and print/scan for smaller program sizes
Main Page
Data Structures
Files
File List
Globals
serial.h
Go to the documentation of this file.
1
9
#ifndef __SERIAL_H
10
#define __SERIAL_H
11
12
#include "
simpletext.h
"
13
14
typedef
struct
serial_info
15
{
16
int
rx_pin;
17
int
tx_pin;
18
int
mode;
19
int
baud;
20
int
ticks;
21
}
Serial_t
;
22
23
/*
24
* This defines serial as a type alias to text_t
25
* Spelling is choice of Parallax education, not the author.
26
*/
27
typedef
text_t
serial
;
28
39
serial
*
serial_open
(
int
rxpin,
int
txpin,
int
mode,
int
baudrate);
40
45
void
serial_close
(
serial
*device);
51
int
serial_rxChar
(
serial
*device);
58
int
serial_txChar
(
serial
*device,
int
txbyte);
59
60
#endif
61
62
/*
63
+--------------------------------------------------------------------
64
| TERMS OF USE: MIT License
65
+--------------------------------------------------------------------
66
Permission is hereby granted, free of charge, to any person obtaining
67
a copy of this software and associated documentation files
68
(the "Software"), to deal in the Software without restriction,
69
including without limitation the rights to use, copy, modify, merge,
70
publish, distribute, sublicense, and/or sell copies of the Software,
71
and to permit persons to whom the Software is furnished to do so,
72
subject to the following conditions:
73
74
The above copyright notice and this permission notice shall be
75
included in all copies or substantial portions of the Software.
76
77
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
78
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
79
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
80
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
81
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
82
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
83
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
84
+--------------------------------------------------------------------
85
*/
Generated on Sat Jun 15 2013 15:20:22 for simpletext library by
1.8.1.2