theCore C++ embedded framework
|
Files | |
file | uart.hpp |
UART implementation for TI TM4C MCU. | |
Data Structures | |
class | ecl::uart< ch > |
UART driver. More... | |
Enumerations | |
enum | ecl::uart_channel { ecl::uart_channel::ch0 = UART0_BASE, ecl::uart_channel::ch1 = UART1_BASE, ecl::uart_channel::ch2 = UART2_BASE, ecl::uart_channel::ch3 = UART3_BASE, ecl::uart_channel::ch4 = UART4_BASE, ecl::uart_channel::ch5 = UART5_BASE, ecl::uart_channel::ch6 = UART6_BASE, ecl::uart_channel::ch7 = UART7_BASE } |
Represents distinct UART peripheral devices (channels) More... | |
Functions | |
static void | ecl::uart< ch >::irq_bus_handler () |
UART interrupt handler. More... | |
static err | ecl::uart< ch >::init () |
Lazy initialization. More... | |
static void | ecl::uart< ch >::set_rx (uint8_t *rx, size_t size) |
Sets rx buffer with given size. More... | |
static void | ecl::uart< ch >::set_tx (const uint8_t *tx, size_t size) |
Sets tx buffer with given size. More... | |
static void | ecl::uart< ch >::set_tx (size_t size, uint8_t fill_byte=0xff) |
Sets rx buffer made-up from sequence of similar bytes. More... | |
static void | ecl::uart< ch >::set_handler (const bus_handler &handler) |
Sets event handler. More... | |
static void | ecl::uart< ch >::reset_buffers () |
Reset xfer buffers. More... | |
static void | ecl::uart< ch >::reset_handler () |
Resets previously set handler. More... | |
static err | ecl::uart< ch >::do_xfer () |
Executes xfer, using buffers previously set. More... | |
static err | ecl::uart< ch >::cancel_xfer () |
Cancels xfer. More... | |
|
strong |
|
staticprotected |
UART interrupt handler.
Receives interrupt from IRQ subsystem.
Lazy initialization.
|
static |
Sets rx buffer with given size.
[in,out] | rx | Buffer to write data to. Optional. |
[in] | size | Size |
|
static |
Sets tx buffer with given size.
[in] | tx | Buffer to transmit. Optional. |
[in] | size | Buffer size. |
|
static |
Sets rx buffer made-up from sequence of similar bytes.
[in] | size | Size of sequence |
[in] | fill_byte | Byte to fill a sequence. Optional. |
|
static |
Sets event handler.
Handler will be used by the bus, until reset_handler() will be called.
[in] | handler | Handler itself. |
|
static |
|
static |
Resets previously set handler.
Executes xfer, using buffers previously set.
When it will be done, handler will be invoked.