|
theCore C++ embedded framework
|
Electron UART bus wrapper. More...
#include </home/travis/build/forGGe/theCore/platform/particle_electron/export/aux/uart_bus.hpp>
Public Types | |
| using | channel = ecl::bus_channel |
| using | event = ecl::bus_event |
| using | handler_fn = ecl::bus_handler |
Public Member Functions | |
| uart_bus ()=delete | |
| ~uart_bus ()=delete | |
| uart_bus & | operator= (uart_bus &)=delete |
| uart_bus (uart_bus &)=delete | |
Static Public Member Functions | |
| static err | init () |
| Lazy initialization. More... | |
| static void | set_rx (uint8_t *rx, size_t size) |
| Sets rx buffer with given size. More... | |
| static void | set_tx (size_t size, uint8_t fill_byte=0xff) |
| Sets tx buffer made-up from sequence of similar bytes. More... | |
| static void | set_tx (const uint8_t *tx, size_t size) |
| Sets tx buffer with given size. More... | |
| static void | set_handler (const handler_fn &handler) |
| Sets event handler. More... | |
| static void | reset_buffers () |
| Reset xfer buffers. More... | |
| static void | reset_handler () |
| Resets previously set handler. More... | |
| static err | do_xfer () |
| Executes xfer, using buffers previously set. More... | |
| static err | do_tx () |
| static err | do_rx () |
| static err | cancel_xfer () |
| Cancels xfer. More... | |
Friends | |
| void | serial_tx_dispatch () |
| template<uart_device d> | |
| void | serial_rx_dispatch () |
Electron UART bus wrapper.
| using ecl::uart_bus< dev >::channel = ecl::bus_channel |
| using ecl::uart_bus< dev >::event = ecl::bus_event |
| using ecl::uart_bus< dev >::handler_fn = ecl::bus_handler |
|
delete |
|
delete |
|
delete |
|
delete |
|
static |
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 made-up from sequence of similar bytes.
| [in] | size | Size of sequence |
| [in] | fill_byte | Byte to fill a sequence. Optional. |
|
static |
Sets tx buffer with given size.
| [in] | tx | Buffer to transmit. Optional. |
| [in] | size | Buffer size. |
|
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.
|
static |
Executes xfer, using buffers previously set.
When it will be done, handler will be invoked.

|
static |
|
static |
|
static |
Cancels xfer.
After this call no xfer will occur.
|
friend |
|
friend |