Struct capsules_extra::fm25cl::FM25CL

source ·
pub struct FM25CL<'a, S: SpiMasterDevice<'a>> { /* private fields */ }

Implementations§

source§

impl<'a, S: SpiMasterDevice<'a>> FM25CL<'a, S>

source

pub fn new( spi: &'a S, txbuffer: &'static mut [u8], rxbuffer: &'static mut [u8], ) -> FM25CL<'a, S>

source

pub fn set_client<C: FM25CLClient>(&self, client: &'a C)

source

pub fn write( &self, address: u16, buffer: &'static mut [u8], len: u16, ) -> Result<(), ErrorCode>

source

pub fn read( &self, address: u16, buffer: &'static mut [u8], len: u16, ) -> Result<(), ErrorCode>

Trait Implementations§

source§

impl<'a, S: SpiMasterDevice<'a>> FM25CLCustom for FM25CL<'a, S>

source§

impl<'a, S: SpiMasterDevice<'a>> NonvolatileStorage<'a> for FM25CL<'a, S>

Implement the generic NonvolatileStorage interface common to chips that provide nonvolatile memory.

source§

fn set_client(&self, client: &'a dyn NonvolatileStorageClient)

source§

fn read( &self, buffer: &'static mut [u8], address: usize, length: usize, ) -> Result<(), ErrorCode>

Read length bytes starting at address address in to the provided buffer. The buffer must be at least length bytes long. The address must be in the address space of the physical storage.
source§

fn write( &self, buffer: &'static mut [u8], address: usize, length: usize, ) -> Result<(), ErrorCode>

Write length bytes starting at address address from the provided buffer. The buffer must be at least length bytes long. This address must be in the address space of the physical storage.
source§

impl<'a, S: SpiMasterDevice<'a>> SpiMasterClient for FM25CL<'a, S>

source§

fn read_write_done( &self, write_buffer: SubSliceMut<'static, u8>, read_buffer: Option<SubSliceMut<'static, u8>>, _status: Result<usize, ErrorCode>, )

Callback issued when a read/write operation finishes. Read more

Auto Trait Implementations§

§

impl<'a, S> !Freeze for FM25CL<'a, S>

§

impl<'a, S> !RefUnwindSafe for FM25CL<'a, S>

§

impl<'a, S> !Send for FM25CL<'a, S>

§

impl<'a, S> !Sync for FM25CL<'a, S>

§

impl<'a, S> Unpin for FM25CL<'a, S>

§

impl<'a, S> !UnwindSafe for FM25CL<'a, S>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.