pub struct FskConfig {
pub freq_hz: u32,
pub bitrate_bps: u32,
pub freq_dev_hz: u32,
pub rx_bw: u8,
pub preamble_len: u16,
pub sync_word_len: u8,
pub sync_word: [u8; 8],
}Expand description
FSK / GFSK configuration payload (PROTOCOL.md §10.2).
Wire size is 16 + sync_word_len bytes. sync_word_len is 0–8 and
indicates how many leading bytes of the sync_word array are
transmitted (MSB-first, per FSK convention). Extra trailing bytes
are ignored.
Fields§
§freq_hz: u32§bitrate_bps: u32§freq_dev_hz: u32§rx_bw: u8Chip-specific RX-filter bandwidth index.
preamble_len: u16§sync_word_len: u8§sync_word: [u8; 8]Implementations§
Source§impl FskConfig
impl FskConfig
Sourcepub const FIXED_WIRE_SIZE: usize = 16
pub const FIXED_WIRE_SIZE: usize = 16
Fixed part of the payload preceding the variable-length sync word.
Sourcepub const fn wire_size_for(sync_word_len: u8) -> usize
pub const fn wire_size_for(sync_word_len: u8) -> usize
Total wire size for the given sync_word_len. sync_word_len
larger than 8 is rejected by encode.
pub fn encode(&self, buf: &mut [u8]) -> Result<usize, ModulationEncodeError>
pub fn decode(buf: &[u8]) -> Result<Self, ModulationParseError>
Trait Implementations§
impl Copy for FskConfig
impl Eq for FskConfig
impl StructuralPartialEq for FskConfig
Auto Trait Implementations§
impl Freeze for FskConfig
impl RefUnwindSafe for FskConfig
impl Send for FskConfig
impl Sync for FskConfig
impl Unpin for FskConfig
impl UnsafeUnpin for FskConfig
impl UnwindSafe for FskConfig
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