Struct cortex_m_rt::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> 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>,

§

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>,

§

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.