33 #define E_SUART_TIMEOUT E_SUART + 1
34 #define E_SUART_TIMEOUT_DESCR "Transmission Timeout"
37 #define SUART_BAUDRATE_9600 9600
38 #define SUART_BAUDRATE_19200 19200
39 #define SUART_BAUDRATE_38400 38400
40 #define SUART_BAUDRATE_57600 57600
41 #define SUART_BAUDRATE_115200 115200
42 #define SUART_BAUDRATE_192000 192000
43 #define SUART_BAUDRATE_230400 230400
45 #define SUART_BAUDRATE_DEFAULT SUART_BAUDRATE_115200
47 #define SUART_FIFORX_CAP (uint8_t) 128
56 #define _UART_DESCR_PTR(IDX) PD_SUART ## IDX
57 #define UART_DESCR_PTR(IDX) _UART_DESCR_PTR(IDX)
59 #define _UART_CFG( IDX, UART, IRQ ) \
60 extern SUART_Descriptor* UART_DESCR_PTR(IDX); \
61 void IRQ_HANDLER(IRQ) ;
63 #define UART_CFG( IDX, UART, IRQ ) _UART_CFG( IDX, UART, IRQ )
107 return ( !
bfEmpty(desc->rxfifo));
void suartPutChar(int c)
Putchar function for IO redirection.
static bool bfEmpty(ByteFifo *const bf)
Returns whether or not the byte-fifo is empty.
Defines the configuration of the LM32 SOC for the CLBv2.
#define SUART_STATUS_TX_BUSY
Uart tx is busy.
const volatile unsigned int STATUS
Status Register.
Low level routines for LM32, including interrupt handling.
static bool suartTxReady(SUART_Descriptor *desc)
Returns whether or not the TX buffer is empty.
Structure defines White Rabbit Simple Uart.
void suartInit(SUART_Descriptor *desc, unsigned int baudrate)
Initializes the simple UART.
int suartGetChar()
Gutchar function for IO redirection.
Implements a simple byte-orientated Fifo with a maximum size of 255 bytes.
This module is responsible for distributing error codes.
bool suartRx(SUART_Descriptor *desc, char *c)
Receives a character.
static bool suartRxReady(SUART_Descriptor *desc)
Returns whether or not the RX buffer has data.
This file assigns all device structures to memory mapped structures.
bool suartTx(SUART_Descriptor *desc, char c)
Transmits a character.
Configures the board-specific peripherals, like I2C, SPI etc...