What answers on the bus.
How many steps a script has left, or null when the bus is not scripted.
How many transfers have been made on the bus, by the program and every driver on it, including any that failed.
How long the drivers on the bus have asked to wait, in microseconds, whether or not the process slept through it.
Puts a copy of a part of any kind on a simulated bus, in place of any part at its address. Throws for a bus that is not simulated.
A copy of what a simulated part holds now, with whatever drivers have written to it,
as the class of part it is, or null when the bus is not simulated or no part holds
the address.
Reads length bytes from a part in one transaction.
Writes bytes to a part in one transaction: usually a register address and its value.
Writes bytes and then reads length bytes in one transaction, with a repeated start
between them, which is how a register is read.
StaticopenOpens the kernel's I2C adapter, such as /dev/i2c-1 on a Raspberry Pi.
Throws anywhere but Linux, and when the file cannot be opened as an adapter: the interface is not turned on, or the process may not use it.
StaticscriptedStaticsimulatedA bus of simulated parts of any kind, each answering at its own address. A later part at an address an earlier one holds takes its place.
Optionalparts: (I2cPart | WordPart | CommandPart)[] | null
One I2C bus, shared by the program and every driver built on it.
Transfers run one at a time, synchronously; each is quick, the time a few bytes take on the wire. A failed transfer throws with the reason: nothing answered at the address, the script expected something else, or the kernel's own words.