65 #define UART_FIFO_LEN 128 113 int kbhit (
int uart_no );
MEMSPACE int uart_getc(int uart_no)
Read a byte from a uart with NL to CR/NL conversion Note: This function waits/blocks util the read ca...
void rx_fifo_flush(int uart_no)
Flush receive fifo for a uart.
int kbhit(int uart_no)
Has ANY character been read in stdin.
LOCAL MEMSPACE int uart_putb(uint8 uart_no, uint8 data)
Polled Blocking I/O functions that poll.
MEMSPACE int uart0_getc(void)
Read a byte from uart0 with NL to CR/NL conversion Note: This function waits/blocks util the read can...
MEMSPACE void uart1_queue_putc(char c)
void tx_fifo_flush(int uart_no)
Flush transmit fifo for a uart.
MEMSPACE int uart0_putc(uint8 c)
Write a byte to uart0 with NL to CR/NL conversion Note: This function waits/blocks util the write can...
MEMSPACE int uart_putc(uint8 uart_no, char c)
Write a byte from a uart with NL to CR/NL conversion Note: This function waits/blocks util the write ...
MEMSPACE void uart_queue_putc(uint8_t uart_no, char c)
MEMSPACE int tx_fifo_empty(int uart_no)
Test if the transmit fifo is empty.
MEMSPACE void uart_init(UartBaudRate uart0_br, UartBaudRate uart1_br)
initialize uart0 and uart1 Defaults: 8 = data bits, 1 = stop bits, no parity
void uart_rx_enable(uint8 uart_no)
Enable receive interrupts for a uart.
MEMSPACE void uart_reattach(void)
Reinitialize uart0 and uart1 calls uart_init()
MEMSPACE void uart0_queue_putc(char c)
MEMSPACE uint8_t uart1_queue_getc(void)
MEMSPACE int uart1_getc(void)
Read a byte from uart1 with NL to CR/NL conversion Note: This function waits/blocks util the read can...
MEMSPACE void uart_flush(uint8_t uart_no)
Flush TX buffer Note: This function waits/blocks util the write happen.
void uart_rx_disable(uint8 uart_no)
Disable receive interrupts for a uart.
MEMSPACE int tx_fifo_putb(int uart_no, uint8_t c)
Add a byte to the trasmit fifo We assume that tx_fifo_free() was called!
MEMSPACE int tx_fifo_write(int uart_no, uint8_t *buf, int size)
Write a data buffer to the transmit fifo Note: This function does not wait/block util there is enough...
MEMSPACE void UART_SetPrintPort(uint8 uart_no)
Install debug uart.
void uart_tx_enable(uint8_t uart_no)
Enable transmit interrupts for a uart.
MEMSPACE int rx_fifo_getb(int uart_no)
Remove a byte from the receive fifo We assume that rx_fifo_used() was called!
MEMSPACE int rx_fifo_empty(int uart_no)
Test if the receive fifo is empty.
MEMSPACE uint8_t uart0_queue_getc(void)
LOCAL MEMSPACE int uart_queue_getb(uint8_t uart_no)
MEMSPACE int tx_fifo_free(int uart_no)
Get the number of bytes free in transmit fifo.
void uart_tx_disable(uint8_t uart_no)
Disable transmit interrupts for a uart.
int kbhiteol(int uart_no)
Has an EOL been read on stdin ?
MEMSPACE int rx_fifo_used(int uart_no)
Get the number of bytes used in receive fifo.
MEMSPACE int rx_fifo_free(int uart_no)
Get the number of bytes free in receive fifo.
MEMSPACE int rx_fifo_read(int uart_no, uint8_t *buf, int size)
Read a data buffer from the receive fifo Note: This function does not wait/block util there is enough...
LOCAL MEMSPACE int uart_getb(int uart_no)
Read a byte from a uart Note: This function waits/blocks util the read can happen.
void uart_callback(void *p)
Uart interrupt callback function Process all receive and transmit events here.
MEMSPACE int tx_fifo_used(int uart_no)
Get the number of bytes used in transmit fifo.
MEMSPACE int uart1_putc(uint8 c)
Write a byte to uart1 with NL to CR/NL conversion Note: This function waits/blocks util the write can...
LOCAL MEMSPACE void uart_queue_putb(uint8 uart_no, uint8 data)
MEMSPACE uint8_t uart_queue_getc(uint8_t uart_no)
MEMSPACE void uart_config(uint8 uart_no, uint32_t baud, uint8_t data_bits, uint8_t stop_bits, uint8_t parity)
Uart configuration, baud rate, data and stop bits, parity.