pub struct SpiDriver { /* private fields */ }
Expand description
Implementation of the low level interface via standard SPI protocol.
Implementations§
Trait Implementations§
Source§impl Driver for SpiDriver
impl Driver for SpiDriver
Source§fn read_register(&self, register: Register, data: &mut [u8]) -> Result<()>
fn read_register(&self, register: Register, data: &mut [u8]) -> Result<()>
Read from the given TPM register, number of bytes to read given by length of data slice.
Source§fn write_register(&self, register: Register, data: &[u8]) -> Result<()>
fn write_register(&self, register: Register, data: &[u8]) -> Result<()>
Write to the given TPM register.
Source§fn execute_command(&self, cmd: &[u8]) -> Result<Vec<u8>>
fn execute_command(&self, cmd: &[u8]) -> Result<Vec<u8>>
Execute a TPM command and return the result as a
Vec<u8>
or time out.Source§fn read_status(&self) -> Result<TpmStatus>
fn read_status(&self) -> Result<TpmStatus>
Fetches the current status.
Source§fn poll_for_data_available(&self) -> Result<TpmStatus>
fn poll_for_data_available(&self) -> Result<TpmStatus>
Poll the status register until the status is valid and data is available or time out.
Source§fn poll_for_ready(&self) -> Result<TpmStatus>
fn poll_for_ready(&self) -> Result<TpmStatus>
Poll the status register until the status is valid and the tpm is ready or time out.
Auto Trait Implementations§
impl Freeze for SpiDriver
impl !RefUnwindSafe for SpiDriver
impl !Send for SpiDriver
impl !Sync for SpiDriver
impl Unpin for SpiDriver
impl !UnwindSafe for SpiDriver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more