main: use a noop mutex with i2c

This commit is contained in:
2025-12-24 09:12:08 +01:00
parent 046406291a
commit 2eebdc5837
3 changed files with 8 additions and 8 deletions

View File

@@ -100,9 +100,9 @@ async fn main(spawner: Spawner) {
{
use embassy_embedded_hal::shared_bus::asynch::i2c::I2cDevice;
use esp_hal::{i2c::master::{Config, I2c}, Async};
use embassy_sync::{blocking_mutex::raw::CriticalSectionRawMutex, mutex::Mutex};
use embassy_sync::{blocking_mutex::raw::NoopRawMutex, mutex::Mutex};
static I2C_BUS: StaticCell<Mutex<CriticalSectionRawMutex, I2c<'static, Async>>> = StaticCell::new();
static I2C_BUS: StaticCell<Mutex<NoopRawMutex, I2c<'static, Async>>> = StaticCell::new();
info!("Launching i2c sensor tasks");
let sda = peripherals.GPIO4;