[][src]Struct esb::app::Addresses

pub struct Addresses { /* fields omitted */ }

Addresses used for communication.

ESB uses up to eight pipes to address communication, each pipe has an unique address which is composed by the base address and the prefix. Pipe 0 has an unique base and prefix, while the other pipes share a base address but have different prefixes.

Default values:

FieldDefault Value
base0[0xE7, 0xE7, 0xE7, 0xE7]
base1[0xC2, 0xC2, 0xC2, 0xC2]
prefixes0[0xE7, 0xC2, 0xC3, 0xC4]
prefixes1[0xC5, 0xC6, 0xC7, 0xC8]
rf_channel2

Implementations

impl Addresses[src]

pub fn new(
    base0: [u8; 4],
    base1: [u8; 4],
    prefixes0: [u8; 4],
    prefixes1: [u8; 4],
    rf_channel: u8
) -> Result<Self, Error>
[src]

Creates a new instance of Addresses

  • base0 - Base address for pipe 0.
  • base1 - Base address for pipe 1-7.
  • prefixes0 - Prefixes for pipes 0-3, in order.
  • prefixes1 - Prefixes for pipes 4-7, in order.
  • rf_channel - Channel to be used by the radio hardware (must be between 0 and 100).

Panics

This function will panic if rf_channel is bigger than 100.

Trait Implementations

impl Default for Addresses[src]

Auto Trait Implementations

impl Send for Addresses

impl Sync for Addresses

impl Unpin for Addresses

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.