26 #define UART0_BAUD 9600 28 #define UART0_RXBUF_SIZE 64 30 #define UART0_TXBUF_SIZE 64 33 #define UART0_RXBUF_MASK ( UART0_RXBUF_SIZE - 1 ) 35 #define UART0_TXBUF_MASK ( UART0_TXBUF_SIZE - 1 ) 38 #if ( UART0_RXBUF_SIZE & UART0_RXBUF_MASK ) 39 #error RX0 buffer size is not a power of 2 42 #if ( UART0_TXBUF_SIZE & UART0_TXBUF_MASK ) 43 #error TX0 buffer size is not a power of 2 55 volatile uint8_t rx_flag, tx_flag, rxIdx, txIdx;
61 struct uartStruct *uart_init(
const uint8_t port);
void uart_putchar(const uint8_t port, const char c)
Definition: uart.c:170
void uart_get_msg(const uint8_t port, char *s)
Definition: uart.c:156
void uart_shutdown(const uint8_t port)
shutdown the usart port.
Definition: uart.c:133
volatile struct uartStruct * uartPtr
Definition: uart.h:59
void uart_printstr(const uint8_t port, const char *s)
Definition: uart.c:186