Main docs: https://pigweed.dev/pw_stream_uart_linux.
|
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
embed:rst:leading-asterisk
*
* .. pw-status-codes::
*
* 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
embed:rst:leading-asterisk
*
* .. pw-status-codes::
*
* OK: The device was successfully opened and configured.
*
* INVALID_ARGUMENT: An unsupported baud rate was supplied.
*
* FAILED_PRECONDITION: A device was already open.
*
* UNKNOWN: An error was returned by the operating system.
*
*