Struct rp_pac::i2c::regs::IcSlvDataNackOnly
source · #[repr(transparent)]pub struct IcSlvDataNackOnly(pub u32);
Expand description
Generate Slave Data NACK Register The register is used to generate a NACK for the data part of a transfer when DW_apb_i2c is acting as a slave-receiver. This register only exists when the IC_SLV_DATA_NACK_ONLY parameter is set to 1. When this parameter disabled, this register does not exist and writing to the register’s address has no effect. A write can occur on this register if both of the following conditions are met: - DW_apb_i2c is disabled (IC_ENABLE[0] = 0) - Slave part is inactive (IC_STATUS[6] = 0) Note: The IC_STATUS[6] is a register read-back location for the internal slv_activity signal; the user should poll this before writing the ic_slv_data_nack_only bit.
Tuple Fields§
§0: u32
Implementations§
source§impl IcSlvDataNackOnly
impl IcSlvDataNackOnly
sourcepub const fn nack(&self) -> bool
pub const fn nack(&self) -> bool
Generate NACK. This NACK generation only occurs when DW_apb_i2c is a slave-receiver. If this register is set to a value of 1, it can only generate a NACK after a data byte is received; hence, the data transfer is aborted and the data received is not pushed to the receive buffer. When the register is set to a value of 0, it generates NACK/ACK, depending on normal criteria. - 1: generate NACK after data byte received - 0: generate NACK/ACK normally Reset value: 0x0
sourcepub fn set_nack(&mut self, val: bool)
pub fn set_nack(&mut self, val: bool)
Generate NACK. This NACK generation only occurs when DW_apb_i2c is a slave-receiver. If this register is set to a value of 1, it can only generate a NACK after a data byte is received; hence, the data transfer is aborted and the data received is not pushed to the receive buffer. When the register is set to a value of 0, it generates NACK/ACK, depending on normal criteria. - 1: generate NACK after data byte received - 0: generate NACK/ACK normally Reset value: 0x0
Trait Implementations§
source§impl Clone for IcSlvDataNackOnly
impl Clone for IcSlvDataNackOnly
source§fn clone(&self) -> IcSlvDataNackOnly
fn clone(&self) -> IcSlvDataNackOnly
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for IcSlvDataNackOnly
impl Default for IcSlvDataNackOnly
source§fn default() -> IcSlvDataNackOnly
fn default() -> IcSlvDataNackOnly
source§impl PartialEq for IcSlvDataNackOnly
impl PartialEq for IcSlvDataNackOnly
impl Copy for IcSlvDataNackOnly
impl Eq for IcSlvDataNackOnly
impl StructuralPartialEq for IcSlvDataNackOnly
Auto Trait Implementations§
impl Freeze for IcSlvDataNackOnly
impl RefUnwindSafe for IcSlvDataNackOnly
impl Send for IcSlvDataNackOnly
impl Sync for IcSlvDataNackOnly
impl Unpin for IcSlvDataNackOnly
impl UnwindSafe for IcSlvDataNackOnly
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)