stm32-metapac

Crates

git

Versions

stm32wb06cc

Flavors

Ctrl

Struct Ctrl 

#[repr(transparent)]
pub struct Ctrl(pub u32);
Expand description

CTRL register.

Tuple Fields§

§0: u32

Implementations§

§

impl Ctrl

pub const fn adc_on_off(&self) -> bool

ADC_ON_OFF: 0: power off the ADC 1: power on the ADC.

pub fn set_adc_on_off(&mut self, val: bool)

ADC_ON_OFF: 0: power off the ADC 1: power on the ADC.

pub const fn start_con(&self) -> bool

generate a start pulse to initiate an ADC conversion.

pub fn set_start_con(&mut self, val: bool)

generate a start pulse to initiate an ADC conversion.

pub const fn start_conv(&self) -> bool

START_CONV (1): generate a start pulse to initiate an ADC conversion: 0: no effect 1: start the ADC conversion Note: this bit is set by software and cleared by hardware.

pub fn set_start_conv(&mut self, val: bool)

START_CONV (1): generate a start pulse to initiate an ADC conversion: 0: no effect 1: start the ADC conversion Note: this bit is set by software and cleared by hardware.

pub const fn stop_op_mod(&self) -> bool

stop the on-going OP_MODE (ADC mode, Analog audio mode, Full.

pub fn set_stop_op_mod(&mut self, val: bool)

stop the on-going OP_MODE (ADC mode, Analog audio mode, Full.

pub const fn stop_op_mode(&self) -> bool

STOP_OP_MODE (1): stop the on-going OP_MODE (ADC mode, Analog audio mode, Full mode): 0: no effect 1: stop on-going ADC mode Note: this bit is set by software and cleared by hardware. When setting the STOP_MODE_OP, the user has to wait around 10 us before to start a new ADC conversion by setting the START_CONV bit.

pub fn set_stop_op_mode(&mut self, val: bool)

STOP_OP_MODE (1): stop the on-going OP_MODE (ADC mode, Analog audio mode, Full mode): 0: no effect 1: stop on-going ADC mode Note: this bit is set by software and cleared by hardware. When setting the STOP_MODE_OP, the user has to wait around 10 us before to start a new ADC conversion by setting the START_CONV bit.

pub const fn dig_aud_mode(&self) -> bool

enable the digital audio mode (the data path uses. the decimation filter).

pub fn set_dig_aud_mode(&mut self, val: bool)

enable the digital audio mode (the data path uses. the decimation filter).

pub const fn test_mode(&self) -> bool

TEST_MODE: select the functional or the test mode of the ADC: 0: functional mode (one of the four main functional modes is used) 1: test mode (for debug, test, calibration).

pub fn set_test_mode(&mut self, val: bool)

TEST_MODE: select the functional or the test mode of the ADC: 0: functional mode (one of the four main functional modes is used) 1: test mode (for debug, test, calibration).

pub const fn adc_ldo_ena(&self) -> bool

ADC_LDO_ENA: enable the LDO associated to the ADC block: 0: disable the ADC LDO 1: enable the ADC LDO.

pub fn set_adc_ldo_ena(&mut self, val: bool)

ADC_LDO_ENA: enable the LDO associated to the ADC block: 0: disable the ADC LDO 1: enable the ADC LDO.

Trait Implementations§

§

impl Clone for Ctrl

§

fn clone(&self) -> Ctrl

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Ctrl

§

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

Formats the value using the given formatter. Read more
§

impl Default for Ctrl

§

fn default() -> Ctrl

Returns the “default value” for a type. Read more
§

impl PartialEq for Ctrl

§

fn eq(&self, other: &Ctrl) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Copy for Ctrl

§

impl Eq for Ctrl

§

impl StructuralPartialEq for Ctrl

Auto Trait Implementations§

§

impl Freeze for Ctrl

§

impl RefUnwindSafe for Ctrl

§

impl Send for Ctrl

§

impl Sync for Ctrl

§

impl Unpin for Ctrl

§

impl UnwindSafe for Ctrl

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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>,

Source§

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>,

Source§

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.