Trait opentitanlib::transport::Transport
source · pub trait Transport {
Show 14 methods
// Required method
fn capabilities(&self) -> Result<Capabilities>;
// Provided methods
fn apply_default_configuration(&self) -> Result<()> { ... }
fn jtag(&self, _opts: &JtagParams) -> Result<Box<dyn JtagChain + '_>> { ... }
fn spi(&self, _instance: &str) -> Result<Rc<dyn Target>> { ... }
fn i2c(&self, _instance: &str) -> Result<Rc<dyn Bus>> { ... }
fn uart(&self, _instance: &str) -> Result<Rc<dyn Uart>> { ... }
fn gpio_pin(&self, _instance: &str) -> Result<Rc<dyn GpioPin>> { ... }
fn gpio_monitoring(&self) -> Result<Rc<dyn GpioMonitoring>> { ... }
fn gpio_bitbanging(&self) -> Result<Rc<dyn GpioBitbanging>> { ... }
fn emulator(&self) -> Result<Rc<dyn Emulator>> { ... }
fn proxy_ops(&self) -> Result<Rc<dyn ProxyOps>> { ... }
fn dispatch(&self, _action: &dyn Any) -> Result<Option<Box<dyn Annotate>>> { ... }
fn maintain_connection(&self) -> Result<Rc<dyn MaintainConnection>> { ... }
fn nonblocking_help(&self) -> Result<Rc<dyn NonblockingHelp>> { ... }
}
Expand description
A transport object is a factory for the low-level interfaces provided by a given communications backend.
Required Methods§
sourcefn capabilities(&self) -> Result<Capabilities>
fn capabilities(&self) -> Result<Capabilities>
Returns a Capabilities
object to check the capabilities of this
transport object.
Provided Methods§
sourcefn apply_default_configuration(&self) -> Result<()>
fn apply_default_configuration(&self) -> Result<()>
Resets the transport to power-on condition. That is, pin/uart/spi configuration reverts to default, ongoing operations are cancelled, etc.
sourcefn jtag(&self, _opts: &JtagParams) -> Result<Box<dyn JtagChain + '_>>
fn jtag(&self, _opts: &JtagParams) -> Result<Box<dyn JtagChain + '_>>
Returns a JtagChain
implementation.
sourcefn gpio_pin(&self, _instance: &str) -> Result<Rc<dyn GpioPin>>
fn gpio_pin(&self, _instance: &str) -> Result<Rc<dyn GpioPin>>
Returns a GpioPin
implementation.
sourcefn gpio_monitoring(&self) -> Result<Rc<dyn GpioMonitoring>>
fn gpio_monitoring(&self) -> Result<Rc<dyn GpioMonitoring>>
Returns a GpioMonitoring
implementation, for logic analyzer functionality.
sourcefn gpio_bitbanging(&self) -> Result<Rc<dyn GpioBitbanging>>
fn gpio_bitbanging(&self) -> Result<Rc<dyn GpioBitbanging>>
Returns a GpioBitbanging
implementation, for timed and synchronized manipulation of
multiple GPIO pins.
sourcefn proxy_ops(&self) -> Result<Rc<dyn ProxyOps>>
fn proxy_ops(&self) -> Result<Rc<dyn ProxyOps>>
Methods available only on Proxy implementation.
sourcefn dispatch(&self, _action: &dyn Any) -> Result<Option<Box<dyn Annotate>>>
fn dispatch(&self, _action: &dyn Any) -> Result<Option<Box<dyn Annotate>>>
Invoke non-standard functionality of some Transport implementations.
sourcefn maintain_connection(&self) -> Result<Rc<dyn MaintainConnection>>
fn maintain_connection(&self) -> Result<Rc<dyn MaintainConnection>>
As long as the returned MaintainConnection
object is kept by the caller, this driver may
assume that no other opentitantool
processes attempt to access the same debugger device.
This allows for optimzations such as keeping USB handles open across function invocations.
sourcefn nonblocking_help(&self) -> Result<Rc<dyn NonblockingHelp>>
fn nonblocking_help(&self) -> Result<Rc<dyn NonblockingHelp>>
Before nonblocking operations can be used on Uart
or other traits, this
NonblockingHelp
object must be invoked, in order to get the Transport
implementation a
chance to register its internal event sources with the main event loop.
Implementors§
impl Transport for Dediprog
impl Transport for HyperdebugDfu
The device does not support any part of the Transport trait, except the UpdateFirmware action.
impl Transport for Proxy
impl Transport for EmptyTransport
impl Transport for Ti50Emulator
Implementation of the Transport trait backed based on TockOS HostEmulation port.