[−][src]Struct esb::app::Addresses
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:
Field | Default Value |
---|---|
base0 | [0xE7, 0xE7, 0xE7, 0xE7] |
base1 | [0xC2, 0xC2, 0xC2, 0xC2] |
prefixes0 | [0xE7, 0xC2, 0xC3, 0xC4] |
prefixes1 | [0xC5, 0xC6, 0xC7, 0xC8] |
rf_channel | 2 |
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]
base0: [u8; 4],
base1: [u8; 4],
prefixes0: [u8; 4],
prefixes1: [u8; 4],
rf_channel: u8
) -> Result<Self, Error>
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
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,