Type Alias rp2040_pac::i2c0::ic_sar::W

source ·
pub type W = W<IC_SAR_SPEC>;
Expand description

Register IC_SAR writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

source§

impl W

source

pub fn ic_sar(&mut self) -> IC_SAR_W<'_, IC_SAR_SPEC>

Bits 0:9 - The IC_SAR holds the slave address when the I2C is operating as a slave. For 7-bit addressing, only IC_SAR[6:0] is used.

This register can be written only when the I2C interface is disabled, which corresponds to the IC_ENABLE[0] register being set to 0. Writes at other times have no effect.

Note: The default values cannot be any of the reserved address locations: that is, 0x00 to 0x07, or 0x78 to 0x7f. The correct operation of the device is not guaranteed if you program the IC_SAR or IC_TAR to a reserved value. Refer to <<table_I2C_firstbyte_bit_defs>> for a complete list of these reserved values.

source

pub unsafe fn bits(&mut self, bits: u32) -> &mut Self

Writes raw bits to the register.

§Safety

Passing incorrect value can cause undefined behaviour. See reference manual