Struct rp_pac::i2c::regs::IcSdaSetup
source · #[repr(transparent)]pub struct IcSdaSetup(pub u32);
Expand description
I2C SDA Setup Register This register controls the amount of time delay (in terms of number of ic_clk clock periods) introduced in the rising edge of SCL - relative to SDA changing - when DW_apb_i2c services a read request in a slave-transmitter operation. The relevant I2C requirement is tSU:DAT (note 4) as detailed in the I2C Bus Specification. This register must be programmed with a value equal to or greater than 2. Writes to this register succeed only when IC_ENABLE[0] = 0. Note: The length of setup time is calculated using [(IC_SDA_SETUP - 1) * (ic_clk_period)], so if the user requires 10 ic_clk periods of setup time, they should program a value of 11. The IC_SDA_SETUP register is only used by the DW_apb_i2c when operating as a slave transmitter.
Tuple Fields§
§0: u32
Implementations§
source§impl IcSdaSetup
impl IcSdaSetup
sourcepub const fn sda_setup(&self) -> u8
pub const fn sda_setup(&self) -> u8
SDA Setup. It is recommended that if the required delay is 1000ns, then for an ic_clk frequency of 10 MHz, IC_SDA_SETUP should be programmed to a value of 11. IC_SDA_SETUP must be programmed with a minimum value of 2.
sourcepub fn set_sda_setup(&mut self, val: u8)
pub fn set_sda_setup(&mut self, val: u8)
SDA Setup. It is recommended that if the required delay is 1000ns, then for an ic_clk frequency of 10 MHz, IC_SDA_SETUP should be programmed to a value of 11. IC_SDA_SETUP must be programmed with a minimum value of 2.
Trait Implementations§
source§impl Clone for IcSdaSetup
impl Clone for IcSdaSetup
source§fn clone(&self) -> IcSdaSetup
fn clone(&self) -> IcSdaSetup
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for IcSdaSetup
impl Default for IcSdaSetup
source§fn default() -> IcSdaSetup
fn default() -> IcSdaSetup
source§impl PartialEq<IcSdaSetup> for IcSdaSetup
impl PartialEq<IcSdaSetup> for IcSdaSetup
source§fn eq(&self, other: &IcSdaSetup) -> bool
fn eq(&self, other: &IcSdaSetup) -> bool
self
and other
values to be equal, and is used
by ==
.