CascadeControl

Struct CascadeControl 

Source
#[repr(C)]
pub struct CascadeControl { /* private fields */ }

Implementations§

Source§

impl CascadeControl

Source

pub const ZERO: Self

Creates a new instance with a raw value of 0. Equivalent to [Self::new_with_raw_value(0)].

Source

pub const DEFAULT: Self

An instance that uses the default value 0x0

Source

pub const fn new() -> Self

👎Deprecated: Use CascadeControl::Default (or CascadeControl::DEFAULT in const context) instead

Creates a new instance of this struct using the default value

Source

pub const fn raw_value(&self) -> u32

Returns the underlying raw value of this bitfield

Source

pub const fn new_with_raw_value(value: u32) -> CascadeControl

Creates a new instance of this bitfield with the given raw value.

No checks are performed on the value, so it is possible to set bits that don’t have any accessors specified.

Source

pub const fn builder() -> PartialCascadeControl<0>

Creates a builder for this bitfield which ensures that all writable fields are initialized

Source

pub const fn trigger2(&self) -> bool

The counter is automatically disabled if the corresponding Cascade 2 level-sensitive input souce is active when the count reaches 0. If the counter is not 0, the cascade control is ignored.

Source

pub const fn with_trigger2(&self, field_value: bool) -> Self

The counter is automatically disabled if the corresponding Cascade 2 level-sensitive input souce is active when the count reaches 0. If the counter is not 0, the cascade control is ignored.

Source

pub fn set_trigger2(&mut self, field_value: bool)

The counter is automatically disabled if the corresponding Cascade 2 level-sensitive input souce is active when the count reaches 0. If the counter is not 0, the cascade control is ignored.

Source

pub const fn inv2(&self) -> CascadeInvert

Source

pub const fn with_inv2(&self, field_value: CascadeInvert) -> Self

Source

pub fn set_inv2(&mut self, field_value: CascadeInvert)

Source

pub const fn en2(&self) -> bool

Enable Cascade 2 signal active as a requirement to stop counting. This mode is similar to the REQ_STOP control bit, but signalled by a Cascade source.

Source

pub const fn with_en2(&self, field_value: bool) -> Self

Enable Cascade 2 signal active as a requirement to stop counting. This mode is similar to the REQ_STOP control bit, but signalled by a Cascade source.

Source

pub fn set_en2(&mut self, field_value: bool)

Enable Cascade 2 signal active as a requirement to stop counting. This mode is similar to the REQ_STOP control bit, but signalled by a Cascade source.

Source

pub const fn trigger1(&self) -> bool

Same as the trigger field for Cascade 0.

Source

pub const fn with_trigger1(&self, field_value: bool) -> Self

Same as the trigger field for Cascade 0.

Source

pub fn set_trigger1(&mut self, field_value: bool)

Same as the trigger field for Cascade 0.

Source

pub const fn trigger0(&self) -> bool

Enable trigger mode for Cascade 0. In trigger mode, couting will start with the selected cascade signal active, but once the counter is active, cascade control will be ignored.

Source

pub const fn with_trigger0(&self, field_value: bool) -> Self

Enable trigger mode for Cascade 0. In trigger mode, couting will start with the selected cascade signal active, but once the counter is active, cascade control will be ignored.

Source

pub fn set_trigger0(&mut self, field_value: bool)

Enable trigger mode for Cascade 0. In trigger mode, couting will start with the selected cascade signal active, but once the counter is active, cascade control will be ignored.

Source

pub const fn dual_cascade_op(&self) -> DualCascadeOp

Specify required operation if both Cascade 0 and Cascade 1 are active. 0 is a logical AND of both cascade signals, 1 is a logical OR.

Source

pub const fn with_dual_cascade_op(&self, field_value: DualCascadeOp) -> Self

Specify required operation if both Cascade 0 and Cascade 1 are active. 0 is a logical AND of both cascade signals, 1 is a logical OR.

Source

pub fn set_dual_cascade_op(&mut self, field_value: DualCascadeOp)

Specify required operation if both Cascade 0 and Cascade 1 are active. 0 is a logical AND of both cascade signals, 1 is a logical OR.

Source

pub const fn inv1(&self) -> CascadeInvert

Inversion bit for Cascade 1

Source

pub const fn with_inv1(&self, field_value: CascadeInvert) -> Self

Inversion bit for Cascade 1

Source

pub fn set_inv1(&mut self, field_value: CascadeInvert)

Inversion bit for Cascade 1

Source

pub const fn en1(&self) -> bool

Enable Cascade 1 signal active as a requirement for counting.

Source

pub const fn with_en1(&self, field_value: bool) -> Self

Enable Cascade 1 signal active as a requirement for counting.

Source

pub fn set_en1(&mut self, field_value: bool)

Enable Cascade 1 signal active as a requirement for counting.

Source

pub const fn inv0(&self) -> CascadeInvert

Inversion bit for Cascade 0.

Source

pub const fn with_inv0(&self, field_value: CascadeInvert) -> Self

Inversion bit for Cascade 0.

Source

pub fn set_inv0(&mut self, field_value: CascadeInvert)

Inversion bit for Cascade 0.

Source

pub const fn en0(&self) -> bool

Enable Cascade 0 signal active as a requirement for counting.

Source

pub const fn with_en0(&self, field_value: bool) -> Self

Enable Cascade 0 signal active as a requirement for counting.

Source

pub fn set_en0(&mut self, field_value: bool)

Enable Cascade 0 signal active as a requirement for counting.

Trait Implementations§

Source§

impl Clone for CascadeControl

Source§

fn clone(&self) -> CascadeControl

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
Source§

impl Debug for CascadeControl

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for CascadeControl

Source§

fn default() -> Self

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

impl Format for CascadeControl

Source§

fn format(&self, fmt: Formatter<'_>)

Writes the defmt representation of self to fmt.
Source§

impl Copy for CascadeControl

Auto Trait Implementations§

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.