sci.h

00001 /* sys/sio.h -- Utility methods to read/write the SIO
00002    Copyright 2000 Free Software Foundation, Inc.
00003    Written by Stephane Carrez (stcarrez@worldnet.fr)
00004 
00005 This file is part of GDB, GAS, and the GNU binutils.
00006 
00007 GDB, GAS, and the GNU binutils are free software; you can redistribute
00008 them and/or modify them under the terms of the GNU General Public
00009 License as published by the Free Software Foundation; either version
00010 1, or (at your option) any later version.
00011 
00012 GDB, GAS, and the GNU binutils are distributed in the hope that they
00013 will be useful, but WITHOUT ANY WARRANTY; without even the implied
00014 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
00015 the GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with this file; see the file COPYING.  If not, write to the Free
00019 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00020 
00021 #ifndef _SYS_SCI_H
00022 #define _SYS_SCI_H
00023 
00024 #include <sys/param.h>
00025 #include <sys/ports.h>
00026 
00027 #ifdef mc6811
00028 # include <asm-m68hc11/sio.h>
00029 #endif
00030 
00031 #ifdef mc6812
00032 # include <asm-m68hc12/sio.h>
00033 #endif
00034 
00035 #include <stddef.h>
00036 
00037 extern void sci_initialize (unsigned char baud,
00038                             unsigned char *buffer,
00039                             size_t len);
00040 
00041 extern void sci_putc (unsigned char c);
00042 
00043 extern void sci_write (const unsigned char *data, size_t len);
00044 
00045 extern int sci_read (unsigned char *data, size_t len, int mode);
00046 
00047 
00048 #endif /* _SYS_SIO_H */
00049