cortex_m_rt

Struct ExceptionFrame

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

Registers stacked (pushed onto the stack) during an exception.

Implementations§

Source§

impl ExceptionFrame

Source

pub fn r0(&self) -> u32

Returns the value of (general purpose) register 0.

Source

pub fn r1(&self) -> u32

Returns the value of (general purpose) register 1.

Source

pub fn r2(&self) -> u32

Returns the value of (general purpose) register 2.

Source

pub fn r3(&self) -> u32

Returns the value of (general purpose) register 3.

Source

pub fn r12(&self) -> u32

Returns the value of (general purpose) register 12.

Source

pub fn lr(&self) -> u32

Returns the value of the Link Register.

Source

pub fn pc(&self) -> u32

Returns the value of the Program Counter.

Source

pub fn xpsr(&self) -> u32

Returns the value of the Program Status Register.

Source

pub unsafe fn set_r0(&mut self, value: u32)

Sets the stacked value of (general purpose) register 0.

§Safety

This affects the r0 register of the preempted code, which must not rely on it getting restored to its previous value.

Source

pub unsafe fn set_r1(&mut self, value: u32)

Sets the stacked value of (general purpose) register 1.

§Safety

This affects the r1 register of the preempted code, which must not rely on it getting restored to its previous value.

Source

pub unsafe fn set_r2(&mut self, value: u32)

Sets the stacked value of (general purpose) register 2.

§Safety

This affects the r2 register of the preempted code, which must not rely on it getting restored to its previous value.

Source

pub unsafe fn set_r3(&mut self, value: u32)

Sets the stacked value of (general purpose) register 3.

§Safety

This affects the r3 register of the preempted code, which must not rely on it getting restored to its previous value.

Source

pub unsafe fn set_r12(&mut self, value: u32)

Sets the stacked value of (general purpose) register 12.

§Safety

This affects the r12 register of the preempted code, which must not rely on it getting restored to its previous value.

Source

pub unsafe fn set_lr(&mut self, value: u32)

Sets the stacked value of the Link Register.

§Safety

This affects the lr register of the preempted code, which must not rely on it getting restored to its previous value.

Source

pub unsafe fn set_pc(&mut self, value: u32)

Sets the stacked value of the Program Counter.

§Safety

This affects the pc register of the preempted code, which must not rely on it getting restored to its previous value.

Source

pub unsafe fn set_xpsr(&mut self, value: u32)

Sets the stacked value of the Program Status Register.

§Safety

This affects the xPSR registers (IPSR, APSR, and EPSR) of the preempted code, which must not rely on them getting restored to their previous value.

Trait Implementations§

Source§

impl Clone for ExceptionFrame

Source§

fn clone(&self) -> ExceptionFrame

Returns a copy 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 ExceptionFrame

Source§

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

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

impl Copy for ExceptionFrame

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, dst: *mut T)

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