]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/HCS12_GCC_banked/sys/sio.h
Add FreeRTOS-Plus directory.
[freertos] / FreeRTOS / Demo / HCS12_GCC_banked / sys / sio.h
1 /* sys/sio.h -- Utility methods to read/write the SIO\r
2    Copyright 2000 Free Software Foundation, Inc.\r
3    Written by Stephane Carrez (stcarrez@worldnet.fr)\r
4 \r
5 This file is part of GEL.\r
6 \r
7 GEL is free software; you can redistribute it and/or modify\r
8 it under the terms of the GNU General Public License** as published by\r
9 the Free Software Foundation; either version 2, or (at your option)\r
10 any later version.\r
11 \r
12 GEL is distributed in the hope that it will be useful,\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
15 GNU General Public License for more details.\r
16 \r
17 You should have received a copy of the GNU General Public License\r
18 along with GEL; see the file COPYING.  If not, write to\r
19 the Free Software Foundation, 59 Temple Place - Suite 330,\r
20 Boston, MA 02111-1307, USA.  */\r
21 \r
22 #ifndef _SYS_SIO_H\r
23 #define _SYS_SIO_H\r
24 \r
25 #include <sys/param.h>\r
26 #include <sys/ports.h>\r
27 \r
28 #ifdef __cplusplus\r
29 extern "C" {\r
30 #endif\r
31 \r
32 extern void serial_init (void);\r
33 \r
34 /* Return != 0 if there is something to read on the serial line.  */\r
35 extern unsigned char serial_receive_pending (void);\r
36 \r
37 /* Wait until the SIO has finished to send the character.  */\r
38 extern void serial_flush (void);\r
39 \r
40 /* Return != 0 if serial port is ready to send another char.  */\r
41 extern unsigned char serial_send_ready (void);\r
42 \r
43 /* Send the character on the serial line.  */\r
44 extern void serial_send (char c);\r
45 \r
46 /* Wait for a character on the serial line and return it.  */\r
47 extern unsigned char serial_recv (void);\r
48 \r
49 /** Write the string on the serial line.\r
50 \r
51     @param msg null terminated string to write.\r
52 \r
53     @see serial_init, serial_send\r
54 */\r
55 extern void serial_print (const char *msg);\r
56 \r
57 /** Wait for a string from serial line.\r
58 \r
59     @param msg buffer that will hold the string.\r
60 \r
61     @see serial_init, serial_recv\r
62 */\r
63 extern void serial_getline (char *buf);\r
64 \r
65 #ifdef mc6811\r
66 //# include <asm-m68hc11/sio.h>\r
67 #endif\r
68 \r
69 #ifdef mc68hcs12\r
70 # include <asm-m68hcs12/sio.h>\r
71 #elif defined(mc6812)\r
72 //# include <asm-m68hc12/sio.h>\r
73 #endif\r
74 \r
75 \r
76 #ifdef __cplusplus\r
77 };\r
78 #endif\r
79 #endif /* _SYS_SIO_H */\r
80 \r