Struct ectool::SpiRom [−][src]
SPI ROM transactions
Implementations
impl<'a, S: Spi, T: Timeout> SpiRom<'a, S, T>
[src]
pub fn new(spi: &'a mut S, timeout: T) -> Self
[src]
Create a SPI ROM using the specified SPI bus and timeout
pub fn sector_size(&self) -> usize
[src]
Get sector size in bytes
pub unsafe fn status(&mut self) -> Result<u8, Error>
[src]
Read the status register
pub unsafe fn status_wait(&mut self, mask: u8, value: u8) -> Result<(), Error>
[src]
Wait for the status register to have mask
bits set to value
pub unsafe fn write_disable(&mut self) -> Result<(), Error>
[src]
Disable writes
pub unsafe fn write_enable(&mut self) -> Result<(), Error>
[src]
Enable writes
pub unsafe fn erase_sector(&mut self, address: u32) -> Result<(), Error>
[src]
Erase a sector with the specified address
pub unsafe fn read_at(
&mut self,
address: u32,
data: &mut [u8]
) -> Result<usize, Error>
[src]
&mut self,
address: u32,
data: &mut [u8]
) -> Result<usize, Error>
Read at a specific address
pub unsafe fn write_at(
&mut self,
address: u32,
data: &[u8]
) -> Result<usize, Error>
[src]
&mut self,
address: u32,
data: &[u8]
) -> Result<usize, Error>
Write at a specific address
Trait Implementations
Auto Trait Implementations
impl<'a, S, T> RefUnwindSafe for SpiRom<'a, S, T> where
S: RefUnwindSafe,
T: RefUnwindSafe,
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, S, T> Send for SpiRom<'a, S, T> where
S: Send,
T: Send,
S: Send,
T: Send,
impl<'a, S, T> Sync for SpiRom<'a, S, T> where
S: Sync,
T: Sync,
S: Sync,
T: Sync,
impl<'a, S, T> Unpin for SpiRom<'a, S, T> where
T: Unpin,
T: Unpin,
impl<'a, S, T> !UnwindSafe for SpiRom<'a, S, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
T: Any + Send + Sync,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,