KM3NeT CLB
2.0
KM3NeT CLB v2 Embedded Software
|
White Rabbit Simple UART Driver. More...
#include "stdbool.h"
#include "lm32soc/dev_soc.h"
#include "errorcode.h"
#include <coll/bytefifo.h>
#include "cfg_soc.h"
#include "cfg_board.h"
#include "lm32soc/lm32.h"
Go to the source code of this file.
Data Structures | |
struct | SUART_Descriptor |
Macros | |
#define | E_SUART_TIMEOUT E_SUART + 1 |
Receive / Transmission timeout. | |
#define | E_SUART_TIMEOUT_DESCR "Transmission Timeout" |
#define | SUART_BAUDRATE_9600 9600 |
Common baudrate 9600. | |
#define | SUART_BAUDRATE_19200 19200 |
Common baudrate 19200. | |
#define | SUART_BAUDRATE_38400 38400 |
Common baudrate 38400. | |
#define | SUART_BAUDRATE_57600 57600 |
Common baudrate 57600. | |
#define | SUART_BAUDRATE_115200 115200 |
Common baudrate 115200. | |
#define | SUART_BAUDRATE_192000 192000 |
Common baudrate 192000. | |
#define | SUART_BAUDRATE_230400 230400 |
Common baudrate 230400. | |
#define | SUART_BAUDRATE_DEFAULT SUART_BAUDRATE_115200 |
Default Baudrate. | |
#define | SUART_FIFORX_CAP (uint8_t) 128 |
#define | _UART_DESCR_PTR(IDX) PD_SUART ## IDX |
#define | UART_DESCR_PTR(IDX) _UART_DESCR_PTR(IDX) |
#define | _UART_CFG(IDX, UART, IRQ) |
#define | UART_CFG(IDX, UART, IRQ) _UART_CFG( IDX, UART, IRQ ) |
Functions | |
void | irq4Handler () |
void | suartInit (SUART_Descriptor *desc, unsigned int baudrate) |
Initializes the simple UART. More... | |
static bool | suartTxReady (SUART_Descriptor *desc) |
Returns whether or not the TX buffer is empty. | |
bool | suartTx (SUART_Descriptor *desc, char c) |
Transmits a character. More... | |
static bool | suartRxReady (SUART_Descriptor *desc) |
Returns whether or not the RX buffer has data. More... | |
bool | suartRx (SUART_Descriptor *desc, char *c) |
Receives a character. More... | |
void | suartPutChar (int c) |
Putchar function for IO redirection. | |
int | suartGetChar () |
Gutchar function for IO redirection. | |
Variables | |
SUART_Descriptor * | PD_SUART1 |
White Rabbit Simple UART Driver.
Definition in file suart.h.
#define _UART_CFG | ( | IDX, | |
UART, | |||
IRQ | |||
) |
void suartInit | ( | SUART_Descriptor * | desc, |
unsigned int | baudrate | ||
) |
bool suartRx | ( | SUART_Descriptor * | desc, |
char * | c | ||
) |
|
inlinestatic |
bool suartTx | ( | SUART_Descriptor * | desc, |
char | c | ||
) |