[][src]Struct probe_rs::architecture::arm::memory::ADIMemoryInterface

pub struct ADIMemoryInterface<AP> where
    AP: CommunicationInterface + APAccess<MemoryAP, CSW> + APAccess<MemoryAP, TAR> + APAccess<MemoryAP, DRW> + DPAccess
{ /* fields omitted */ }

A struct to give access to a targets memory using a certain DAP.

Implementations

impl<'probe> ADIMemoryInterface<ArmCommunicationInterface<'probe>>[src]

pub fn new(
    interface: ArmCommunicationInterface<'probe>,
    access_port_number: impl Into<MemoryAP>,
    only_32bit_data_size: bool
) -> Result<ADIMemoryInterface<ArmCommunicationInterface<'_>>, AccessPortError>
[src]

Creates a new MemoryInterface for given AccessPort.

impl ADIMemoryInterface<MockMemoryAP>[src]

pub fn new(
    mock: MockMemoryAP,
    access_port_number: impl Into<MemoryAP>
) -> ADIMemoryInterface<MockMemoryAP>
[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]

pub fn build_csw_register(data_size: DataSize) -> CSW[src]

Build the correct CSW register for a memory access

Currently, only AMBA AHB Access is supported.

pub fn read_word_32(&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 read_word_8(&mut self, address: u32) -> Result<u8, AccessPortError>[src]

Read an 8bit word at addr.

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

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_8(
    &mut self,
    address: u32,
    data: &mut [u8]
) -> Result<(), AccessPortError>
[src]

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

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 write_word_8(
    &mut self,
    address: u32,
    data: u8
) -> Result<(), AccessPortError>
[src]

Write an 8bit word at addr.

pub fn write_32(
    &mut self,
    start_address: u32,
    data: &[u32]
) -> Result<(), AccessPortError>
[src]

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_8(
    &mut self,
    address: u32,
    data: &[u8]
) -> Result<(), AccessPortError>
[src]

Write a block of 8bit words at addr.

The number of words written is data.len().

pub fn flush(&mut self) -> Result<(), AccessPortError>[src]

Trait Implementations

impl<AP> MemoryInterface for ADIMemoryInterface<AP> where
    AP: CommunicationInterface + APAccess<MemoryAP, CSW> + APAccess<MemoryAP, TAR> + APAccess<MemoryAP, DRW> + DPAccess
[src]

Auto Trait Implementations

impl<AP> RefUnwindSafe for ADIMemoryInterface<AP> where
    AP: RefUnwindSafe

impl<AP> Send for ADIMemoryInterface<AP> where
    AP: Send

impl<AP> Sync for ADIMemoryInterface<AP> where
    AP: Sync

impl<AP> Unpin for ADIMemoryInterface<AP> where
    AP: Unpin

impl<AP> UnwindSafe for ADIMemoryInterface<AP> where
    AP: UnwindSafe

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.