Type Alias W

Source
pub type W = W<CONFIG_SPEC>;
Expand description

Register config writer

Aliased Type§

struct W { /* private fields */ }

Implementations§

Source§

impl W

Source

pub fn master_enable(&mut self) -> MASTER_ENABLE_W<'_, CONFIG_SPEC>

Bit 0 - Enable signal of I2C master function

Asserting this bit will trigger the transaction, and should be de-asserted after finish.

Source

pub fn transfer_direction(&mut self) -> TRANSFER_DIRECTION_W<'_, CONFIG_SPEC>

Bit 1 - Packet transfer direction

Source

pub fn deglitch_enable(&mut self) -> DEGLITCH_ENABLE_W<'_, CONFIG_SPEC>

Bit 2 - Enable de-glitch function on all input pins

Source

pub fn clock_synchronize(&mut self) -> CLOCK_SYNCHRONIZE_W<'_, CONFIG_SPEC>

Bit 3 - Enable I2C clock synchronization

Enable this bit to support multi-master and clock-stretching. It should not be turned-off normally.

Source

pub fn sub_address_enable(&mut self) -> SUB_ADDRESS_ENABLE_W<'_, CONFIG_SPEC>

Bit 4 - Enable sub-address fields

Source

pub fn sub_address_length(&mut self) -> SUB_ADDRESS_LENGTH_W<'_, CONFIG_SPEC>

Bits 5:6 - Byte count for I2C sub-address

Source

pub fn slave_address(&mut self) -> SLAVE_ADDRESS_W<'_, CONFIG_SPEC>

Bits 8:14 - I2C transaction slave address

Source

pub fn packet_length(&mut self) -> PACKET_LENGTH_W<'_, CONFIG_SPEC>

Bits 16:23 - Byte count for each packet

Source

pub fn deglitch_cycle(&mut self) -> DEGLITCH_CYCLE_W<'_, CONFIG_SPEC>

Bits 28:31 - De-glitch function cycle count

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