CYW4343xSpiBus

Struct CYW4343xSpiBus 

Source
pub struct CYW4343xSpiBus<'a, S: SpiMasterDevice<'a>, A: Alarm<'a>> { /* private fields */ }
Expand description

gSPI interface implementation for the CYW43xx Bus

The protocol is explained in chapter 4.2 of the datasheet

Implementations§

Source§

impl<'a, S: SpiMasterDevice<'a>, A: Alarm<'a>> CYW4343xSpiBus<'a, S, A>

Source

pub fn new( gspi: &'a S, alarm: &'a A, extra: &'static mut [u8; 4], buffer: &'static mut [u8; 2052], fw: &'static [u8], nvram: &'static [u8], ) -> Self

Trait Implementations§

Source§

impl<'a, S: SpiMasterDevice<'a>, A: Alarm<'a>> AlarmClient for CYW4343xSpiBus<'a, S, 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: Alarm<'a>> CYW4343xBus<'a> for CYW4343xSpiBus<'a, S, A>

Source§

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

Set the client to be used for callbacks of the Cyw43Bus implementation
Source§

fn state(&self) -> Result<BusState, ErrorCode>

Get current bus state
Source§

fn init(&self) -> Result<(), ErrorCode>

Initialise the bus
Source§

fn write_bytes( &self, buffer: SubSliceMut<'static, u8>, ) -> Result<(), (ErrorCode, SubSliceMut<'static, u8>)>

Write a WLAN (F2) packet
Source§

fn read_bytes( &self, buffer: SubSliceMut<'static, u8>, len: usize, ) -> Result<(), (ErrorCode, SubSliceMut<'static, u8>)>

Read a WLAN (F2) packet if available.
Source§

impl<'a, S: SpiMasterDevice<'a>, A: Alarm<'a>> Client for CYW4343xSpiBus<'a, S, A>

Source§

fn fired(&self)

Called when an interrupt occurs. The identifier will be the same value that was passed to enable_interrupt() when the interrupt was configured.
Source§

impl<'a, S: SpiMasterDevice<'a>, A: Alarm<'a>> SpiMasterClient for CYW4343xSpiBus<'a, S, A>

Source§

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

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

Auto Trait Implementations§

§

impl<'a, S, A> !Freeze for CYW4343xSpiBus<'a, S, A>

§

impl<'a, S, A> !RefUnwindSafe for CYW4343xSpiBus<'a, S, A>

§

impl<'a, S, A> !Send for CYW4343xSpiBus<'a, S, A>

§

impl<'a, S, A> !Sync for CYW4343xSpiBus<'a, S, A>

§

impl<'a, S, A> Unpin for CYW4343xSpiBus<'a, S, A>

§

impl<'a, S, A> !UnwindSafe for CYW4343xSpiBus<'a, S, 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.