PSoC 6 Peripheral Driver Library

General Description

Functions

cy_en_scb_ezi2c_status_t Cy_SCB_EZI2C_Init (CySCB_Type *base, cy_stc_scb_ezi2c_config_t const *config, cy_stc_scb_ezi2c_context_t *context)
 Initializes the SCB for the EZI2C operation. More...
 
void Cy_SCB_EZI2C_DeInit (CySCB_Type *base)
 De-initializes the SCB block, returns the register values to default. More...
 
__STATIC_INLINE void Cy_SCB_EZI2C_Enable (CySCB_Type *base)
 Enables the SCB block for the EZI2C operation. More...
 
void Cy_SCB_EZI2C_Disable (CySCB_Type *base, cy_stc_scb_ezi2c_context_t *context)
 Disables the SCB block and clears the context statuses. More...
 
void Cy_SCB_EZI2C_SetAddress1 (CySCB_Type *base, uint8_t addr, cy_stc_scb_ezi2c_context_t *context)
 Sets the primary EZI2C slave address. More...
 
uint32_t Cy_SCB_EZI2C_GetAddress1 (CySCB_Type const *base, cy_stc_scb_ezi2c_context_t const *context)
 Returns the primary the EZI2C slave address. More...
 
void Cy_SCB_EZI2C_SetAddress2 (CySCB_Type *base, uint8_t addr, cy_stc_scb_ezi2c_context_t *context)
 Sets the secondary EZI2C slave address. More...
 
uint32_t Cy_SCB_EZI2C_GetAddress2 (CySCB_Type const *base, cy_stc_scb_ezi2c_context_t const *context)
 Returns the secondary EZI2C slave address. More...
 

Function Documentation

◆ Cy_SCB_EZI2C_Init()

cy_en_scb_ezi2c_status_t Cy_SCB_EZI2C_Init ( CySCB_Type base,
cy_stc_scb_ezi2c_config_t const *  config,
cy_stc_scb_ezi2c_context_t context 
)

Initializes the SCB for the EZI2C operation.

Parameters
baseThe pointer to the EZI2C SCB instance.
configThe pointer to the configuration structure cy_stc_scb_ezi2c_config_t.
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
cy_en_scb_ezi2c_status_t
Note
Ensure that the SCB block is disabled before calling this function.

◆ Cy_SCB_EZI2C_DeInit()

void Cy_SCB_EZI2C_DeInit ( CySCB_Type base)

De-initializes the SCB block, returns the register values to default.

Parameters
baseThe pointer to the EZI2C SCB instance.
Note
Ensure that the SCB block is disabled before calling this function.

◆ Cy_SCB_EZI2C_Enable()

__STATIC_INLINE void Cy_SCB_EZI2C_Enable ( CySCB_Type base)

Enables the SCB block for the EZI2C operation.

Parameters
baseThe pointer to the EZI2C SCB instance.

◆ Cy_SCB_EZI2C_Disable()

void Cy_SCB_EZI2C_Disable ( CySCB_Type base,
cy_stc_scb_ezi2c_context_t context 
)

Disables the SCB block and clears the context statuses.

Note that after the block is disabled, the TX and RX FIFOs and hardware statuses are cleared. Also, the hardware stops driving the output and ignores the input.

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.
Note
Calling this function while EZI2C is busy (the slave has been addressed and is communicating with the master), may cause transaction corruption because the hardware stops driving the output and ignores the input. Ensure that the EZI2C slave is not busy before calling this function.

◆ Cy_SCB_EZI2C_SetAddress1()

void Cy_SCB_EZI2C_SetAddress1 ( CySCB_Type base,
uint8_t  addr,
cy_stc_scb_ezi2c_context_t context 
)

Sets the primary EZI2C slave address.

Parameters
baseThe pointer to the EZI2C SCB instance.
addrThe 7-bit right justified slave address.
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.

◆ Cy_SCB_EZI2C_GetAddress1()

uint32_t Cy_SCB_EZI2C_GetAddress1 ( CySCB_Type const *  base,
cy_stc_scb_ezi2c_context_t const *  context 
)

Returns the primary the EZI2C slave address.

Parameters
baseThe pointer to the EZI2C SCB instance.
  • Parameters
    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
    The 7-bit right justified slave address.

◆ Cy_SCB_EZI2C_SetAddress2()

void Cy_SCB_EZI2C_SetAddress2 ( CySCB_Type base,
uint8_t  addr,
cy_stc_scb_ezi2c_context_t context 
)

Sets the secondary EZI2C slave address.

Parameters
baseThe pointer to the EZI2C SCB instance.
addrThe 7-bit right justified slave address.
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
Calling this function when the EZI2C slave is configured for one-address operation leads to unexpected behavior because it updates the address mask.

◆ Cy_SCB_EZI2C_GetAddress2()

uint32_t Cy_SCB_EZI2C_GetAddress2 ( CySCB_Type const *  base,
cy_stc_scb_ezi2c_context_t const *  context 
)

Returns the secondary EZI2C slave address.

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
The 7-bit right justified slave address.