Struct M0State

Source
#[repr(C)]
pub struct M0State { pub requested_mode: u16, pub request_flag: u16, pub active_mode: u32, pub m0_count: u32, pub m4_count: u32, pub num_shortfalls: u32, pub longest_shortfall: u32, pub shortfall_limit: u32, pub threshold: u32, pub next_mode: u32, pub error: u32, }
Expand description

Internal state data of the Cortex M0 sub-processor.

This can be retrieved with Debug::get_m0_state.

The best use of this struct is that it will show any shortfalls that occurred during the last TX/RX/Sweep operation, i.e. a TX underrun or RX overrun.

Fields§

§requested_mode: u16

Requested Mode. Possible values are: 0(IDLE), 1(WAIT), 2(RX), 3(TX_START), 4(TX_RUN)

§request_flag: u16

Request flag, 0 means request is completed, any other value means request is pending

§active_mode: u32

Active mode. Possible values are: 0(IDLE), 1(WAIT), 2(RX), 3(TX_START), 4(TX_RUN)

§m0_count: u32

Number of bytes transferred by M0

§m4_count: u32

Number of bytes transferred by M4

§num_shortfalls: u32

Number of shortfalls

§longest_shortfall: u32

Longest shortfall in bytes

§shortfall_limit: u32

Shortfall limit in bytes

§threshold: u32

Threshold m0_count value in bytes for next mode change

§next_mode: u32

Mode which will be switched to when threshold is reached.

§error: u32

Error, if any, that caused M0 to revert to IDLE mode. Possible values are: 0 (NONE), 1 (RX_TIMEOUT), 2 (TX_TIMEOUT), or 3 (MISSED_DEADLINE)

Trait Implementations§

Source§

impl Clone for M0State

Source§

fn clone(&self) -> M0State

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for M0State

Source§

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

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

impl Zeroable for M0State

Source§

fn zeroed() -> Self

Source§

impl Copy for M0State

Source§

impl Pod for M0State

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> CheckedBitPattern for T
where T: AnyBitPattern,

Source§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
Source§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> AnyBitPattern for T
where T: Pod,

Source§

impl<T> NoUninit for T
where T: Pod,