PebbleOS
Loading...
Searching...
No Matches
Functions
I2C HAL

Interface between the common I2C code and the per-SoC bus controller drivers. More...

Functions

void i2c_hal_init (I2CBus *bus)
 Configure the bus controller, leaving it disabled.
 
void i2c_hal_enable (I2CBus *bus)
 Enable the bus controller.
 
void i2c_hal_disable (I2CBus *bus)
 Disable the bus controller.
 
bool i2c_hal_is_busy (I2CBus *bus)
 Check whether the bus controller is busy.
 
void i2c_hal_abort_transfer (I2CBus *bus)
 Abort the current transfer.
 
void i2c_hal_init_transfer (I2CBus *bus)
 Prepare for the transfer in the bus state.
 
void i2c_hal_start_transfer (I2CBus *bus)
 Start the transfer in the bus state.
 

Detailed Description

Interface between the common I2C code and the per-SoC bus controller drivers.

Called by the common code with the bus lock held.

Function Documentation

◆ i2c_hal_abort_transfer()

void i2c_hal_abort_transfer ( I2CBus *  bus)

Abort the current transfer.

Parameters
busBus.

◆ i2c_hal_disable()

void i2c_hal_disable ( I2CBus *  bus)

Disable the bus controller.

Parameters
busBus.

◆ i2c_hal_enable()

void i2c_hal_enable ( I2CBus *  bus)

Enable the bus controller.

Parameters
busBus.

◆ i2c_hal_init()

void i2c_hal_init ( I2CBus *  bus)

Configure the bus controller, leaving it disabled.

Parameters
busBus.

◆ i2c_hal_init_transfer()

void i2c_hal_init_transfer ( I2CBus *  bus)

Prepare for the transfer in the bus state.

Called once per transfer, before the first i2c_hal_start_transfer().

Parameters
busBus.

◆ i2c_hal_is_busy()

bool i2c_hal_is_busy ( I2CBus *  bus)

Check whether the bus controller is busy.

Parameters
busBus.
Returns
True if busy.

◆ i2c_hal_start_transfer()

void i2c_hal_start_transfer ( I2CBus *  bus)

Start the transfer in the bus state.

May be called again to retry after a NACK. The outcome is reported with i2c_handle_transfer_event().

Parameters
busBus.