00001 /*! \file uartsw.h \brief Software Interrupt-driven UART function library. */ 00002 //***************************************************************************** 00003 // 00004 // File Name : 'uartsw.c' 00005 // Title : Software Interrupt-driven UART function library 00006 // Author : Pascal Stang - Copyright (C) 2002-2003 00007 // Created : 7/20/2002 00008 // Revised : 6/03/2003 00009 // Version : 0.1 00010 // Target MCU : Atmel AVR Series 00011 // Editor Tabs : 4 00012 // 00013 // Description : 00014 // 00015 // This code is distributed under the GNU Public License 00016 // which can be found at http://www.gnu.org/licenses/gpl.txt 00017 // 00018 //***************************************************************************** 00019 00020 #ifndef UARTSW_H 00021 #define UARTSW_H 00022 00023 #include "global.h" 00024 #include "buffer.h" 00025 00026 // constants/macros/typdefs 00027 #ifndef UARTSW_RX_BUFFER_SIZE 00028 #define UARTSW_RX_BUFFER_SIZE 0x20 00029 #endif 00030 00031 // functions 00032 00033 //! enable and initialize the software uart 00034 void uartswInit(void); 00035 //! create and initialize the uart buffers 00036 void uartswInitBuffers(void); 00037 //! turns off software UART 00038 void uartswOff(void); 00039 //! returns the receive buffer structure 00040 cBuffer* uartswGetRxBuffer(void); 00041 00042 void uartswSetBaudRate(u32 baudrate); 00043 void uartswSendByte(u08 data); 00044 u08 uartswReceiveByte(u08* rxData); 00045 00046 void uartswTxBitService(void); 00047 void uartswRxBitService(void); 00048 00049 #endif
1.3-rc2