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
5 This file is part of GEL.
\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
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
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
25 #include <sys/param.h>
\r
26 #include <sys/ports.h>
\r
32 extern void serial_init (void);
\r
34 /* Return != 0 if there is something to read on the serial line. */
\r
35 extern unsigned char serial_receive_pending (void);
\r
37 /* Wait until the SIO has finished to send the character. */
\r
38 extern void serial_flush (void);
\r
40 /* Return != 0 if serial port is ready to send another char. */
\r
41 extern unsigned char serial_send_ready (void);
\r
43 /* Send the character on the serial line. */
\r
44 extern void serial_send (char c);
\r
46 /* Wait for a character on the serial line and return it. */
\r
47 extern unsigned char serial_recv (void);
\r
49 /** Write the string on the serial line.
\r
51 @param msg null terminated string to write.
\r
53 @see serial_init, serial_send
\r
55 extern void serial_print (const char *msg);
\r
57 /** Wait for a string from serial line.
\r
59 @param msg buffer that will hold the string.
\r
61 @see serial_init, serial_recv
\r
63 extern void serial_getline (char *buf);
\r
66 //# include <asm-m68hc11/sio.h>
\r
70 # include <asm-m68hcs12/sio.h>
\r
71 #elif defined(mc6812)
\r
72 //# include <asm-m68hc12/sio.h>
\r
79 #endif /* _SYS_SIO_H */
\r