diff --git a/esp-wifi/src/esp_now/mod.rs b/esp-wifi/src/esp_now/mod.rs index 49c8e25782..2c2d01ff89 100644 --- a/esp-wifi/src/esp_now/mod.rs +++ b/esp-wifi/src/esp_now/mod.rs @@ -16,11 +16,13 @@ use critical_section::Mutex; use enumset::EnumSet; use portable_atomic::{AtomicBool, AtomicU8, Ordering}; +#[cfg(csi_enable)] +use crate::wifi::CsiConfig; use crate::{ binary::include::*, hal::peripheral::{Peripheral, PeripheralRef}, - wifi::{CsiConfig, Protocol, RxControlInfo, WifiError}, - EspWifiInitialization, + wifi::{Protocol, RxControlInfo, WifiError}, + EspWifiController, }; const RECEIVE_QUEUE_SIZE: usize = 10; diff --git a/esp-wifi/src/wifi/mod.rs b/esp-wifi/src/wifi/mod.rs index c0f9b1da9d..8c5192803a 100644 --- a/esp-wifi/src/wifi/mod.rs +++ b/esp-wifi/src/wifi/mod.rs @@ -82,6 +82,14 @@ pub mod utils; #[cfg(coex)] use include::{coex_adapter_funcs_t, coex_pre_init, esp_coex_adapter_register}; +#[cfg(csi_enable)] +use crate::binary::include::{ + esp_wifi_set_csi, + esp_wifi_set_csi_config, + esp_wifi_set_csi_rx_cb, + wifi_csi_acquire_config_t, + wifi_csi_config_t, +}; use crate::binary::{ c_types, include::{ @@ -103,9 +111,6 @@ use crate::binary::{ esp_wifi_scan_start, esp_wifi_set_config, esp_wifi_set_country, - esp_wifi_set_csi, - esp_wifi_set_csi_config, - esp_wifi_set_csi_rx_cb, esp_wifi_set_mode, esp_wifi_set_protocol, esp_wifi_set_ps, @@ -120,8 +125,6 @@ use crate::binary::{ wifi_config_t, wifi_country_policy_t_WIFI_COUNTRY_POLICY_MANUAL, wifi_country_t, - wifi_csi_acquire_config_t, - wifi_csi_config_t, wifi_init_config_t, wifi_interface_t, wifi_interface_t_WIFI_IF_AP,