From f083138f7408057002294254c59f8c825894c166 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Thu, 28 Nov 2024 17:09:56 +0000 Subject: [PATCH] Fix CI --- Cargo.toml | 5 ++++- src/ble.rs | 2 +- src/lib.rs | 9 ++++++--- src/wireless.rs | 12 ++++++------ 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index eed6899..ac4a50d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,12 +22,15 @@ rust-version = "1.78" #rs-matter-stack = { path = "../rs-matter-stack" } [patch.crates-io] -rs-matter = { git = "https://github.com/ivmarkov/rs-matter" } +rs-matter = { git = "https://github.com/project-chip/rs-matter" } #rs-matter = { path = "../rs-matter/rs-matter" } #edge-nal = { git = "https://github.com/ivmarkov/edge-net" } #edge-nal = { path = "../edge-net/edge-nal" } #edge-nal-std = { git = "https://github.com/ivmarkov/edge-net" } #edge-nal-std = { path = "../edge-net/edge-nal-std" } +esp-idf-svc = { git = "https://github.com/esp-rs/esp-idf-svc" } +esp-idf-hal = { git = "https://github.com/esp-rs/esp-idf-hal" } +esp-idf-sys = { git = "https://github.com/esp-rs/esp-idf-sys" } [profile.release] opt-level = "s" diff --git a/src/ble.rs b/src/ble.rs index bfd6a44..57a77d7 100644 --- a/src/ble.rs +++ b/src/ble.rs @@ -293,7 +293,7 @@ where } } -impl<'a, 'd, M> GattPeripheral for EspBtpGattPeripheral<'a, 'd, M> +impl GattPeripheral for EspBtpGattPeripheral<'_, '_, M> where M: BleEnabled, { diff --git a/src/lib.rs b/src/lib.rs index 4861257..e953b6a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -71,13 +71,16 @@ pub mod wireless; /// /// User is expected to call this method early in the application's lifecycle /// when there is plenty of task stack space available, as the initialization -/// consumes > 10KB of stack space, so it has to be done with care. +/// of `async-io` consumes > 10KB of stack space, so it has to be done with care. +/// +/// Note that `async-io-mini` is much less demanding. #[inline(never)] #[cold] #[cfg(feature = "std")] pub fn init_async_io() -> Result<(), esp_idf_svc::sys::EspError> { - // We'll use `async-io` for networking, so ESP IDF VFS needs to be initialized - esp_idf_svc::io::vfs::initialize_eventfd(3)?; + // We'll use `async-io(-mini)` for networking, so ESP IDF VFS needs to be initialized + // esp_idf_svc::io::vfs::initialize_eventfd(3)?; + core::mem::forget(esp_idf_svc::io::vfs::MountedEventfs::mount(3)); esp_idf_svc::hal::task::block_on(init_async_io_async()); diff --git a/src/wireless.rs b/src/wireless.rs index d1bd56d..088b921 100644 --- a/src/wireless.rs +++ b/src/wireless.rs @@ -139,7 +139,7 @@ where } } -impl<'a, 'd, T> Ble for EspMatterBle<'a, 'd, T> +impl<'a, T> Ble for EspMatterBle<'a, '_, T> where T: BluetoothModemPeripheral, { @@ -239,7 +239,7 @@ mod wifi { EspSystemEventLoop, ); - impl<'a> WifiSvc for EspWifiSplit<'a> { + impl WifiSvc for EspWifiSplit<'_> { type Error = EspError; async fn get_capabilities(&self) -> Result, Self::Error> { @@ -320,7 +320,7 @@ mod wifi { } } - impl<'a> Netif for EspWifiSplit<'a> { + impl Netif for EspWifiSplit<'_> { async fn get_conf(&self) -> Result, Error> { let wifi = self.0.lock().await; @@ -341,13 +341,13 @@ mod wifi { } } - impl<'a> NetifRun for EspWifiSplit<'a> { + impl NetifRun for EspWifiSplit<'_> { async fn run(&self) -> Result<(), Error> { core::future::pending().await } } - impl<'a> UdpBind for EspWifiSplit<'a> { + impl UdpBind for EspWifiSplit<'_> { type Error = io::Error; type Socket<'b> = UdpSocket @@ -392,7 +392,7 @@ mod wifi { } } - impl<'d, T> Wireless for EspMatterWifi<'d, T> + impl Wireless for EspMatterWifi<'_, T> where T: WifiModemPeripheral, {