PSoC 6 Peripheral Driver Library

General Description

Functions

void Cy_SCB_EZI2C_SetBuffer1 (CySCB_Type const *base, uint8_t *buffer, uint32_t size, uint32_t rwBoundary, cy_stc_scb_ezi2c_context_t *context)
 Sets up the data buffer to be exposed to the I2C master on the primary slave address request. More...
 
void Cy_SCB_EZI2C_SetBuffer2 (CySCB_Type const *base, uint8_t *buffer, uint32_t size, uint32_t rwBoundary, cy_stc_scb_ezi2c_context_t *context)
 Sets up the data buffer to be exposed to the I2C master on the secondary slave address request. More...
 
uint32_t Cy_SCB_EZI2C_GetActivity (CySCB_Type const *base, cy_stc_scb_ezi2c_context_t *context)
 Returns a non-zero value if an I2C Read or Write cycle has occurred since the last time this function was called. More...
 
void Cy_SCB_EZI2C_Interrupt (CySCB_Type *base, cy_stc_scb_ezi2c_context_t *context)
 This is the interrupt function for the SCB configured in the EZI2C mode. More...
 

Function Documentation

◆ Cy_SCB_EZI2C_SetBuffer1()

void Cy_SCB_EZI2C_SetBuffer1 ( CySCB_Type const *  base,
uint8_t *  buffer,
uint32_t  size,
uint32_t  rwBoundary,
cy_stc_scb_ezi2c_context_t context 
)

Sets up the data buffer to be exposed to the I2C master on the primary slave address request.

Parameters
baseThe pointer to the EZI2C SCB instance.
bufferThe pointer to the data buffer.
sizeThe size of the buffer in bytes.
rwBoundaryThe number of data bytes starting from the beginning of the buffer with Read and Write access. The data bytes located at rwBoundary or greater are read only.
contextThe pointer to the context structure cy_stc_scb_ezi2c_context_t allocated by the user. The structure is used during the EZI2C operation for internal configuration and data retention. The user must not modify anything in this structure.
Note
  • This function is not interrupt-protected and to prevent a race condition, it must be protected from the EZI2C interruption in the place where it is called.
  • Calling this function in the middle of a transaction intended for the secondary slave address leads to unexpected behavior.

◆ Cy_SCB_EZI2C_SetBuffer2()

void Cy_SCB_EZI2C_SetBuffer2 ( CySCB_Type const *  base,
uint8_t *  buffer,
uint32_t  size,
uint32_t  rwBoundary,
cy_stc_scb_ezi2c_context_t context 
)

Sets up the data buffer to be exposed to the I2C master on the secondary slave address request.

Parameters
baseThe pointer to the EZI2C SCB instance.
bufferThe pointer to the data buffer.
sizeThe size of the buffer in bytes.
rwBoundaryThe number of data bytes starting from the beginning of the buffer with Read and Write access. The data bytes located at rwBoundary or greater are read only.
contextThe pointer to the context structure cy_stc_scb_ezi2c_context_t allocated by the user. The structure is used during the EZI2C operation for internal configuration and data retention. The user must not modify anything in this structure.
Note
  • This function is not interrupt-protected. To prevent a race condition, it must be protected from the EZI2C interruption in the place where it is called.
  • Calling this function in the middle of a transaction intended for the secondary slave address leads to unexpected behavior.

◆ Cy_SCB_EZI2C_GetActivity()

uint32_t Cy_SCB_EZI2C_GetActivity ( CySCB_Type const *  base,
cy_stc_scb_ezi2c_context_t context 
)

Returns a non-zero value if an I2C Read or Write cycle has occurred since the last time this function was called.

All flags are reset to zero at the end of this function call, except the CY_SCB_EZI2C_STATUS_BUSY.

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

◆ Cy_SCB_EZI2C_Interrupt()

void Cy_SCB_EZI2C_Interrupt ( CySCB_Type base,
cy_stc_scb_ezi2c_context_t context 
)

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

This function must be called inside the user-defined interrupt service routine to make the EZI2C slave work.

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