OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [HCS12_GCC_banked/] [sys/] [sio.h] - Blame information for rev 773

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.