I2C Interrupts Definition

group x3d_I2C_interrupts_definition

Defines

I2C_INT_GEN_CALL ((uint32_t)BIT(11))

I2C general call interrupt. When a general call address is received and it is acknowledged.

I2C_INT_START_DET ((uint32_t)BIT(10))

I2C start detect interrupt. When a start or restart condition has occurred on the I2C interface.

I2C_INT_STOP_DET ((uint32_t)BIT(9))

I2C stop detect interrupt. When a stop condition has occurred on the I2C interface.

I2C_INT_ACTIVITY ((uint32_t)BIT(8))

I2C activity interrupt. When I2C is activity on the bus.

I2C_INT_RX_DONE ((uint32_t)BIT(7))

I2C slave RX done interrupt. When the I2C is acting as a slave-transmitter and the master does not acknowledge a transmitted byte. This occurs on the last byte of the transmission, indicating that the transmission is done.

I2C_INT_TX_ABRT ((uint32_t)BIT(6))

I2C TX abort interrupt. When an I2C transmitter is unable to complete the intended actions on the contents of the transmit FIFO.

I2C_INT_RD_REQ ((uint32_t)BIT(5))

I2C slave RX request interrupt. When I2C is acting as a slave and another I2C master is attempting to read data from I2C.

I2C_INT_TX_EMPTY ((uint32_t)BIT(4))

I2C TX FIFO empty interrupt. When the transmit buffer is at or below the threshold value.

I2C_INT_TX_OVER ((uint32_t)BIT(3))

I2C TX FIFO overflow interrupt. When transmit buffer is filled to 24 and the processor attempts to issue another I2C command.

I2C_INT_RX_FULL ((uint32_t)BIT(2))

I2C RX FIFO full interrupt. When the receive buffer reaches or goes above the RX FIFO threshold value.

I2C_INT_RX_OVER ((uint32_t)BIT(1))

I2C RX FIFO overflow interrupt. When the receive buffer is completely filled to 40 and an additional byte is received from an external I2C device.

I2C_INT_RX_UNDER ((uint32_t)BIT(0))

I2C RX FIFO underflow interrupt. When the processor attempts to read the receive buffer when it is empty.

I2C_GET_INT(INT)                              (((INT) == I2C_INT_GEN_CALL) || ((INT) == I2C_INT_START_DET

) || \

((INT) ==

I2C_INT_STOP_DET) || ((INT) == I2C_INT_ACTIVITY

) || \

((INT) ==

I2C_INT_RX_DONE)  || ((INT) == I2C_INT_TX_ABRT

) || \

((INT) ==

I2C_INT_RD_REQ)   || ((INT) == I2C_INT_TX_EMPTY

) || \

((INT) ==

I2C_INT_TX_OVER)  || ((INT) == I2C_INT_RX_FULL

) || \

((INT) ==

I2C_INT_RX_OVER)  || ((INT) == I2C_INT_RX_UNDER))

Check if the input parameter is valid.