1457: TL Mbox read and write for stm32wb r=xoviat a=OueslatiGhaith

Hello,

This pull request is related to #1397 and #1401, inspired by #24, built upon the work done in #1405 and #1424, and was tested on an stm32wb55rg.

This pull request aims to add read and write functionality to the TL mailbox for stm32wb microcontrollers

Co-authored-by: goueslati <ghaith.oueslati@habemus.com>
Co-authored-by: xoviat <xoviat@users.noreply.github.com>
This commit is contained in:
bors[bot]
2023-05-23 01:15:22 +00:00
committed by GitHub
16 changed files with 777 additions and 125 deletions

View File

@ -7,6 +7,7 @@
#[path = "../example_common.rs"]
mod example_common;
use embassy_executor::Spawner;
use embassy_stm32::interrupt;
use embassy_stm32::ipcc::{Config, Ipcc};
use embassy_stm32::tl_mbox::TlMbox;
use embassy_time::{Duration, Timer};
@ -20,12 +21,15 @@ async fn main(_spawner: Spawner) {
let config = Config::default();
let mut ipcc = Ipcc::new(p.IPCC, config);
let mbox = TlMbox::init(&mut ipcc);
let rx_irq = interrupt::take!(IPCC_C1_RX);
let tx_irq = interrupt::take!(IPCC_C1_TX);
let mbox = TlMbox::init(&mut ipcc, rx_irq, tx_irq);
loop {
let wireless_fw_info = mbox.wireless_fw_info();
match wireless_fw_info {
None => error!("not yet initialized"),
None => {}
Some(fw_info) => {
let version_major = fw_info.version_major();
let version_minor = fw_info.version_minor();
@ -43,7 +47,7 @@ async fn main(_spawner: Spawner) {
}
}
Timer::after(Duration::from_millis(500)).await;
Timer::after(Duration::from_millis(50)).await;
}
info!("Test OK");