pub struct TransportWrapper { /* private fields */ }Implementations§
Source§impl TransportWrapper
impl TransportWrapper
pub fn ignore_dft_straps_on_reset(&self) -> Result<()>
Sourcepub fn capabilities(&self) -> Result<Capabilities>
pub fn capabilities(&self) -> Result<Capabilities>
Returns a Capabilities object to check the capabilities of this
transport object.
Sourcepub fn provides_map(&self) -> Result<&HashMap<String, String>>
pub fn provides_map(&self) -> Result<&HashMap<String, String>>
Returns a string->string map containing user-defined aspects “provided” by the testbed setup. For instance, whether a SPI flash chip is fitted in the socket, or whether pullup resistors are suitable for high-speed I2C.
pub fn query_provides(&self, key: &str) -> Result<&str>
Sourcepub fn jtag(&self, opts: &JtagParams) -> Result<Box<dyn JtagChain + '_>>
pub fn jtag(&self, opts: &JtagParams) -> Result<Box<dyn JtagChain + '_>>
Returns a JtagChain implementation.
Sourcepub fn gpio_pin(&self, name: &str) -> Result<Rc<dyn GpioPin>>
pub fn gpio_pin(&self, name: &str) -> Result<Rc<dyn GpioPin>>
Returns a GpioPin implementation.
Sourcepub fn gpio_pins(&self, names: &[String]) -> Result<Vec<Rc<dyn GpioPin>>>
pub fn gpio_pins(&self, names: &[String]) -> Result<Vec<Rc<dyn GpioPin>>>
Convenience method, returns a number of GpioPin implementations.
pub fn gpios(&self) -> &HashSet<String>
Sourcepub fn gpio_monitoring(&self) -> Result<Rc<dyn GpioMonitoring>>
pub fn gpio_monitoring(&self) -> Result<Rc<dyn GpioMonitoring>>
Returns a GpioMonitoring implementation.
Sourcepub fn gpio_bitbanging(&self) -> Result<Rc<dyn GpioBitbanging>>
pub fn gpio_bitbanging(&self) -> Result<Rc<dyn GpioBitbanging>>
Returns a GpioBitbanging implementation.
pub fn pin_strapping(&self, name: &str) -> Result<PinStrapping>
Sourcepub fn proxy_ops(&self) -> Result<&dyn ProxyOps>
pub fn proxy_ops(&self) -> Result<&dyn ProxyOps>
Methods available only on Proxy implementation.
Sourcepub fn dispatch(&self, action: &dyn Any) -> Result<Option<Box<dyn Serialize>>>
pub fn dispatch(&self, action: &dyn Any) -> Result<Option<Box<dyn Serialize>>>
Invoke non-standard functionality of some Transport implementations.
Sourcepub fn apply_default_configuration(
&self,
strapping_name: Option<&str>,
) -> Result<()>
pub fn apply_default_configuration( &self, strapping_name: Option<&str>, ) -> Result<()>
Configure all pins as input/output, pullup, etc. as declared in configuration files. Also configure SPI port mode/speed, and other similar settings.
pub fn reset_target( &self, reset_delay: Duration, clear_uart_rx: bool, ) -> Result<()>
Sourcepub fn relinquish_exclusive_access<T>(
&self,
callback: impl FnOnce() -> T,
) -> Result<T>
pub fn relinquish_exclusive_access<T>( &self, callback: impl FnOnce() -> T, ) -> Result<T>
Invoke the provided callback (preferably) without exclusive access.
By default, ownership of Transport would imply exclusive access to the underlying device,
and optimisation can be made assuming no other process would be simultaneously accessing.
However for long running commands, such as opentitantool console, it may be desirable to
relinquish exclusive access during such comamnd and only re-take exclusive access later.
Transport that does not support such scenario may ignore such request and perform a no-op.