PSoC 6 Peripheral Driver Library

General Description

Functions

void Cy_SCB_I2C_Interrupt (CySCB_Type *base, cy_stc_scb_i2c_context_t *context)
 This is the interrupt function for the SCB configured in the I2C mode. More...
 
void Cy_SCB_I2C_SlaveInterrupt (CySCB_Type *base, cy_stc_scb_i2c_context_t *context)
 This is the interrupt function for the SCB configured in I2C mode as the slave. More...
 
void Cy_SCB_I2C_MasterInterrupt (CySCB_Type *base, cy_stc_scb_i2c_context_t *context)
 This is the interrupt function for the SCB configured in I2C mode as the master. More...
 
__STATIC_INLINE void Cy_SCB_I2C_RegisterEventCallback (CySCB_Type const *base, cy_cb_scb_i2c_handle_events_t callback, cy_stc_scb_i2c_context_t *context)
 Registers a callback function that notifies that I2C Callback Events occurred in the Cy_SCB_I2C_Interrupt. More...
 
__STATIC_INLINE void Cy_SCB_I2C_RegisterAddrCallback (CySCB_Type const *base, cy_cb_scb_i2c_handle_addr_t callback, cy_stc_scb_i2c_context_t *context)
 Registers a callback function that notifies that I2C Address Callback Events occurred in the Cy_SCB_I2C_Interrupt. More...
 

Function Documentation

◆ Cy_SCB_I2C_Interrupt()

void Cy_SCB_I2C_Interrupt ( CySCB_Type base,
cy_stc_scb_i2c_context_t context 
)

This is the interrupt function for the SCB configured in the I2C mode.

The interrupt is mandatory for I2C operation and this function must be called inside the user-defined interrupt service. The exception is the I2C master, which uses only the Master Low-Level functions. To reduce the flash consumed by the I2C driver call Cy_SCB_I2C_SlaveInterrupt when I2C mode is the slave and Cy_SCB_I2C_MasterInterrupt when I2C mode is the master.

Parameters
baseThe pointer to the I2C SCB instance.
contextThe pointer to the context structure cy_stc_scb_i2c_context_t allocated by the user. The structure is used during the I2C operation for internal configuration and data retention. The user must not modify anything in this structure.

◆ Cy_SCB_I2C_SlaveInterrupt()

void Cy_SCB_I2C_SlaveInterrupt ( CySCB_Type base,
cy_stc_scb_i2c_context_t context 
)

This is the interrupt function for the SCB configured in I2C mode as the slave.

This function should be called inside the user-defined interrupt service routine to make any of the slave functions to work.

Parameters
baseThe pointer to the I2C SCB instance.
contextThe pointer to the context structure cy_stc_scb_i2c_context_t allocated by the user. The structure is used during the I2C operation for internal configuration and data retention. The user must not modify anything in this structure.

◆ Cy_SCB_I2C_MasterInterrupt()

void Cy_SCB_I2C_MasterInterrupt ( CySCB_Type base,
cy_stc_scb_i2c_context_t context 
)

This is the interrupt function for the SCB configured in I2C mode as the master.

This function should be called inside the user-defined interrupt service routine to make Master High-Level functions to work.

Parameters
baseThe pointer to the I2C SCB instance.
contextThe pointer to the context structure cy_stc_scb_i2c_context_t allocated by the user. The structure is used during the I2C operation for internal configuration and data retention. The user must not modify anything in this structure.

◆ Cy_SCB_I2C_RegisterEventCallback()

__STATIC_INLINE void Cy_SCB_I2C_RegisterEventCallback ( CySCB_Type const *  base,
cy_cb_scb_i2c_handle_events_t  callback,
cy_stc_scb_i2c_context_t context 
)

Registers a callback function that notifies that I2C Callback Events occurred in the Cy_SCB_I2C_Interrupt.

Parameters
baseThe pointer to the I2C SCB instance.
callbackThe pointer to a callback function. See cy_cb_scb_i2c_handle_events_t for the function prototype.
contextThe pointer to context structure cy_stc_scb_i2c_context_t allocated by the user. The structure is used while the I2C operation for internal configuration and data retention. The user should not modify anything in this structure.
Note
To remove the callback, pass NULL as the pointer to the callback function.

◆ Cy_SCB_I2C_RegisterAddrCallback()

__STATIC_INLINE void Cy_SCB_I2C_RegisterAddrCallback ( CySCB_Type const *  base,
cy_cb_scb_i2c_handle_addr_t  callback,
cy_stc_scb_i2c_context_t context 
)

Registers a callback function that notifies that I2C Address Callback Events occurred in the Cy_SCB_I2C_Interrupt.

Parameters
baseThe pointer to the I2C SCB instance.
callbackThe pointer to a callback function. See cy_cb_scb_i2c_handle_addr_t for the function prototype.
contextThe pointer to context structure cy_stc_scb_i2c_context_t allocated by the user. The structure is used during the I2C operation for internal configuration and data retention. The user should not modify anything in this structure.
Note
To remove the callback, pass NULL as the pointer to a callback function.