Struct stm32_hal2::pac::i2c1::icr::W

source ·
pub struct W(/* private fields */);
Expand description

Register ICR writer

Implementations§

source§

impl W

source

pub fn addrcf(&mut self) -> BitWriterRaw<'_, u32, ICR_SPEC, ADDRCF_AW, BitM, 3>

Bit 3 - Address matched flag clear Writing 1 to this bit clears the ADDR flag in the I2C_ISR register. Writing 1 to this bit also clears the START bit in the I2C_CR2 register.

source

pub fn nackcf(&mut self) -> BitWriterRaw<'_, u32, ICR_SPEC, NACKCF_AW, BitM, 4>

Bit 4 - Not Acknowledge flag clear Writing 1 to this bit clears the ACKF flag in I2C_ISR register.

source

pub fn stopcf(&mut self) -> BitWriterRaw<'_, u32, ICR_SPEC, STOPCF_AW, BitM, 5>

Bit 5 - Stop detection flag clear Writing 1 to this bit clears the STOPF flag in the I2C_ISR register.

source

pub fn berrcf(&mut self) -> BitWriterRaw<'_, u32, ICR_SPEC, BERRCF_AW, BitM, 8>

Bit 8 - Bus error flag clear Writing 1 to this bit clears the BERRF flag in the I2C_ISR register.

source

pub fn arlocf(&mut self) -> BitWriterRaw<'_, u32, ICR_SPEC, ARLOCF_AW, BitM, 9>

Bit 9 - Arbitration Lost flag clear Writing 1 to this bit clears the ARLO flag in the I2C_ISR register.

source

pub fn ovrcf(&mut self) -> BitWriterRaw<'_, u32, ICR_SPEC, OVRCF_AW, BitM, 10>

Bit 10 - Overrun/Underrun flag clear Writing 1 to this bit clears the OVR flag in the I2C_ISR register.

source

pub fn peccf(&mut self) -> BitWriterRaw<'_, u32, ICR_SPEC, PECCF_AW, BitM, 11>

Bit 11 - PEC Error flag clear Writing 1 to this bit clears the PECERR flag in the I2C_ISR register. Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to 0. Please refer to Section25.3: I2C implementation.

source

pub fn timoutcf( &mut self ) -> BitWriterRaw<'_, u32, ICR_SPEC, TIMOUTCF_AW, BitM, 12>

Bit 12 - Timeout detection flag clear Writing 1 to this bit clears the TIMEOUT flag in the I2C_ISR register. Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to 0. Please refer to Section25.3: I2C implementation.

source

pub fn alertcf( &mut self ) -> BitWriterRaw<'_, u32, ICR_SPEC, ALERTCF_AW, BitM, 13>

Bit 13 - Alert flag clear Writing 1 to this bit clears the ALERT flag in the I2C_ISR register. Note: If the SMBus feature is not supported, this bit is reserved and forced by hardware to 0. Please refer to Section25.3: I2C implementation.

source

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

Writes raw bits to the register.

Methods from Deref<Target = W<ICR_SPEC>>§

source

pub unsafe fn bits(&mut self, bits: <REG as RegisterSpec>::Ux) -> &mut W<REG>

Writes raw bits to the register.

Trait Implementations§

source§

impl Deref for W

§

type Target = W<ICR_SPEC>

The resulting type after dereferencing.
source§

fn deref(&self) -> &<W as Deref>::Target

Dereferences the value.
source§

impl DerefMut for W

source§

fn deref_mut(&mut self) -> &mut <W as Deref>::Target

Mutably dereferences the value.
source§

impl From<W<ICR_SPEC>> for W

source§

fn from(writer: W<ICR_SPEC>) -> W

Converts to this type from the input type.

Auto Trait Implementations§

§

impl RefUnwindSafe for W

§

impl Send for W

§

impl Sync for W

§

impl Unpin for W

§

impl UnwindSafe for W

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.