Type Alias R

Source
pub type R = R<COMP2_CSRrs>;
Expand description

Register COMP2_CSR reader

Aliased Type§

pub struct R { /* private fields */ }

Implementations§

Source§

impl R

Source

pub fn en(&self) -> EN_R

Bit 0 - Comparator 2 enable bit This bit is controlled by software (if not locked). It enables the comparator 2:

Source

pub fn inmsel(&self) -> INMSEL_R

Bits 4:7 - Comparator 2 signal selector for inverting input INM This bitfield is controlled by software (if not locked). It selects the signal for the inverting input COMP2_INM of the comparator 2: > 1000: 1/4 VREFINT

Source

pub fn inpsel(&self) -> INPSEL_R

Bits 8:9 - Comparator 2 signal selector for non-inverting input This bitfield is controlled by software (if not locked). It selects the signal for the non-inverting input COMP2_INP of the comparator 2 (also see the WINMODE bit):

Source

pub fn winmode(&self) -> WINMODE_R

Bit 11 - Comparator 2 non-inverting input selector for window mode This bit is controlled by software (if not locked). It selects the signal for COMP2_INP input of the comparator 2:

Source

pub fn winout(&self) -> WINOUT_R

Bit 14 - Comparator 2 output selector This bit is controlled by software (if not locked). It selects the comparator 2 output:

Source

pub fn polarity(&self) -> POLARITY_R

Bit 15 - Comparator 2 polarity selector This bit is controlled by software (if not locked). It selects the comparator 2 output polarity:

Source

pub fn hyst(&self) -> HYST_R

Bits 16:17 - Comparator 2 hysteresis selector This bitfield is controlled by software (if not locked). It selects the hysteresis of the comparator 2:

Source

pub fn pwrmode(&self) -> PWRMODE_R

Bits 18:19 - Comparator 2 power mode selector This bitfield is controlled by software (if not locked). It selects the power consumption and as a consequence the speed of the comparator 2: others: Reserved

Source

pub fn blanksel(&self) -> BLANKSEL_R

Bits 20:24 - Comparator 2 blanking source selector This bitfield is controlled by software (if not locked). It selects the blanking source: xxxx1: TIM1 OC4 xxx1x: TIM1 OC5 xx1xx: TIM2 OC3 x1xxx: TIM3 OC3 1xxxx: TIM15 OC2

Source

pub fn value(&self) -> VALUE_R

Bit 30 - Comparator 2 output status This bit is read-only. It reflects the level of the comparator 2 output after the polarity selector and blanking, as indicated in .

Source

pub fn lock(&self) -> LOCK_R

Bit 31 - COMP2_CSR register lock This bit is set by software and cleared by a system reset. It locks the whole content of the comparator 2 control register COMP2_CSR[31:0]:

Trait Implementations§

Source§

impl Debug for R

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more