You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The driver APIs have been clearly divided into master and slave, with all calls now separated into i2c_master_* and i2c_slave_*. This provides a higher-level interface for the i2c driver. To support async operations in master mode, callbacks can be set in transmit, transmit_receive, and receive to signal when the operation is complete. An event callback can also be registered with register_event_callbacks to receive events such as I2C_EVENT_ALIVE, I2C_EVENT_DONE, and I2C_EVENT_NACK. To initiate a receive job call slave_receive while in slave mode and to wait for any receive data a callback can be registered with register_event_callbacks.
Changes to current i2c impl
Add AsyncI2cSlaveDriver
Add I2cBusDriver: allows adding I2cDevice
Add I2cDevice: exposes read, write, read_write
Add AsyncI2cBusDriver: allows adding AsyncI2cDevice (adds a guard that only one device can use the bus at once), cannot depend on I2cBusDriver because config of bus requires config of cmd queue depth for async operations
i2c Driver Docs
The driver APIs have been clearly divided into master and slave, with all calls now separated into
i2c_master_*
andi2c_slave_*
. This provides a higher-level interface for the i2c driver. To support async operations in master mode, callbacks can be set intransmit
,transmit_receive
, andreceive
to signal when the operation is complete. An event callback can also be registered withregister_event_callbacks
to receive events such asI2C_EVENT_ALIVE
,I2C_EVENT_DONE
, andI2C_EVENT_NACK
. To initiate a receive job callslave_receive
while in slave mode and to wait for any receive data a callback can be registered withregister_event_callbacks
.Changes to current i2c impl
AsyncI2cSlaveDriver
I2cBusDriver
: allows addingI2cDevice
I2cDevice
: exposesread
,write
,read_write
AsyncI2cBusDriver
: allows addingAsyncI2cDevice
(adds a guard that only one device can use the bus at once), cannot depend onI2cBusDriver
because config of bus requires config of cmd queue depth for async operationsAsyncI2cDevice
: exposesasync read
,async write
,async read_write
major == 4 || version == 5.1
major != 4 && version != 5.1
Challenges
Tasks
The text was updated successfully, but these errors were encountered: