Mistake on this page?
Report an issue in GitHub or email us
Functions
Asynchronous I2C Hardware Abstraction Layer

Functions

void i2c_transfer_asynch (i2c_t *obj, const void *tx, size_t tx_length, void *rx, size_t rx_length, uint32_t address, uint32_t stop, uint32_t handler, uint32_t event, DMAUsage hint)
 Start I2C asynchronous transfer. More...
 
uint32_t i2c_irq_handler_asynch (i2c_t *obj)
 The asynchronous IRQ handler. More...
 
uint8_t i2c_active (i2c_t *obj)
 Attempts to determine if the I2C peripheral is already in use. More...
 
void i2c_abort_asynch (i2c_t *obj)
 Abort asynchronous transfer. More...
 

Detailed Description

Function Documentation

void i2c_abort_asynch ( i2c_t obj)

Abort asynchronous transfer.

This function does not perform any check - that should happen in upper layers.

Parameters
objThe I2C object
uint8_t i2c_active ( i2c_t obj)

Attempts to determine if the I2C peripheral is already in use.

Parameters
objThe I2C object
Returns
Non-zero if the I2C module is active or zero if it is not
uint32_t i2c_irq_handler_asynch ( i2c_t obj)

The asynchronous IRQ handler.

Parameters
objThe I2C object which holds the transfer information
Returns
Event flags if a transfer termination condition was met, otherwise return 0.
void i2c_transfer_asynch ( i2c_t obj,
const void *  tx,
size_t  tx_length,
void *  rx,
size_t  rx_length,
uint32_t  address,
uint32_t  stop,
uint32_t  handler,
uint32_t  event,
DMAUsage  hint 
)

Start I2C asynchronous transfer.

Parameters
objThe I2C object
txThe transmit buffer
tx_lengthThe number of bytes to transmit
rxThe receive buffer
rx_lengthThe number of bytes to receive
addressThe address to be set - 7bit or 9bit
stopIf true, stop will be generated after the transfer is done
handlerThe I2C IRQ handler to be set
eventEvent mask for the transfer. See I2C Events Macros
hintDMA hint usage
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.