Struct capsules_extra::rf233::RF233

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

Implementations§

source§

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

source

pub fn new( spi: &'a S, spi_buf: &'static mut [u8], reg_write: &'static mut [u8; 2], reg_read: &'static mut [u8; 2], reset: &'a dyn Pin, sleep: &'a dyn Pin, irq: &'a dyn InterruptPin<'a>, channel: RadioChannel, ) -> RF233<'a, S>

Trait Implementations§

source§

impl<'a, S: SpiMasterDevice<'a>> Client for RF233<'a, S>

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>> RadioConfig<'a> for RF233<'a, S>

source§

fn get_pan(&self) -> u16

The 16-bit PAN ID

source§

fn get_tx_power(&self) -> i8

The transmit power, in dBm

source§

fn get_channel(&self) -> u8

The 802.15.4 channel

source§

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

Initialize the radio. Read more
source§

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

Reset the radio. Read more
source§

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

Start the radio. Read more
source§

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

Stop the radio. Read more
source§

fn is_on(&self) -> bool

Check if the radio is currently on. Read more
source§

fn busy(&self) -> bool

Check if the radio is currently busy transmitting or receiving a packet. Read more
source§

fn set_config_client(&self, client: &'a dyn ConfigClient)

Set the client that is called when configuration finishes.
source§

fn set_power_client(&self, client: &'a dyn PowerClient)

Set the client that is called when the radio changes power states.
source§

fn set_address(&self, addr: u16)

Set the 802.15.4 short (16-bit) address for the radio. Read more
source§

fn set_address_long(&self, addr: [u8; 8])

Set the 802.15.4 extended (64-bit) address for the radio. Read more
source§

fn set_pan(&self, id: u16)

Set the 802.15.4 PAN ID (16-bit) for the radio. Read more
source§

fn set_tx_power(&self, power: i8) -> Result<(), ErrorCode>

Set the radio’s transmit power. Read more
source§

fn set_channel(&self, chan: RadioChannel)

Set the 802.15.4 channel for the radio. Read more
source§

fn get_address(&self) -> u16

Get the 802.15.4 short (16-bit) address for the radio. Read more
source§

fn get_address_long(&self) -> [u8; 8]

Get the 802.15.4 extended (64-bit) address for the radio. Read more
source§

fn config_commit(&self)

Commit the configuration calls to the radio. Read more
source§

impl<'a, S: SpiMasterDevice<'a>> RadioData<'a> for RF233<'a, S>

source§

fn set_transmit_client(&self, client: &'a dyn TxClient)

Set the client that will be called when packets are transmitted.
source§

fn set_receive_client(&self, client: &'a dyn RxClient)

Set the client that will be called when packets are received.
source§

fn set_receive_buffer(&self, buffer: &'static mut [u8])

Set the buffer to receive packets into. Read more
source§

fn transmit( &self, spi_buf: &'static mut [u8], frame_len: usize, ) -> Result<(), (ErrorCode, &'static mut [u8])>

Transmit a packet. Read more
source§

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

source§

fn read_write_done( &self, _write: SubSliceMut<'static, u8>, read: Option<SubSliceMut<'static, u8>>, _spi_status: Result<usize, ErrorCode>, )

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<'a, S> !UnwindSafe for RF233<'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.
source§

impl<'a, T> Radio<'a> for T
where T: RadioConfig<'a> + RadioData<'a>,