|
PebbleOS
|
Bus driver operations. More...
#include <i2c.h>
Data Fields | |
| int(* | init )(const struct pbl_i2c_bus *bus) |
| Configure the controller, leaving it disabled. | |
| void(* | enable )(const struct pbl_i2c_bus *bus) |
| Enable the controller. | |
| void(* | disable )(const struct pbl_i2c_bus *bus) |
| Disable the controller. | |
| bool(* | is_busy )(const struct pbl_i2c_bus *bus) |
| Check whether the controller is busy. | |
| void(* | start_transfer )(const struct pbl_i2c_bus *bus) |
| Start the current transfer. | |
| void(* | abort_transfer )(const struct pbl_i2c_bus *bus) |
| Abort the current transfer. | |
Bus driver operations.
Called with the bus lock held. The class layer owns locking, retries and timeouts; the driver moves the current transfer over the wire and reports its outcome with pbl_i2c_bus_event().
| void(* pbl_i2c_bus_ops::abort_transfer) (const struct pbl_i2c_bus *bus) |
Abort the current transfer.
| void(* pbl_i2c_bus_ops::disable) (const struct pbl_i2c_bus *bus) |
Disable the controller.
| void(* pbl_i2c_bus_ops::enable) (const struct pbl_i2c_bus *bus) |
Enable the controller.
| int(* pbl_i2c_bus_ops::init) (const struct pbl_i2c_bus *bus) |
Configure the controller, leaving it disabled.
Returns 0 or a negative errno.
| bool(* pbl_i2c_bus_ops::is_busy) (const struct pbl_i2c_bus *bus) |
Check whether the controller is busy.
| void(* pbl_i2c_bus_ops::start_transfer) (const struct pbl_i2c_bus *bus) |
Start the current transfer.