Type Alias Rf233

Source
type Rf233 = RF233<'static, VirtualSpiMasterDevice<'static, SpiHw<'static>>>;

Aliased Type§

struct Rf233 { /* private fields */ }

Implementations

Source§

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

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> Client for RF233<'a, S>
where S: SpiMasterDevice<'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> RadioConfig<'a> for RF233<'a, S>
where S: SpiMasterDevice<'a>,

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> RadioData<'a> for RF233<'a, S>
where S: SpiMasterDevice<'a>,

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> SpiMasterClient for RF233<'a, S>
where S: SpiMasterDevice<'a>,

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