pub trait RiscvInterfaceBuilder<'probe> {
// Required methods
fn create_state(&self) -> RiscvDebugInterfaceState;
fn attach<'state>(
self: Box<Self>,
state: &'state mut RiscvDebugInterfaceState,
) -> Result<RiscvCommunicationInterface<'state>, DebugProbeError>
where 'probe: 'state;
// Provided methods
fn attach_tunneled<'state>(
self: Box<Self>,
_tunnel_ir_id: u32,
_tunnel_ir_width: u32,
_state: &'state mut RiscvDebugInterfaceState,
) -> Result<RiscvCommunicationInterface<'state>, DebugProbeError>
where 'probe: 'state { ... }
fn attach_auto<'state>(
self: Box<Self>,
target: &Target,
state: &'state mut RiscvDebugInterfaceState,
) -> Result<RiscvCommunicationInterface<'state>, DebugProbeError>
where 'probe: 'state { ... }
}
Expand description
A single-use factory for creating RISC-V communication interfaces and their states.
Required Methods§
Sourcefn create_state(&self) -> RiscvDebugInterfaceState
fn create_state(&self) -> RiscvDebugInterfaceState
Creates a new RISC-V communication interface state object.
The state object needs to be stored separately from the communication interface and can be used to restore the state of the interface at a later time.
Sourcefn attach<'state>(
self: Box<Self>,
state: &'state mut RiscvDebugInterfaceState,
) -> Result<RiscvCommunicationInterface<'state>, DebugProbeError>where
'probe: 'state,
fn attach<'state>(
self: Box<Self>,
state: &'state mut RiscvDebugInterfaceState,
) -> Result<RiscvCommunicationInterface<'state>, DebugProbeError>where
'probe: 'state,
Consumes the factory and creates a communication interface object initialised with the given state.
Provided Methods§
Sourcefn attach_tunneled<'state>(
self: Box<Self>,
_tunnel_ir_id: u32,
_tunnel_ir_width: u32,
_state: &'state mut RiscvDebugInterfaceState,
) -> Result<RiscvCommunicationInterface<'state>, DebugProbeError>where
'probe: 'state,
fn attach_tunneled<'state>(
self: Box<Self>,
_tunnel_ir_id: u32,
_tunnel_ir_width: u32,
_state: &'state mut RiscvDebugInterfaceState,
) -> Result<RiscvCommunicationInterface<'state>, DebugProbeError>where
'probe: 'state,
Consumes the factory and creates a communication interface object using a JTAG tunnel initialised with the given state.
Sourcefn attach_auto<'state>(
self: Box<Self>,
target: &Target,
state: &'state mut RiscvDebugInterfaceState,
) -> Result<RiscvCommunicationInterface<'state>, DebugProbeError>where
'probe: 'state,
fn attach_auto<'state>(
self: Box<Self>,
target: &Target,
state: &'state mut RiscvDebugInterfaceState,
) -> Result<RiscvCommunicationInterface<'state>, DebugProbeError>where
'probe: 'state,
Consumes the factory and creates a communication interface object initialised with the given state.
Automatically determines whether to use JTAG tunneling or not from the target.