CYW4343xBus

Trait CYW4343xBus 

Source
pub trait CYW4343xBus<'a> {
    // Required methods
    fn set_client(&self, client: &'a dyn CYW4343xBusClient);
    fn init(&self) -> Result<(), ErrorCode>;
    fn write_bytes(
        &self,
        buffer: SubSliceMut<'static, u8>,
    ) -> Result<(), (ErrorCode, SubSliceMut<'static, u8>)>;
    fn read_bytes(
        &self,
        buffer: SubSliceMut<'static, u8>,
        len: usize,
    ) -> Result<(), (ErrorCode, SubSliceMut<'static, u8>)>;
    fn state(&self) -> Result<State, ErrorCode>;
}
Expand description

Trait for a bus that is used to communicate with CYW43xx device

Required Methods§

Source

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

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

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

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

Get current bus state

Implementors§

Source§

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