/** * \file * * * \brief LPC23xx UART driver. * * \author Andrea Righi */ #ifndef SER_LPC2_H #define SER_LPC2_H #include #include /* Serial hardware numbers */ enum { SER_UART0, SER_UART1, SER_UART2, SER_UART3, SER_CNT //< Number of serial ports }; /* Software errors */ #define SERRF_RXFIFOOVERRUN BV(0) //< Rx FIFO buffer overrun #define SERRF_RXTIMEOUT BV(1) //< Receive timeout #define SERRF_TXTIMEOUT BV(2) //< Transmit timeout /* * Hardware errors. */ #define SERRF_RXSROVERRUN 0 //< Input overrun #define SERRF_FRAMEERROR 0 //< Stop bit missing #define SERRF_PARITYERROR 0 //< Parity error #define SERRF_NOISEERROR 0 //< Noise error /* Serial error/status flags */ typedef uint32_t serstatus_t; void lpc2_uartInit(int port); #endif /* SER_LPC2_H */