Struct stm32wlxx_hal::pac::comp::comp2_csr::W
pub struct W(/* private fields */);
Available on crate feature
stm32wl5x_cm4
only.Expand description
Register COMP2_CSR
writer
Implementations§
§impl W
impl W
pub fn lock(
&mut self
) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, LOCK_A, BitM, 31>
pub fn lock( &mut self ) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, LOCK_A, BitM, 31>
Bit 31 - CSR register lock bit
pub fn inmesel(
&mut self
) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, INMESEL_A, Unsafe, 2, 25>
pub fn inmesel( &mut self ) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, INMESEL_A, Unsafe, 2, 25>
Bits 25:26 - comparator 2 input minus extended selection bits.
pub fn scalen(
&mut self
) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, SCALEN_A, BitM, 23>
pub fn scalen( &mut self ) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, SCALEN_A, BitM, 23>
Bit 23 - Voltage scaler enable bit
pub fn brgen(
&mut self
) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, BRGEN_A, BitM, 22>
pub fn brgen( &mut self ) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, BRGEN_A, BitM, 22>
Bit 22 - Scaler bridge enable
pub fn blanking(
&mut self
) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, BLANKING_A, Unsafe, 3, 18>
pub fn blanking( &mut self ) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, BLANKING_A, Unsafe, 3, 18>
Bits 18:20 - Comparator 2 blanking source selection bits
pub fn hyst(
&mut self
) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, HYST_A, Safe, 2, 16>
pub fn hyst( &mut self ) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, HYST_A, Safe, 2, 16>
Bits 16:17 - Comparator 2 hysteresis selection bits
pub fn polarity(
&mut self
) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, POLARITY_A, BitM, 15>
pub fn polarity( &mut self ) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, POLARITY_A, BitM, 15>
Bit 15 - Comparator 2 polarity selection bit
pub fn winmode(
&mut self
) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, WINMODE_A, BitM, 9>
pub fn winmode( &mut self ) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, WINMODE_A, BitM, 9>
Bit 9 - Windows mode selection bit
pub fn inpsel(
&mut self
) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, INPSEL_A, Unsafe, 2, 7>
pub fn inpsel( &mut self ) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, INPSEL_A, Unsafe, 2, 7>
Bits 7:8 - Comparator 1 input plus selection bit
pub fn inmsel(
&mut self
) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, INMSEL_A, Unsafe, 3, 4>
pub fn inmsel( &mut self ) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, INMSEL_A, Unsafe, 3, 4>
Bits 4:6 - Comparator 2 input minus selection bits
pub fn pwrmode(
&mut self
) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, PWRMODE_A, Safe, 2, 2>
pub fn pwrmode( &mut self ) -> FieldWriterRaw<'_, u32, COMP2_CSR_SPEC, u8, PWRMODE_A, Safe, 2, 2>
Bits 2:3 - Power Mode of the comparator 2
pub fn en(&mut self) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, EN_A, BitM, 0>
pub fn en(&mut self) -> BitWriterRaw<'_, u32, COMP2_CSR_SPEC, EN_A, BitM, 0>
Bit 0 - Comparator 2 enable bit
Methods from Deref<Target = W<COMP2_CSR_SPEC>>§
pub unsafe fn bits(&mut self, bits: <REG as RegisterSpec>::Ux) -> &mut W<REG>
pub unsafe fn bits(&mut self, bits: <REG as RegisterSpec>::Ux) -> &mut W<REG>
Writes raw bits to the register.
Trait Implementations§
§impl From<W<COMP2_CSR_SPEC>> for W
impl From<W<COMP2_CSR_SPEC>> for W
§fn from(writer: W<COMP2_CSR_SPEC>) -> W
fn from(writer: W<COMP2_CSR_SPEC>) -> W
Converts to this type from the input type.
Auto Trait Implementations§
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
Mutably borrows from an owned value. Read more