#[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: u16Requested Mode. Possible values are: 0(IDLE), 1(WAIT), 2(RX), 3(TX_START), 4(TX_RUN)
request_flag: u16Request flag, 0 means request is completed, any other value means request is pending
active_mode: u32Active mode. Possible values are: 0(IDLE), 1(WAIT), 2(RX), 3(TX_START), 4(TX_RUN)
m0_count: u32Number of bytes transferred by M0
m4_count: u32Number of bytes transferred by M4
num_shortfalls: u32Number of shortfalls
longest_shortfall: u32Longest shortfall in bytes
shortfall_limit: u32Shortfall limit in bytes
threshold: u32Threshold m0_count value in bytes for next mode change
next_mode: u32Mode which will be switched to when threshold is reached.
error: u32Error, 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§
impl Copy for M0State
impl Pod for M0State
Auto Trait Implementations§
impl Freeze for M0State
impl RefUnwindSafe for M0State
impl Send for M0State
impl Sync for M0State
impl Unpin for M0State
impl UnwindSafe for M0State
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
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
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.