[][src]Struct probe_rs::Core

pub struct Core { /* fields omitted */ }

Methods

impl Core[src]

pub fn new(core: impl CoreInterface + 'static) -> Self[src]

pub fn auto_attach(target: impl Into<TargetSelector>) -> Result<Core, Error>[src]

pub fn wait_for_core_halted(&self) -> 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(&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(&self) -> 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(&self) -> Result<(), Error>[src]

pub fn reset(&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(&self) -> Result<CoreInformation, Error>[src]

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

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

Steps one instruction and then enters halted state again.

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

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

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

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

pub fn memory(&self) -> Memory[src]

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

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

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

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

pub fn write_word_32(&self, addr: u32, data: u32) -> Result<(), Error>[src]

pub fn write_word_8(&self, addr: u32, data: u8) -> Result<(), Error>[src]

pub fn write_32(&self, addr: u32, data: &[u32]) -> Result<(), Error>[src]

pub fn write_8(&self, addr: u32, data: &[u8]) -> Result<(), Error>[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]

Trait Implementations

impl MemoryInterface for Core[src]

Auto Trait Implementations

impl !RefUnwindSafe for Core

impl !Send for Core

impl !Sync for Core

impl Unpin for Core

impl !UnwindSafe for Core

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.