Struct capsules_extra::ieee802154::phy_driver::RadioDriver

source ·
pub struct RadioDriver<'a, R: Radio<'a>> { /* private fields */ }

Implementations§

source§

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

source

pub fn new( radio: &'a R, grant: Grant<App, UpcallCount<{ upcall::COUNT }>, AllowRoCount<{ ro_allow::COUNT }>, AllowRwCount<{ rw_allow::COUNT }>>, kernel_tx: &'static mut [u8], ) -> Self

Trait Implementations§

source§

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

source§

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

Configuring the radio has finished. Read more
source§

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

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: Radio<'a>> RxClient for RadioDriver<'a, R>

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: Radio<'a>> SyscallDriver for RadioDriver<'a, R>

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: Radio<'a>> TxClient for RadioDriver<'a, R>

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

Auto Trait Implementations§

§

impl<'a, R> !Freeze for RadioDriver<'a, R>

§

impl<'a, R> !RefUnwindSafe for RadioDriver<'a, R>

§

impl<'a, R> !Send for RadioDriver<'a, R>

§

impl<'a, R> !Sync for RadioDriver<'a, R>

§

impl<'a, R> Unpin for RadioDriver<'a, R>

§

impl<'a, R> !UnwindSafe for RadioDriver<'a, R>

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.