I2C Interrupts

group I2C_Interrupts

Defines

I2C_INT_MST_ON_HOLD BIT13

When Master TX FIFO is empty and no stop bit command is issued, master will hold the SCL low.

I2C_INT_GEN_CALL BIT11

Set only when a General Call address is received and it is acknowledged.

I2C_INT_START_DET BIT10

Indicates whether a START or RESTART condition has occurred on the I2C interface regardless of whether I2C is operating in slave or master mode.

I2C_INT_STOP_DET BIT9

Indicates whether a STOP condition has occurred on the I2C interface regardless of whether I2C is operating in slave or master mode.

I2C_INT_ACTIVITY BIT8

This bit captures I2C activity and stays set until it is cleared.

I2C_INT_RX_DONE BIT7

When the I2C is acting as a slave-transmitter, this bit is set to 1 if 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 BIT6

This bit indicates if I2C as an I2C transmitter, is unable to complete the intended actions on the contents of the transmit FIFO.

I2C_INT_RD_REQ BIT5

This bit is set to 1 when acting as a slave and another I2C master is attempting to read data.

I2C_INT_TX_EMPTY BIT4

This bit is set to 1 when the transmit buffer is at or below the threshold value set in the IC_TX_TL register.

I2C_INT_TX_OVER BIT3

Set during transmit if the transmit buffer is filled to TX FIFO depth and the processor attempts to issue another I2C command.

I2C_INT_RX_FULL BIT2

Set when the receive buffer reaches or goes above the RX_TL threshold in the IC_RX_TL register.

I2C_INT_RX_OVER BIT1

Set if the receive buffer is completely filled to IC_RX_BUFFER_DEPTH and an additional byte is received from an external I2C device.

I2C_INT_RX_UNDER BIT0

Set if the processor attempts to read the receive buffer when it is empty by reading.

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) || ((INT) == I2C_INT_MST_ON_HOLD))

Check if the input parameter is valid.