Type Alias rp2040_pac::i2c0::ic_enable::ENABLE_R

source ·
pub type ENABLE_R = BitReader<ENABLE_A>;
Expand description

Field ENABLE reader - Controls whether the DW_apb_i2c is enabled. - 0: Disables DW_apb_i2c (TX and RX FIFOs are held in an erased state) - 1: Enables DW_apb_i2c Software can disable DW_apb_i2c while it is active. However, it is important that care be taken to ensure that DW_apb_i2c is disabled properly. A recommended procedure is described in ‘Disabling DW_apb_i2c’.

When DW_apb_i2c is disabled, the following occurs: - The TX FIFO and RX FIFO get flushed. - Status bits in the IC_INTR_STAT register are still active until DW_apb_i2c goes into IDLE state. If the module is transmitting, it stops as well as deletes the contents of the transmit buffer after the current transfer is complete. If the module is receiving, the DW_apb_i2c stops the current transfer at the end of the current byte and does not acknowledge the transfer.

In systems with asynchronous pclk and ic_clk when IC_CLK_TYPE parameter set to asynchronous (1), there is a two ic_clk delay when enabling or disabling the DW_apb_i2c. For a detailed description on how to disable DW_apb_i2c, refer to ‘Disabling DW_apb_i2c’

Reset value: 0x0

Aliased Type§

struct ENABLE_R { /* private fields */ }

Implementations§

source§

impl ENABLE_R

source

pub const fn variant(&self) -> ENABLE_A

Get enumerated values variant

source

pub fn is_disabled(&self) -> bool

I2C is disabled

source

pub fn is_enabled(&self) -> bool

I2C is enabled