# mios32/LPC17xx/mios32_uart.c File Reference

`#include <mios32.h>`

## Defines
#define | UART_PERIPHERAL_FRQ (MIOS32_SYS_CPU_FREQUENCY/4)
#define | MIOS32_UART0_TX_INIT { MIOS32_SYS_LPC_PINSEL(2, 0, 2); MIOS32_SYS_LPC_PINMODE(2, 0, 2); MIOS32_SYS_LPC_PINMODE_OD(2, 0, 1); }
#define | MIOS32_UART0_RX_INIT { MIOS32_SYS_LPC_PINSEL(2, 1, 2); MIOS32_SYS_LPC_PINMODE(2, 1, 0); }
#define | MIOS32_UART0 LPC_UART1
#define | MIOS32_UART0_IRQ_CHANNEL UART1_IRQn
#define | MIOS32_UART0_IRQHANDLER_FUNC void UART1_IRQHandler(void)
#define | MIOS32_UART1_TX_INIT { MIOS32_SYS_LPC_PINSEL(0, 0, 2); MIOS32_SYS_LPC_PINMODE(0, 0, 2); MIOS32_SYS_LPC_PINMODE_OD(0, 0, 1); }
#define | MIOS32_UART1_RX_INIT { MIOS32_SYS_LPC_PINSEL(0, 1, 2); MIOS32_SYS_LPC_PINMODE(0, 1, 0); }
#define | MIOS32_UART1 LPC_UART3
#define | MIOS32_UART1_IRQ_CHANNEL UART3_IRQn
#define | MIOS32_UART1_IRQHANDLER_FUNC void UART3_IRQHandler(void)
#define | MIOS32_UART2_TX_INIT { MIOS32_SYS_LPC_PINSEL(0, 2, 1); MIOS32_SYS_LPC_PINMODE(0, 2, 2); MIOS32_SYS_LPC_PINMODE_OD(0, 2, 1); }
#define | MIOS32_UART2_RX_INIT { MIOS32_SYS_LPC_PINSEL(0, 3, 1); MIOS32_SYS_LPC_PINMODE(0, 3, 0); }
#define | MIOS32_UART2 LPC_UART0
#define | MIOS32_UART2_IRQ_CHANNEL UART0_IRQn
#define | MIOS32_UART2_IRQHANDLER_FUNC void UART0_IRQHandler(void)
#define | MIOS32_UART3_TX_INIT { MIOS32_SYS_LPC_PINSEL(0, 10, 1); MIOS32_SYS_LPC_PINMODE(0, 10, 2); MIOS32_SYS_LPC_PINMODE_OD(0, 10, 1); }
#define | MIOS32_UART3_RX_INIT { MIOS32_SYS_LPC_PINSEL(0, 11, 1); MIOS32_SYS_LPC_PINMODE(0, 11, 0); }
#define | MIOS32_UART3 LPC_UART2
#define | MIOS32_UART3_IRQ_CHANNEL UART2_IRQn
#define | MIOS32_UART3_IRQHANDLER_FUNC void UART2_IRQHandler(void)
#define | LSR_RDR 0x01
#define | LSR_OE 0x02
#define | LSR_PE 0x04
#define | LSR_FE 0x08
#define | LSR_BI 0x10
#define | LSR_THRE 0x20
#define | LSR_TEMT 0x40
#define | LSR_RXFE 0x80
## Functions
s32 | MIOS32_UART_BaudrateSet (u8 uart, u32 baudrate)
u32 | MIOS32_UART_BaudrateGet (u8 uart)
s32 | MIOS32_UART_RxBufferFree (u8 uart)
s32 | MIOS32_UART_RxBufferUsed (u8 uart)
s32 | MIOS32_UART_RxBufferGet (u8 uart)
s32 | MIOS32_UART_RxBufferPeek (u8 uart)
s32 | MIOS32_UART_RxBufferPut (u8 uart, u8 b)
s32 | MIOS32_UART_TxBufferFree (u8 uart)
s32 | MIOS32_UART_TxBufferUsed (u8 uart)
s32 | MIOS32_UART_TxBufferGet (u8 uart)
s32 | MIOS32_UART_TxBufferPutMore_NonBlocking (u8 uart, u8 *buffer, u16 len)
s32 | MIOS32_UART_TxBufferPutMore (u8 uart, u8 *buffer, u16 len)
s32 | MIOS32_UART_TxBufferPut_NonBlocking (u8 uart, u8 b)
s32 | MIOS32_UART_TxBufferPut (u8 uart, u8 b)