Mistake on this page?
Report an issue in GitHub or email us
Macros
I2C Events Macros

Macros

#define I2C_EVENT_ERROR   (1 << 1)
 Indicates that an unspecified error has occurred in the transfer. More...
 
#define I2C_EVENT_ERROR_NO_SLAVE   (1 << 2)
 Indicates that the slave did not respond to the address byte of the transfer. More...
 
#define I2C_EVENT_TRANSFER_COMPLETE   (1 << 3)
 Indicates that the transfer completed successfully. More...
 
#define I2C_EVENT_TRANSFER_EARLY_NACK   (1 << 4)
 Indicates that a NACK was received after the address byte, but before the requested number of bytes could be transferred. More...
 
#define I2C_EVENT_ALL   (I2C_EVENT_ERROR | I2C_EVENT_TRANSFER_COMPLETE | I2C_EVENT_ERROR_NO_SLAVE | I2C_EVENT_TRANSFER_EARLY_NACK)
 Use this macro to request all possible I2C events. More...
 

Detailed Description

Macro Definition Documentation

Use this macro to request all possible I2C events.

Definition at line 68 of file i2c_api.h.

#define I2C_EVENT_ERROR   (1 << 1)

Indicates that an unspecified error has occurred in the transfer.

This usually means either an internal error in the Mbed MCU's I2C module, or something like an arbitration loss. Does not indicate a NACK.

Definition at line 44 of file i2c_api.h.

#define I2C_EVENT_ERROR_NO_SLAVE   (1 << 2)

Indicates that the slave did not respond to the address byte of the transfer.

Definition at line 49 of file i2c_api.h.

#define I2C_EVENT_TRANSFER_COMPLETE   (1 << 3)

Indicates that the transfer completed successfully.

Definition at line 54 of file i2c_api.h.

#define I2C_EVENT_TRANSFER_EARLY_NACK   (1 << 4)

Indicates that a NACK was received after the address byte, but before the requested number of bytes could be transferred.

Note: Not every manufacturer HAL is able to make a distinction between this flag and I2C_EVENT_ERROR_NO_SLAVE. On a NACK, you might conceivably get one or both of these flags.

Definition at line 63 of file i2c_api.h.

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.