Add HAL for SubGhz peripheral for STM32 WL series
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.
This commit is contained in:
20
embassy-stm32/src/subghz/standby_clk.rs
Normal file
20
embassy-stm32/src/subghz/standby_clk.rs
Normal file
@ -0,0 +1,20 @@
|
||||
/// Clock in standby mode.
|
||||
///
|
||||
/// Used by [`set_standby`].
|
||||
///
|
||||
/// [`set_standby`]: crate::subghz::SubGhz::set_standby
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
#[repr(u8)]
|
||||
pub enum StandbyClk {
|
||||
/// RC 13 MHz used in standby mode.
|
||||
Rc = 0b0,
|
||||
/// HSE32 used in standby mode.
|
||||
Hse = 0b1,
|
||||
}
|
||||
|
||||
impl From<StandbyClk> for u8 {
|
||||
fn from(sc: StandbyClk) -> Self {
|
||||
sc as u8
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user