[−][src]Struct probe_rs::probe::MasterProbe
The MasterProbe struct is a generic wrapper over the different probes supported.
Examples
Open the first probe found
The list_all
and from_probe_info
functions can be used
to create a new MasterProbe
::
use probe_rs::probe::MasterProbe; let probe_list = MasterProbe::list_all(); let probe = MasterProbe::from_probe_info(&probe_list[0]);
Methods
impl MasterProbe
[src]
pub fn list_all() -> Vec<DebugProbeInfo>
[src]
Get a list of all debug probes found. This can be used to select the debug probe which should be used.
pub fn from_probe_info(info: &DebugProbeInfo) -> Result<Self, DebugProbeError>
[src]
Create a MasterProbe
from DebugProbeInfo
. Use the
MasterProbe::list_all()
function to get the information
about all probes available.
pub fn from_specific_probe(probe: Box<dyn DebugProbe>) -> Self
[src]
pub fn target_reset(&mut self) -> Result<(), DebugProbeError>
[src]
pub fn read_register_dp(&mut self, offset: u16) -> Result<u32, DebugProbeError>
[src]
pub fn write_register_dp(
&mut self,
offset: u16,
val: u32
) -> Result<(), DebugProbeError>
[src]
&mut self,
offset: u16,
val: u32
) -> Result<(), DebugProbeError>
pub fn nrf_recover(&mut self) -> Result<(), DebugProbeError>
[src]
Tries to mass erase a locked nRF52 chip, this process may timeout, if it does, the chip might be unlocked or not, it is advised to try again if flashing fails
Trait Implementations
impl<REGISTER> APAccess<GenericAP, REGISTER> for MasterProbe where
REGISTER: APRegister<GenericAP>,
[src]
REGISTER: APRegister<GenericAP>,
type Error = DebugProbeError
fn read_ap_register(
&mut self,
port: GenericAP,
register: REGISTER
) -> Result<REGISTER, Self::Error>
[src]
&mut self,
port: GenericAP,
register: REGISTER
) -> Result<REGISTER, Self::Error>
fn write_ap_register(
&mut self,
port: GenericAP,
register: REGISTER
) -> Result<(), Self::Error>
[src]
&mut self,
port: GenericAP,
register: REGISTER
) -> Result<(), Self::Error>
fn write_ap_register_repeated(
&mut self,
port: GenericAP,
register: REGISTER,
values: &[u32]
) -> Result<(), Self::Error>
[src]
&mut self,
port: GenericAP,
register: REGISTER,
values: &[u32]
) -> Result<(), Self::Error>
fn read_ap_register_repeated(
&mut self,
port: GenericAP,
register: REGISTER,
values: &mut [u32]
) -> Result<(), Self::Error>
[src]
&mut self,
port: GenericAP,
register: REGISTER,
values: &mut [u32]
) -> Result<(), Self::Error>
impl<REGISTER> APAccess<MemoryAP, REGISTER> for MasterProbe where
REGISTER: APRegister<MemoryAP>,
[src]
REGISTER: APRegister<MemoryAP>,
type Error = DebugProbeError
fn read_ap_register(
&mut self,
port: MemoryAP,
register: REGISTER
) -> Result<REGISTER, Self::Error>
[src]
&mut self,
port: MemoryAP,
register: REGISTER
) -> Result<REGISTER, Self::Error>
fn write_ap_register(
&mut self,
port: MemoryAP,
register: REGISTER
) -> Result<(), Self::Error>
[src]
&mut self,
port: MemoryAP,
register: REGISTER
) -> Result<(), Self::Error>
fn write_ap_register_repeated(
&mut self,
port: MemoryAP,
register: REGISTER,
values: &[u32]
) -> Result<(), Self::Error>
[src]
&mut self,
port: MemoryAP,
register: REGISTER,
values: &[u32]
) -> Result<(), Self::Error>
fn read_ap_register_repeated(
&mut self,
port: MemoryAP,
register: REGISTER,
values: &mut [u32]
) -> Result<(), Self::Error>
[src]
&mut self,
port: MemoryAP,
register: REGISTER,
values: &mut [u32]
) -> Result<(), Self::Error>
impl MI for MasterProbe
[src]
fn read32(&mut self, address: u32) -> Result<u32, AccessPortError>
[src]
fn read8(&mut self, address: u32) -> Result<u8, AccessPortError>
[src]
fn read_block32(
&mut self,
address: u32,
data: &mut [u32]
) -> Result<(), AccessPortError>
[src]
&mut self,
address: u32,
data: &mut [u32]
) -> Result<(), AccessPortError>
fn read_block8(
&mut self,
address: u32,
data: &mut [u8]
) -> Result<(), AccessPortError>
[src]
&mut self,
address: u32,
data: &mut [u8]
) -> Result<(), AccessPortError>
fn write32(&mut self, addr: u32, data: u32) -> Result<(), AccessPortError>
[src]
fn write8(&mut self, addr: u32, data: u8) -> Result<(), AccessPortError>
[src]
fn write_block32(
&mut self,
addr: u32,
data: &[u32]
) -> Result<(), AccessPortError>
[src]
&mut self,
addr: u32,
data: &[u32]
) -> Result<(), AccessPortError>
fn write_block8(
&mut self,
addr: u32,
data: &[u8]
) -> Result<(), AccessPortError>
[src]
&mut self,
addr: u32,
data: &[u8]
) -> Result<(), AccessPortError>
Auto Trait Implementations
impl !RefUnwindSafe for MasterProbe
impl Send for MasterProbe
impl Sync for MasterProbe
impl Unpin for MasterProbe
impl !UnwindSafe for MasterProbe
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,