Struct rstubs::arch::pit::Ctrl

source ·
#[repr(transparent)]
struct Ctrl(u8);
Expand description

Timer control register

Tuple Fields§

§0: u8

Implementations§

source§

impl Ctrl

source

const fn new() -> Self

Creates a new default initialized bitfield.

source

const ENABLE_TIMER_COUNTER2_BITS: usize = 1usize

source

const ENABLE_TIMER_COUNTER2_OFFSET: usize = 0usize

source

const fn with_enable_timer_counter2(self, value: bool) -> Self

Enable the timer

Bits: 0..1

source

const fn enable_timer_counter2(&self) -> bool

Enable the timer

Bits: 0..1

source

fn set_enable_timer_counter2(&mut self, value: bool)

Enable the timer

Bits: 0..1

source

const ENABLE_SPEAKER_DATA_BITS: usize = 1usize

source

const ENABLE_SPEAKER_DATA_OFFSET: usize = 1usize

source

const fn with_enable_speaker_data(self, value: bool) -> Self

If set, speaker output is equal to status_timer_counter2

Bits: 1..2

source

const fn enable_speaker_data(&self) -> bool

If set, speaker output is equal to status_timer_counter2

Bits: 1..2

source

fn set_enable_speaker_data(&mut self, value: bool)

If set, speaker output is equal to status_timer_counter2

Bits: 1..2

source

const REFRESH_CYCLE_TOGGLE_BITS: usize = 1usize

source

const REFRESH_CYCLE_TOGGLE_OFFSET: usize = 4usize

source

const fn with_refresh_cycle_toggle(self, value: bool) -> Self

Must be zero on write

Bits: 4..5

source

const fn refresh_cycle_toggle(&self) -> bool

Must be zero on write

Bits: 4..5

source

fn set_refresh_cycle_toggle(&mut self, value: bool)

Must be zero on write

Bits: 4..5

source

const STATUS_TIMER_COUNTER2_BITS: usize = 1usize

source

const STATUS_TIMER_COUNTER2_OFFSET: usize = 5usize

source

const fn with_status_timer_counter2(self, value: bool) -> Self

Will be set on timer expiration; must be 0 on write

Bits: 5..6

source

const fn status_timer_counter2(&self) -> bool

Will be set on timer expiration; must be 0 on write

Bits: 5..6

source

fn set_status_timer_counter2(&mut self, value: bool)

Will be set on timer expiration; must be 0 on write

Bits: 5..6

source

const STATUS_IOCHK_NMI_SOURCE_BITS: usize = 1usize

source

const STATUS_IOCHK_NMI_SOURCE_OFFSET: usize = 6usize

source

const fn with_status_iochk_nmi_source(self, value: bool) -> Self

Not important, must be 0 on write

Bits: 6..7

source

const fn status_iochk_nmi_source(&self) -> bool

Not important, must be 0 on write

Bits: 6..7

source

fn set_status_iochk_nmi_source(&mut self, value: bool)

Not important, must be 0 on write

Bits: 6..7

source

const STATUS_SERR_NMI_SOURCE_BITS: usize = 1usize

source

const STATUS_SERR_NMI_SOURCE_OFFSET: usize = 7usize

source

const fn with_status_serr_nmi_source(self, value: bool) -> Self

Not important, must be 0 on write

Bits: 7..8

source

const fn status_serr_nmi_source(&self) -> bool

Not important, must be 0 on write

Bits: 7..8

source

fn set_status_serr_nmi_source(&mut self, value: bool)

Not important, must be 0 on write

Bits: 7..8

Trait Implementations§

source§

impl Clone for Ctrl

source§

fn clone(&self) -> Ctrl

Returns a copy of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Ctrl

source§

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

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

impl Default for Ctrl

source§

fn default() -> Self

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

impl From<Ctrl> for u8

source§

fn from(v: Ctrl) -> u8

Converts to this type from the input type.
source§

impl From<u8> for Ctrl

source§

fn from(v: u8) -> Self

Converts to this type from the input type.
source§

impl PortValue for Ctrl

§

type I = u8

The underlying raw integer type, which can be [u8], [u16], or [u32].
source§

impl Copy for Ctrl

Auto Trait Implementations§

§

impl RefUnwindSafe for Ctrl

§

impl Send for Ctrl

§

impl Sync for Ctrl

§

impl Unpin for Ctrl

§

impl UnwindSafe for Ctrl

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

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

Performs the conversion.