[][src]Struct probe_rs::Core

pub struct Core<'probe> { /* fields omitted */ }

Implementations

impl<'probe> Core<'probe>[src]

pub fn new(
    core: impl CoreInterface + 'probe,
    state: &'probe mut CoreState
) -> Core<'probe>
[src]

pub fn create_state(id: usize) -> CoreState[src]

pub fn id(&self) -> usize[src]

pub fn wait_for_core_halted(&mut self, timeout: Duration) -> Result<(), Error>[src]

Wait until the core is halted. If the core does not halt on its own, a DebugProbeError::Timeout error will be returned.

pub fn core_halted(&mut self) -> Result<bool, Error>[src]

Check if the core is halted. If the core does not halt on its own, a CoreError::Timeout error will be returned.

pub fn halt(&mut self, timeout: Duration) -> Result<CoreInformation, Error>[src]

Try to halt the core. This function ensures the core is actually halted, and returns a CoreError::Timeout otherwise.

pub fn run(&mut self) -> Result<(), Error>[src]

pub fn reset(&mut self) -> Result<(), Error>[src]

Reset the core, and then continue to execute instructions. If the core should be halted after reset, use the reset_and_halt function.

pub fn reset_and_halt(
    &mut self,
    timeout: Duration
) -> Result<CoreInformation, Error>
[src]

Reset the core, and then immediately halt. To continue execution after reset, use the reset function.

pub fn step(&mut self) -> Result<CoreInformation, Error>[src]

Steps one instruction and then enters halted state again.

pub fn status(&mut self) -> Result<CoreStatus, Error>[src]

pub fn read_core_reg(
    &mut self,
    address: impl Into<CoreRegisterAddress>
) -> Result<u32, Error>
[src]

pub fn write_core_reg(
    &mut self,
    address: CoreRegisterAddress,
    value: u32
) -> Result<(), Error>
[src]

pub fn get_available_breakpoint_units(&mut self) -> Result<u32, Error>[src]

pub fn registers(&self) -> &'static RegisterFile[src]

pub fn set_hw_breakpoint(&mut self, address: u32) -> Result<(), Error>[src]

Set a hardware breakpoint

This function will try to set a hardware breakpoint. The amount of hardware breakpoints which are supported is chip specific, and can be queried using the get_available_breakpoint_units function.

pub fn clear_hw_breakpoint(&mut self, address: u32) -> Result<(), Error>[src]

pub fn clear_all_hw_breakpoints(&mut self) -> Result<(), Error>[src]

pub fn architecture(&self) -> Architecture[src]

Trait Implementations

impl<'probe> MemoryInterface for Core<'probe>[src]

Auto Trait Implementations

impl<'probe> !RefUnwindSafe for Core<'probe>

impl<'probe> !Send for Core<'probe>

impl<'probe> !Sync for Core<'probe>

impl<'probe> Unpin for Core<'probe>

impl<'probe> !UnwindSafe for Core<'probe>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.