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:
@ -9,6 +9,7 @@ pub use _version::*;
|
||||
|
||||
use crate::gpio::Pin;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum Error {
|
||||
Framing,
|
||||
|
@ -71,7 +71,8 @@ impl<'d, T: Instance, Tx, Rx> Spi<'d, T, Tx, Rx> {
|
||||
let miso = miso.degrade();
|
||||
|
||||
let pclk = T::frequency();
|
||||
let br = Self::compute_baud_rate(pclk, freq.into());
|
||||
let freq = freq.into();
|
||||
let br = Self::compute_baud_rate(pclk, freq);
|
||||
|
||||
unsafe {
|
||||
T::enable();
|
||||
|
Reference in New Issue
Block a user