Module rp2040_pac::i2c0::ic_data_cmd

source ·
Expand description

I2C Rx/Tx Data Buffer and Command Register; this is the register the CPU writes to when filling the TX FIFO and the CPU reads from when retrieving bytes from RX FIFO.

The size of the register changes as follows:

Write: - 11 bits when IC_EMPTYFIFO_HOLD_MASTER_EN=1 - 9 bits when IC_EMPTYFIFO_HOLD_MASTER_EN=0 Read: - 12 bits when IC_FIRST_DATA_BYTE_STATUS = 1 - 8 bits when IC_FIRST_DATA_BYTE_STATUS = 0 Note: In order for the DW_apb_i2c to continue acknowledging reads, a read command should be written for every byte that is to be received; otherwise the DW_apb_i2c will stop acknowledging.

Structs§

  • I2C Rx/Tx Data Buffer and Command Register; this is the register the CPU writes to when filling the TX FIFO and the CPU reads from when retrieving bytes from RX FIFO.

Enums§

  • This bit controls whether a read or a write is performed. This bit does not control the direction when the DW_apb_i2con acts as a slave. It controls only the direction when it acts as a master.
  • Indicates the first data byte received after the address phase for receive transfer in Master receiver or Slave receiver mode.
  • This bit controls whether a RESTART is issued before the byte is sent or received.
  • This bit controls whether a STOP is issued after the byte is sent or received.

Type Aliases§

  • Field CMD reader - This bit controls whether a read or a write is performed. This bit does not control the direction when the DW_apb_i2con acts as a slave. It controls only the direction when it acts as a master.
  • Field CMD writer - This bit controls whether a read or a write is performed. This bit does not control the direction when the DW_apb_i2con acts as a slave. It controls only the direction when it acts as a master.
  • Field DAT reader - This register contains the data to be transmitted or received on the I2C bus. If you are writing to this register and want to perform a read, bits 7:0 (DAT) are ignored by the DW_apb_i2c. However, when you read this register, these bits return the value of data received on the DW_apb_i2c interface.
  • Field DAT writer - This register contains the data to be transmitted or received on the I2C bus. If you are writing to this register and want to perform a read, bits 7:0 (DAT) are ignored by the DW_apb_i2c. However, when you read this register, these bits return the value of data received on the DW_apb_i2c interface.
  • Field FIRST_DATA_BYTE reader - Indicates the first data byte received after the address phase for receive transfer in Master receiver or Slave receiver mode.
  • Register IC_DATA_CMD reader
  • Field RESTART reader - This bit controls whether a RESTART is issued before the byte is sent or received.
  • Field RESTART writer - This bit controls whether a RESTART is issued before the byte is sent or received.
  • Field STOP reader - This bit controls whether a STOP is issued after the byte is sent or received.
  • Field STOP writer - This bit controls whether a STOP is issued after the byte is sent or received.
  • Register IC_DATA_CMD writer