Implements device-level abstraction for UART devices.
More...
#include <uart_device.h>
Implements device-level abstraction for UART devices.
UART RX Listener type definition.
UART devices enumeration.
| Enumerator |
|---|
| kUart1 |
|
| kUart2 |
|
| kUart3 |
|
| kUart4 |
|
| kUart5 |
|
| UartDevice::UartDevice |
( |
const Config & |
config | ) |
|
|
explicit |
Constructor for UART device.
- Parameters
-
| static Listener& UartDevice::InvokeListener |
( |
const uint8_t |
uart_port | ) |
|
|
inlinestatic |
Invokes the external listener.
- Parameters
-
- Returns
- External listener corresponding to the UART port
| void UartDevice::SetListener |
( |
Listener && |
listener | ) |
|
Sets and enables RX listener for this device.
- Parameters
-
| listener | External listener function to trigger. |
| void UartDevice::Tx |
( |
const char * |
data, |
|
|
|
... |
|
) |
| |
Transmits a formatted string.
- Parameters
-
| data | Formatted string |
| ... | Variables |
| void UartDevice::Tx |
( |
const std::string & |
s | ) |
|
Transmits a string.
- Parameters
-
| void UartDevice::TxByte |
( |
const uint8_t |
byte | ) |
|
Transmites one byte.
- Parameters
-
| byte | Character to transmit |
The documentation for this class was generated from the following file: