7ad6280e65
Based on the HAL from stm32wl, the peripheral driver has been modified to fit into embassy, using the embassy APIs, providing operation of the radio peripheral. The initial version does not offer any async APIs, but the example shows how the radio IRQ can be used to perform async TX of the radio.
21 lines
537 B
Rust
21 lines
537 B
Rust
/// LoRa synchronization word.
|
|
///
|
|
/// Argument of [`set_lora_sync_word`][crate::subghz::SubGhz::set_lora_sync_word].
|
|
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
|
pub enum LoRaSyncWord {
|
|
/// LoRa private network.
|
|
Private,
|
|
/// LoRa public network.
|
|
Public,
|
|
}
|
|
|
|
impl LoRaSyncWord {
|
|
pub(crate) const fn bytes(self) -> [u8; 2] {
|
|
match self {
|
|
LoRaSyncWord::Private => [0x14, 0x24],
|
|
LoRaSyncWord::Public => [0x34, 0x44],
|
|
}
|
|
}
|
|
}
|