Struct RXConfig

Source
pub struct RXConfig {
    pub data_rate: DataRate,
    pub channel: u8,
    pub pa_level: PALevel,
    pub pipe0_address: [u8; 5],
    pub pipe1_address: Option<[u8; 5]>,
    pub pipe2_addr_lsb: Option<u8>,
    pub pipe3_addr_lsb: Option<u8>,
    pub pipe4_addr_lsb: Option<u8>,
    pub pipe5_addr_lsb: Option<u8>,
}
Expand description

Receiver mode configuration

Fields§

§data_rate: DataRate

data rate, defaults to DataRate::R1Mbps.

§channel: u8

channel, in the range [0, 125], defaults to 0.

The RF channel frequency F is set according to the formula:

F = 2400 + channel Mhz

Any channel value above 125 is capped to 125.

§pa_level: PALevel

Powel level, defaults to PALevel::Min.

§pipe0_address: [u8; 5]

Pipe 0 address

This is the receiving base address.

Typically, this is the only address you need to set, unless you need a multiceiver configuration. In that case, you can enable up to five additional receiving pipes.

The address is in little endian order: the first byte is the least significant one.

You must provide a valid address for Pipe 0.

§pipe1_address: Option<[u8; 5]>

Pipe 1 address, defaults to None (disabled)

All pipes 2-5 share the 4 most significant bytes with the pipe 1 address, so you only need to provide the least significant byte to enable one of those pipes or set it to None to disable it (default).

§pipe2_addr_lsb: Option<u8>

Pipe 2 LSB, defaults to None (disabled)

§pipe3_addr_lsb: Option<u8>

Pipe 3 LSB, defaults to None (disabled)

§pipe4_addr_lsb: Option<u8>

Pipe 4 LSB, defaults to None (disabled)

§pipe5_addr_lsb: Option<u8>

Pipe 5 LSB, defaults to None (disabled)

Trait Implementations§

Source§

impl Debug for RXConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RXConfig

Source§

fn default() -> RXConfig

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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>,

Source§

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>,

Source§

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.