Data Structures | |
| struct | cy_stc_scb_i2c_config_t |
| I2C configuration structure. More... | |
| struct | cy_stc_scb_i2c_context_t |
| I2C context structure. More... | |
| struct | cy_stc_scb_i2c_master_xfer_config_t |
| The I2C Master transfer structure. More... | |
Typedefs | |
| typedef void(* | cy_cb_scb_i2c_handle_events_t) (uint32_t event) |
| Provides the typedef for the callback function called in the Cy_SCB_I2C_Interrupt to notify the user about occurrences of I2C Callback Events. | |
| typedef cy_en_scb_i2c_command_t(* | cy_cb_scb_i2c_handle_addr_t) (uint32_t event) |
| Provides the typedef for the callback function called in the Cy_SCB_I2C_Interrupt to notify the user about occurrences of I2C Address Callback Events. More... | |
| struct cy_stc_scb_i2c_config_t |
| Data Fields | ||
|---|---|---|
| cy_en_scb_i2c_mode_t | i2cMode | Specifies the mode of operation. |
| bool | useRxFifo |
The SCB provides an RX FIFO in hardware (consult the selected device datasheet to get the actual FIFO size). The useRxFifo field defines how the driver firmware reads data from the RX FIFO:
|
| bool | useTxFifo |
The SCB provides a TX FIFO in hardware (consult the selected device datasheet to get the actual FIFO size). The useTxFifo option defines how the driver firmware loads data into the TX FIFO:
|
| uint8_t | slaveAddress | The 7-bit right justified slave address, used only for the slave mode. |
| uint8_t | slaveAddressMask |
The slave address mask is used to mask bits of the slave address during the address match procedure (it is used only for the slave mode). Bit 0 of the address mask corresponds to the read/write direction bit and is always a do not care in the address match therefore must be set 0. Bit value 0 - excludes bit from address comparison. Bit value 1 - the bit needs to match with the corresponding bit of the I2C slave address. |
| bool | acceptAddrInFifo | True - the slave address is accepted in the RX FIFO, false - the slave addresses are not accepted in the RX FIFO. |
| bool | ackGeneralAddr | True - accept the general call address; false - ignore the general call address. |
| bool | enableWakeFromSleep | When set, the slave will wake the device from Deep Sleep on an address match (the device datasheet must be consulted to determine which SCBs support this mode) |
| bool | enableDigitalFilter | Enables a digital 3-tap median filter to be applied to the inputs of filter glitches on the lines. |
| uint32_t | lowPhaseDutyCycle |
The number of SCB clock cycles in the low phase of SCL. Only applicable in master modes. The valid range is 7 to 16. |
| uint32_t | highPhaseDutyCycle |
The number of SCB clock cycles in the high phase of SCL. Only applicable in master modes. The valid range is 5 to 16. Please refer to the section group_scb_i2c_mclk_sync for more information. |
| struct cy_stc_scb_i2c_context_t |
| struct cy_stc_scb_i2c_master_xfer_config_t |
| typedef cy_en_scb_i2c_command_t(* cy_cb_scb_i2c_handle_addr_t) (uint32_t event) |
Provides the typedef for the callback function called in the Cy_SCB_I2C_Interrupt to notify the user about occurrences of I2C Address Callback Events.
This callback must return a decision to ACK (continue transaction) or NAK (end transaction) the received address. Note if the slave is configured to accept an address in RX FIFO, it must read from it using the Cy_SCB_ReadRxFifo function.