[−][src]Struct probe_rs::architecture::arm::memory::ADIMemoryInterface
A struct to give access to a targets memory using a certain DAP.
Methods
impl ADIMemoryInterface<ArmCommunicationInterface>
[src]
pub fn new(
interface: ArmCommunicationInterface,
access_port_number: impl Into<MemoryAP>
) -> Result<Self, AccessPortError>
[src]
interface: ArmCommunicationInterface,
access_port_number: impl Into<MemoryAP>
) -> Result<Self, AccessPortError>
Creates a new MemoryInterface for given AccessPort.
impl ADIMemoryInterface<MockMemoryAP>
[src]
pub fn new(mock: MockMemoryAP, access_port_number: impl Into<MemoryAP>) -> Self
[src]
Creates a new MemoryInterface for given AccessPort.
pub fn mock_memory(&self) -> &[u8]
[src]
impl<AP> ADIMemoryInterface<AP> where
AP: CommunicationInterface + APAccess<MemoryAP, CSW> + APAccess<MemoryAP, TAR> + APAccess<MemoryAP, DRW> + DPAccess,
[src]
AP: CommunicationInterface + APAccess<MemoryAP, CSW> + APAccess<MemoryAP, TAR> + APAccess<MemoryAP, DRW> + DPAccess,
pub fn read32(&mut self, address: u32) -> Result<u32, AccessPortError>
[src]
Read a 32bit word at addr
.
The address where the read should be performed at has to be word aligned.
Returns AccessPortError::MemoryNotAligned
if this does not hold true.
pub fn read8(&mut self, address: u32) -> Result<u8, AccessPortError>
[src]
Read an 8bit word at addr
.
pub fn read_block32(
&mut self,
start_address: u32,
data: &mut [u32]
) -> Result<(), AccessPortError>
[src]
&mut self,
start_address: u32,
data: &mut [u32]
) -> Result<(), AccessPortError>
Read a block of words of the size defined by S at addr
.
The number of words read is data.len()
.
The address where the read should be performed at has to be word aligned.
Returns AccessPortError::MemoryNotAligned
if this does not hold true.
pub fn read_block8(
&mut self,
address: u32,
data: &mut [u8]
) -> Result<(), AccessPortError>
[src]
&mut self,
address: u32,
data: &mut [u8]
) -> Result<(), AccessPortError>
pub fn write32(
&mut self,
address: u32,
data: u32
) -> Result<(), AccessPortError>
[src]
&mut self,
address: u32,
data: u32
) -> Result<(), AccessPortError>
Write a 32bit word at addr
.
The address where the write should be performed at has to be word aligned.
Returns AccessPortError::MemoryNotAligned
if this does not hold true.
pub fn write8(&mut self, address: u32, data: u8) -> Result<(), AccessPortError>
[src]
Write an 8bit word at addr
.
pub fn write_block32(
&mut self,
start_address: u32,
data: &[u32]
) -> Result<(), AccessPortError>
[src]
&mut self,
start_address: u32,
data: &[u32]
) -> Result<(), AccessPortError>
Write a block of 32bit words at addr
.
The number of words written is data.len()
.
The address where the write should be performed at has to be word aligned.
Returns AccessPortError::MemoryNotAligned
if this does not hold true.
pub fn write_block8(
&mut self,
address: u32,
data: &[u8]
) -> Result<(), AccessPortError>
[src]
&mut self,
address: u32,
data: &[u8]
) -> Result<(), AccessPortError>
Write a block of 8bit words at addr
.
The number of words written is data.len()
.
Trait Implementations
impl<AP> MemoryInterface for ADIMemoryInterface<AP> where
AP: CommunicationInterface + APAccess<MemoryAP, CSW> + APAccess<MemoryAP, TAR> + APAccess<MemoryAP, DRW> + DPAccess,
[src]
AP: CommunicationInterface + APAccess<MemoryAP, CSW> + APAccess<MemoryAP, TAR> + APAccess<MemoryAP, DRW> + DPAccess,
fn read32(&mut self, address: u32) -> Result<u32, Error>
[src]
fn read8(&mut self, address: u32) -> Result<u8, Error>
[src]
fn read_block32(&mut self, address: u32, data: &mut [u32]) -> Result<(), Error>
[src]
fn read_block8(&mut self, address: u32, data: &mut [u8]) -> Result<(), Error>
[src]
fn write32(&mut self, address: u32, data: u32) -> Result<(), Error>
[src]
fn write8(&mut self, address: u32, data: u8) -> Result<(), Error>
[src]
fn write_block32(&mut self, address: u32, data: &[u32]) -> Result<(), Error>
[src]
fn write_block8(&mut self, address: u32, data: &[u8]) -> Result<(), Error>
[src]
Auto Trait Implementations
impl<AP> RefUnwindSafe for ADIMemoryInterface<AP> where
AP: RefUnwindSafe,
AP: RefUnwindSafe,
impl<AP> Send for ADIMemoryInterface<AP> where
AP: Send,
AP: Send,
impl<AP> Sync for ADIMemoryInterface<AP> where
AP: Sync,
AP: Sync,
impl<AP> Unpin for ADIMemoryInterface<AP> where
AP: Unpin,
AP: Unpin,
impl<AP> UnwindSafe for ADIMemoryInterface<AP> where
AP: UnwindSafe,
AP: UnwindSafe,
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>,