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:
Ulf Lilleengen
2021-08-31 14:32:48 +02:00
parent db3cb02032
commit 7ad6280e65
42 changed files with 7110 additions and 9 deletions

View File

@ -9,6 +9,7 @@ pub use _version::*;
use crate::gpio::Pin;
#[derive(Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Error {
Framing,

View File

@ -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();