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

Functions

bool i2c_transfer_async (i2c_t *obj, const uint8_t *tx, uint32_t tx_length, uint8_t *rx, uint32_t rx_length, uint16_t address, bool stop, i2c_async_handler_f handler, void *ctx)
 Start I2C asynchronous transfer. More...
 
void i2c_abort_async (i2c_t *obj)
 Abort asynchronous transfer. More...
 

Detailed Description

Function Documentation

void i2c_abort_async ( i2c_t obj)

Abort asynchronous transfer.

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

Parameters
objThe I2C object
bool i2c_transfer_async ( i2c_t obj,
const uint8_t *  tx,
uint32_t  tx_length,
uint8_t *  rx,
uint32_t  rx_length,
uint16_t  address,
bool  stop,
i2c_async_handler_f  handler,
void *  ctx 
)

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 - 7 bit or 10 bit
stopIf true, stop is generated after the transfer is done
handlerThe I2C IRQ handler to be set
ctxThe context pointer
Returns
true if the transfer was successfully scheduled, false otherwise
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.