pub enum Modem {
LoraMulti(u8),
LoraStandard,
Fsk,
Unknown(u8),
}Expand description
Which demodulator heard a packet.
Variants§
LoraMulti(u8)
One of the demodulators that take any spreading factor, by its number.
LoraStandard
The demodulator fixed to one spreading factor and bandwidth.
Fsk
The frequency shift keying demodulator.
Unknown(u8)
An identifier this build does not know, carried rather than dropped.
Implementations§
Source§impl Modem
impl Modem
Sourcepub const fn of(id: u8) -> Modem
pub const fn of(id: u8) -> Modem
Reads the demodulator identifier the chip wrote.
§Arguments
id- the identifier from the packet metadata.
§Returns
Which demodulator it names.
§Examples
use pamoja_radios::sx1302::rx::Modem;
assert_eq!(Modem::of(3), Modem::LoraMulti(3));
assert_eq!(Modem::of(16), Modem::LoraStandard);
assert_eq!(Modem::of(17), Modem::Fsk);Trait Implementations§
impl Copy for Modem
impl Eq for Modem
impl StructuralPartialEq for Modem
Auto Trait Implementations§
impl Freeze for Modem
impl RefUnwindSafe for Modem
impl Send for Modem
impl Sync for Modem
impl Unpin for Modem
impl UnsafeUnpin for Modem
impl UnwindSafe for Modem
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