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.
15 lines
402 B
Rust
15 lines
402 B
Rust
/// Power amplifier over current protection.
|
|
///
|
|
/// Used by [`set_pa_ocp`].
|
|
///
|
|
/// [`set_pa_ocp`]: crate::subghz::SubGhz::set_pa_ocp
|
|
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]
|
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
|
#[repr(u8)]
|
|
pub enum Ocp {
|
|
/// Maximum 60mA current for LP PA mode.
|
|
Max60m = 0x18,
|
|
/// Maximum 140mA for HP PA mode.
|
|
Max140m = 0x38,
|
|
}
|