Struct capsules_extra::mx25r6435f::MX25R6435F

source ·
pub struct MX25R6435F<'a, S: SpiMasterDevice<'a> + 'a, P: Pin + 'a, A: Alarm<'a> + 'a> { /* private fields */ }

Implementations§

source§

impl<'a, S: SpiMasterDevice<'a> + 'a, P: Pin + 'a, A: Alarm<'a> + 'a> MX25R6435F<'a, S, P, A>

source

pub fn new( spi: &'a S, alarm: &'a A, txbuffer: &'static mut [u8], rxbuffer: &'static mut [u8], write_protect_pin: Option<&'a P>, hold_pin: Option<&'a P> ) -> MX25R6435F<'a, S, P, A>

source

pub fn read_identification(&self) -> Result<(), ErrorCode>

Requests the readout of a 24-bit identification number. This command will cause a debug print when succeeded.

Trait Implementations§

source§

impl<'a, S: SpiMasterDevice<'a> + 'a, P: Pin + 'a, A: Alarm<'a> + 'a> AlarmClient for MX25R6435F<'a, S, P, A>

source§

fn alarm(&self)

Callback indicating the alarm time has been reached. The alarm MUST be disabled when this is called. If a new alarm is needed, the client can call Alarm::set_alarm.
source§

impl<'a, S: SpiMasterDevice<'a> + 'a, P: Pin + 'a, A: Alarm<'a> + 'a> Flash for MX25R6435F<'a, S, P, A>

§

type Page = Mx25r6435fSector

Type of a single flash page for the given implementation.
source§

fn read_page( &self, page_number: usize, buf: &'static mut Self::Page ) -> Result<(), (ErrorCode, &'static mut Self::Page)>

Read a page of flash into the buffer.
source§

fn write_page( &self, page_number: usize, buf: &'static mut Self::Page ) -> Result<(), (ErrorCode, &'static mut Self::Page)>

Write a page of flash from the buffer.
source§

fn erase_page(&self, page_number: usize) -> Result<(), ErrorCode>

Erase a page of flash by setting every byte to 0xFF.
source§

impl<'a, S: SpiMasterDevice<'a> + 'a, P: Pin + 'a, A: Alarm<'a> + 'a, C: Client<Self>> HasClient<'a, C> for MX25R6435F<'a, S, P, A>

source§

fn set_client(&self, client: &'a C)

Set the client for this flash peripheral. The client will be called when operations complete.
source§

impl<'a, S: SpiMasterDevice<'a> + 'a, P: Pin + 'a, A: Alarm<'a> + 'a> SpiMasterClient for MX25R6435F<'a, S, P, A>

source§

fn read_write_done( &self, write_buffer: &'static mut [u8], read_buffer: Option<&'static mut [u8]>, len: usize, read_write_status: Result<(), ErrorCode> )

Callback when a read/write operation finishes: read_buffer is an Option because the call passes an Option (with None if it’s a write-only operation.

Auto Trait Implementations§

§

impl<'a, S, P, A> !Freeze for MX25R6435F<'a, S, P, A>

§

impl<'a, S, P, A> !RefUnwindSafe for MX25R6435F<'a, S, P, A>

§

impl<'a, S, P, A> !Send for MX25R6435F<'a, S, P, A>

§

impl<'a, S, P, A> !Sync for MX25R6435F<'a, S, P, A>

§

impl<'a, S, P, A> Unpin for MX25R6435F<'a, S, P, A>

§

impl<'a, S, P, A> !UnwindSafe for MX25R6435F<'a, S, P, A>

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> SizedTypeProperties for T

source§

#[doc(hidden)] const IS_ZST: bool = _

🔬This is a nightly-only experimental API. (sized_type_properties)
true if this type requires no storage. false if its size is greater than zero. Read more
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.