Expand description
UART device node control contract (/devices/uart/<name>).
§Control commands (kind b'u')
| Number | Command | Direction | Input | Output | Effect |
|---|---|---|---|---|---|
0x00 | GET_CONFIG | Read | VersionAbi | ConfigAbi | Returns the current configuration. |
0x01 | SET_CONFIG | Write | ConfigAbi | VersionAbi | Applies a configuration atomically. |
0x02 | FLUSH_RX | Write | VersionAbi | VersionAbi | Discards received, unread data. |
0x03 | FLUSH_TX | Write | VersionAbi | VersionAbi | Discards queued, untransmitted data. |
Every struct starts with a version field that must equal ABI_VERSION;
any other value is InvalidArgument. Enum fields use the numeric codes
below; an unknown code is InvalidArgument, and a setting the driver
cannot express is Unsupported.
Structs§
- Config
Abi - UART line configuration.
- FLUSH_
RX - FLUSH_
TX - GET_
CONFIG - SET_
CONFIG - Version
Abi - Carries only the ABI version. Used as input and output of commands that have no other payload.
Constants§
- ABI_
VERSION - Version of every UART control ABI struct in this module.
- FLOW_
CONTROL_ NONE - Flow control codes in
ConfigAbi::flow_control. - FLOW_
CONTROL_ RTS_ CTS - FLOW_
CONTROL_ XON_ XOFF - PARITY_
EVEN - PARITY_
NONE - Parity codes in
ConfigAbi::parity. - PARITY_
ODD