Type Alias Ieee802154RawComponentType

Source
pub type Ieee802154RawComponentType<R> = RadioDriver<'static, R>;

Aliased Type§

struct Ieee802154RawComponentType<R> { /* private fields */ }

Implementations

Source§

impl<'a, R> RadioDriver<'a, R>
where R: Radio<'a>,

Source

pub fn new( radio: &'a R, grant: Grant<App, UpcallCount<capsules_extra::::ieee802154::phy_driver::{impl#0}::new::{constant#0}>, AllowRoCount<capsules_extra::::ieee802154::phy_driver::{impl#0}::new::{constant#1}>, AllowRwCount<capsules_extra::::ieee802154::phy_driver::{impl#0}::new::{constant#2}>>, kernel_tx: &'static mut [u8], ) -> RadioDriver<'a, R>

Trait Implementations

Source§

impl<'a, R> ConfigClient for RadioDriver<'a, R>
where R: Radio<'a>,

Source§

fn config_done(&self, _result: Result<(), ErrorCode>)

Configuring the radio has finished. Read more
Source§

impl<'a, R> PowerClient for RadioDriver<'a, R>
where R: Radio<'a>,

Source§

fn changed(&self, _on: bool)

The power state of the radio changed. This is called when the radio has turned on or off. Read more
Source§

impl<'a, R> RxClient for RadioDriver<'a, R>
where R: Radio<'a>,

Source§

fn receive<'b>( &self, buf: &'static mut [u8], frame_len: usize, lqi: u8, crc_valid: bool, result: Result<(), ErrorCode>, )

Packet was received. Read more
Source§

impl<'a, R> SyscallDriver for RadioDriver<'a, R>
where R: Radio<'a>,

Source§

fn command( &self, command_number: usize, arg1: usize, arg2: usize, processid: ProcessId, ) -> CommandReturn

IEEE 802.15.4 low-level control.

§command_num
  • 0: Driver existence check.
  • 1: Return radio status. Ok(())/OFF = on/off.
  • 2: Set short address.
  • 4: Set PAN ID.
  • 5: Set channel.
  • 6: Set transmission power.
  • 7: Commit any configuration changes.
  • 8: Get the short MAC address.
  • 10: Get the PAN ID.
  • 11: Get the channel.
  • 12: Get the transmission power.
  • 27: Transmit a frame. The frame must be stored in the write RO allow buffer 0. The allowed buffer must be the length of the frame. The frame includes the PDSU (i.e., the MAC payload) without the MFR (i.e., CRC) bytes.
  • 28: Set long address.
  • 29: Get the long MAC address.
  • 30: Turn the radio on.
  • 31: Turn the radio off.
Source§

fn allocate_grant(&self, processid: ProcessId) -> Result<(), Error>

Request to allocate a capsule’s grant for a specific process. Read more
Source§

fn allow_userspace_readable( &self, app: ProcessId, which: usize, slice: ReadWriteProcessBuffer, ) -> Result<ReadWriteProcessBuffer, (ReadWriteProcessBuffer, ErrorCode)>

System call for a process to pass a buffer (a UserspaceReadableProcessBuffer) to the kernel that the kernel can either read or write. The kernel calls this method only after it checks that the entire buffer is within memory the process can both read and write. Read more
Source§

impl<'a, R> TxClient for RadioDriver<'a, R>
where R: Radio<'a>,

Source§

fn send_done( &self, spi_buf: &'static mut [u8], acked: bool, result: Result<(), ErrorCode>, )

Send is complete or an error occurred during transmission. Read more