Expand description
I2C device node control contract (/devices/i2c/<name>).
Control commands (kind b'i'), all with a version field first that must
equal ABI_VERSION and reserved fields that must be zero:
SELECT_ADDRESS(write): 7-bit address, or 10-bit when the controller reportsten_bitsupport.GET_FREQUENCY(read): configured and maximum frequency.SET_FREQUENCY(write): new frequency,0 < hz <= max_frequency_hz.WRITE_READ(write): write then read in one transaction with repeated START, against the selected address. Lengths are at mostMAX_TRANSFER_LENGTHand at least one of them must be non-zero.
Structs§
- Frequency
Output - Output of
GET_FREQUENCY. - GET_
FREQUENCY - SELECT_
ADDRESS - SET_
FREQUENCY - Select
Address Input - Input of
SELECT_ADDRESS. - SetFrequency
Input - Input of
SET_FREQUENCY. - WRITE_
READ - Write
Read Input - Input of
WRITE_READ. Only the firstwrite_lengthbytes ofwriteare sent. - Write
Read Output - Output of
WRITE_READ. The firstread_lengthbytes ofreadare valid.
Constants§
- ABI_
VERSION - Version carried in the first field of every command input and output.
- MAX_
TRANSFER_ LENGTH - Largest write or read length of one
WRITE_READtransfer.