Skip to main content

Module uart

Module uart 

Source
Expand description

UART device node control contract (/devices/uart/<name>).

§Control commands (kind b'u')

NumberCommandDirectionInputOutputEffect
0x00GET_CONFIGReadVersionAbiConfigAbiReturns the current configuration.
0x01SET_CONFIGWriteConfigAbiVersionAbiApplies a configuration atomically.
0x02FLUSH_RXWriteVersionAbiVersionAbiDiscards received, unread data.
0x03FLUSH_TXWriteVersionAbiVersionAbiDiscards 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§

ConfigAbi
UART line configuration.
FLUSH_RX
FLUSH_TX
GET_CONFIG
SET_CONFIG
VersionAbi
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