UART stream implementation for Linux.
Main docs: Home
|
std::optional< uint32_t > | pw::stream::UartStreamLinux::Config::baud_rate |
|
std::optional< bool > | pw::stream::UartStreamLinux::Config::flow_control |
|
◆ DoRead()
◆ DoWrite()
◆ Open() [1/2]
Status pw::stream::UartStreamLinux::Open |
( |
const char * |
path, |
|
|
Config |
config |
|
) |
| |
Open a UART device using the specified Config struct.
- Parameters
-
[in] | path | Path to the TTY device. |
[in] | config | UartStreamLinux configuration structure. |
- Returns
- OK: The device was successfully opened and configured.
- INVALID_ARGUMENT: Invalid config, for e.g. unsupported baud rate.
- FAILED_PRECONDITION: A device was already open.
- UNKNOWN: An error was returned by the operating system.
◆ Open() [2/2]
Status pw::stream::UartStreamLinux::Open |
( |
const char * |
path, |
|
|
uint32_t |
baud_rate |
|
) |
| |
|
inline |
Open a UART device using the specified baud rate.
- Parameters
-
[in] | path | Path to the TTY device. |
[in] | baud_rate | Baud rate to use for the device. |
- Returns
-