pub struct RadioConfig {
pub freq_hz: u32,
pub bw: Bandwidth,
pub sf: u8,
pub cr: u8,
pub sync_word: u16,
pub tx_power_dbm: i8,
pub preamble_len: u16,
pub cad: u8,
}Expand description
Complete LoRa radio configuration.
Wire layout (13 bytes, all little-endian):
[freq_hz:4] [bw:1] [sf:1] [cr:1] [sync_word:2] [tx_power_dbm:1] [preamble_len:2] [cad:1]Fields§
§freq_hz: u32Frequency in Hz (150_000_000 - 960_000_000 for SX1262).
bw: Bandwidth§sf: u8Spreading factor (5-12).
cr: u8Coding rate denominator (5-8). E.g. 5 = CR 4/5, 8 = CR 4/8.
sync_word: u16§tx_power_dbm: i8Transmit power in dBm. Set to TX_POWER_MAX (-128) for the board’s maximum.
preamble_len: u16Preamble length in symbols. Set to PREAMBLE_DEFAULT (0) for firmware default (16).
cad: u8Channel Activity Detection (listen-before-talk). 0 = disabled, non-zero = enabled.
Implementations§
Trait Implementations§
Source§impl Clone for RadioConfig
impl Clone for RadioConfig
Source§fn clone(&self) -> RadioConfig
fn clone(&self) -> RadioConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RadioConfig
impl Debug for RadioConfig
Source§impl Default for RadioConfig
Default: 915 MHz, 125 kHz BW, SF7, CR 4/5, sync 0x1424, max power, default preamble, CAD on.
impl Default for RadioConfig
Default: 915 MHz, 125 kHz BW, SF7, CR 4/5, sync 0x1424, max power, default preamble, CAD on.
Source§impl PartialEq for RadioConfig
impl PartialEq for RadioConfig
impl Copy for RadioConfig
impl Eq for RadioConfig
impl StructuralPartialEq for RadioConfig
Auto Trait Implementations§
impl Freeze for RadioConfig
impl RefUnwindSafe for RadioConfig
impl Send for RadioConfig
impl Sync for RadioConfig
impl Unpin for RadioConfig
impl UnsafeUnpin for RadioConfig
impl UnwindSafe for RadioConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more