uart.h

Go to the documentation of this file.
00001 /*
00002  * uart.h
00003  *
00004  *  Created on: 10/07/2009
00005  *      Author: Felipe Lavratti
00006  */
00007 
00008 #ifndef UART_H_
00009 #define UART_H_
00010 
00011 #include "../lpc_config.h"
00012 
00013 #define uart_puts(__i__)        UARTTransmitString(__i__, UART_CH_0)
00014 #define uart_putc(__i__)        UARTTransmitByte(__i__, UART_CH_0)
00015 
00016 
00017 #define UART_CH_0       0x0
00018 #define UART_CH_1       0x1
00019 #define UART_CH_2       0x2
00020 #define UART_CH_3       0x4
00021 
00022 #define UART_CLK CPU_CLOCK_HZ/4
00023 
00024 void    UARTInit(unsigned int baud, char location, char channel);
00025 char    UARTIsDataReady(char channel);
00026 char    UARTReceiveByte(char channel);
00027 char    UARTWaitForByte(char channel);
00028 void    UARTTransmitByte(char ch, char channel);
00029 void    UARTTransmitString(char *str, char channel);
00030 //void  UARTTakeString(char *str, char channel);
00031 
00032 #endif /* UART_H_ */