Struct probe_rs::architecture::riscv::communication_interface::RiscvCommunicationInterface
source · [−]pub struct RiscvCommunicationInterface { /* private fields */ }
Expand description
A interface that implements controls for RISC-V cores.
Implementations
sourceimpl RiscvCommunicationInterface
impl RiscvCommunicationInterface
sourcepub fn new(
probe: Box<dyn JTAGAccess>
) -> Result<Self, (Box<dyn JTAGAccess>, DebugProbeError)>
pub fn new(
probe: Box<dyn JTAGAccess>
) -> Result<Self, (Box<dyn JTAGAccess>, DebugProbeError)>
Creates a new RISC-V communication interface with a given probe driver.
sourcepub fn target_reset_deassert(&mut self) -> Result<(), DebugProbeError>
pub fn target_reset_deassert(&mut self) -> Result<(), DebugProbeError>
Deassert the target reset.
sourcepub fn read_idcode(&mut self) -> Result<u32, DebugProbeError>
pub fn read_idcode(&mut self) -> Result<u32, DebugProbeError>
Read the targets IDCODE.
sourcepub fn read_csr_progbuf(&mut self, address: u16) -> Result<u32, RiscvError>
pub fn read_csr_progbuf(&mut self, address: u16) -> Result<u32, RiscvError>
Read the CSR progbuf register.
sourcepub fn write_csr_progbuf(
&mut self,
address: u16,
value: u32
) -> Result<(), RiscvError>
pub fn write_csr_progbuf(
&mut self,
address: u16,
value: u32
) -> Result<(), RiscvError>
Write the CSR progbuf register.
Trait Implementations
sourceimpl Debug for RiscvCommunicationInterface
impl Debug for RiscvCommunicationInterface
sourceimpl MemoryInterface for RiscvCommunicationInterface
impl MemoryInterface for RiscvCommunicationInterface
sourcefn read_8(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
fn read_8(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
Read 8-bit values from target memory.
sourcefn supports_native_64bit_access(&mut self) -> bool
fn supports_native_64bit_access(&mut self) -> bool
Does this interface support native 64-bit wide accesses Read more
sourcefn read_word_64(&mut self, address: u64) -> Result<u64, Error>
fn read_word_64(&mut self, address: u64) -> Result<u64, Error>
Read a 64bit word of at address
. Read more
sourcefn read_word_32(&mut self, address: u64) -> Result<u32, Error>
fn read_word_32(&mut self, address: u64) -> Result<u32, Error>
Read a 32bit word of at address
. Read more
sourcefn read_64(&mut self, address: u64, data: &mut [u64]) -> Result<(), Error>
fn read_64(&mut self, address: u64, data: &mut [u64]) -> Result<(), Error>
Read a block of 64bit words at address
. Read more
sourcefn read_32(&mut self, address: u64, data: &mut [u32]) -> Result<(), Error>
fn read_32(&mut self, address: u64, data: &mut [u32]) -> Result<(), Error>
Read a block of 32bit words at address
. Read more
sourcefn write_word_64(&mut self, address: u64, data: u64) -> Result<(), Error>
fn write_word_64(&mut self, address: u64, data: u64) -> Result<(), Error>
Write a 64bit word at address
. Read more
sourcefn write_word_32(&mut self, address: u64, data: u32) -> Result<(), Error>
fn write_word_32(&mut self, address: u64, data: u32) -> Result<(), Error>
Write a 32bit word at address
. Read more
sourcefn write_word_8(&mut self, address: u64, data: u8) -> Result<(), Error>
fn write_word_8(&mut self, address: u64, data: u8) -> Result<(), Error>
Write an 8bit word at address
.
sourcefn write_64(&mut self, address: u64, data: &[u64]) -> Result<(), Error>
fn write_64(&mut self, address: u64, data: &[u64]) -> Result<(), Error>
Write a block of 64bit words at address
. Read more
sourcefn write_32(&mut self, address: u64, data: &[u32]) -> Result<(), Error>
fn write_32(&mut self, address: u64, data: &[u32]) -> Result<(), Error>
Write a block of 32bit words at address
. Read more
sourcefn write_8(&mut self, address: u64, data: &[u8]) -> Result<(), Error>
fn write_8(&mut self, address: u64, data: &[u8]) -> Result<(), Error>
Write a block of 8bit words at address
.
sourcefn read_mem_64bit(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
fn read_mem_64bit(&mut self, address: u64, data: &mut [u8]) -> Result<(), Error>
Reads bytes using 64 bit memory access. Address must be 64 bit aligned and data must be an exact multiple of 8. Read more
Auto Trait Implementations
impl !RefUnwindSafe for RiscvCommunicationInterface
impl Send for RiscvCommunicationInterface
impl !Sync for RiscvCommunicationInterface
impl Unpin for RiscvCommunicationInterface
impl !UnwindSafe for RiscvCommunicationInterface
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more