PebbleOS
Loading...
Searching...
No Matches
pbl_i2c_bus_ops Struct Reference

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.
 

Detailed Description

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().

Field Documentation

◆ abort_transfer

void(* pbl_i2c_bus_ops::abort_transfer) (const struct pbl_i2c_bus *bus)

Abort the current transfer.

◆ disable

void(* pbl_i2c_bus_ops::disable) (const struct pbl_i2c_bus *bus)

Disable the controller.

◆ enable

void(* pbl_i2c_bus_ops::enable) (const struct pbl_i2c_bus *bus)

Enable the controller.

◆ init

int(* pbl_i2c_bus_ops::init) (const struct pbl_i2c_bus *bus)

Configure the controller, leaving it disabled.

Returns 0 or a negative errno.

◆ is_busy

bool(* pbl_i2c_bus_ops::is_busy) (const struct pbl_i2c_bus *bus)

Check whether the controller is busy.

◆ start_transfer

void(* pbl_i2c_bus_ops::start_transfer) (const struct pbl_i2c_bus *bus)

Start the current transfer.


The documentation for this struct was generated from the following file: