diff --git a/esp-wifi/src/ble/btdm.rs b/esp-wifi/src/ble/btdm.rs index 879f8216687..80fc92e174d 100644 --- a/esp-wifi/src/ble/btdm.rs +++ b/esp-wifi/src/ble/btdm.rs @@ -372,7 +372,7 @@ unsafe extern "C" fn btdm_hus_2_lpcycles(us: u32) -> u32 { // Converts a duration in half us into a number of low power clock cycles. let cycles: u64 = (us as u64) << (g_btdm_lpcycle_us_frac as u64 / g_btdm_lpcycle_us as u64); - debug!("*** NOT implemented btdm_hus_2_lpcycles {} {}", us, cycles); + trace!("btdm_hus_2_lpcycles {} {}", us, cycles); // probably not right ... NX returns half of the values we calculate here cycles as u32 @@ -403,13 +403,13 @@ unsafe extern "C" fn btdm_sleep_exit_phase3() { } unsafe extern "C" fn coex_schm_status_bit_set(_typ: i32, status: i32) { - debug!("coex_schm_status_bit_set {} {}", _typ, status); + trace!("coex_schm_status_bit_set {} {}", _typ, status); #[cfg(coex)] crate::binary::include::coex_schm_status_bit_set(_typ as u32, status as u32); } unsafe extern "C" fn coex_schm_status_bit_clear(_typ: i32, status: i32) { - debug!("coex_schm_status_bit_clear {} {}", _typ, status); + trace!("coex_schm_status_bit_clear {} {}", _typ, status); #[cfg(coex)] crate::binary::include::coex_schm_status_bit_clear(_typ as u32, status as u32); } diff --git a/esp-wifi/src/ble/npl.rs b/esp-wifi/src/ble/npl.rs index cc7cd914d56..e4a5547ebfe 100644 --- a/esp-wifi/src/ble/npl.rs +++ b/esp-wifi/src/ble/npl.rs @@ -1316,13 +1316,13 @@ fn os_msys_init() { unsafe extern "C" fn ble_hs_hci_rx_evt(cmd: *const u8, arg: *const c_void) -> i32 { trace!("ble_hs_hci_rx_evt {:?} {:?}", cmd, arg); - debug!("$ cmd = {:x}", *cmd); - debug!("$ len = {:x}", *(cmd.offset(1))); + trace!("$ cmd = {:x}", *cmd); + trace!("$ len = {:x}", *(cmd.offset(1))); let event = *cmd; let len = *(cmd.offset(1)) as usize; let payload = core::slice::from_raw_parts(cmd.offset(2), len); - debug!("$ pld = {:?}", payload); + trace!("$ pld = {:?}", payload); critical_section::with(|cs| { let mut queue = BT_RECEIVE_QUEUE.borrow_ref_mut(cs); diff --git a/esp-wifi/src/ble/os_adapter_esp32.rs b/esp-wifi/src/ble/os_adapter_esp32.rs index 7b3b22a416e..39f55cadc2b 100644 --- a/esp-wifi/src/ble/os_adapter_esp32.rs +++ b/esp-wifi/src/ble/os_adapter_esp32.rs @@ -376,7 +376,7 @@ pub(crate) fn disable_sleep_mode() { } pub(crate) unsafe extern "C" fn coex_bt_wakeup_request() -> bool { - debug!("coex_bt_wakeup_request"); + trace!("coex_bt_wakeup_request"); #[cfg(coex)] return async_wakeup_request(BTDM_ASYNC_WAKEUP_REQ_COEX); @@ -393,7 +393,7 @@ pub(crate) unsafe extern "C" fn coex_bt_wakeup_request_end() { #[allow(unused_variables)] pub(crate) unsafe extern "C" fn coex_bt_request(event: u32, latency: u32, duration: u32) -> i32 { - debug!("coex_bt_request"); + trace!("coex_bt_request"); extern "C" { #[cfg(coex)] fn coex_bt_request(event: u32, latency: u32, duration: u32) -> i32; @@ -408,7 +408,7 @@ pub(crate) unsafe extern "C" fn coex_bt_request(event: u32, latency: u32, durati #[allow(unused_variables)] pub(crate) unsafe extern "C" fn coex_bt_release(event: u32) -> i32 { - debug!("coex_bt_release"); + trace!("coex_bt_release"); extern "C" { #[cfg(coex)] fn coex_bt_release(event: u32) -> i32; @@ -438,7 +438,7 @@ pub(crate) unsafe extern "C" fn coex_register_bt_cb_wrapper( } pub(crate) unsafe extern "C" fn coex_bb_reset_lock() -> u32 { - debug!("coex_bb_reset_lock"); + trace!("coex_bb_reset_lock"); extern "C" { #[cfg(coex)] fn coex_bb_reset_lock() -> u32; @@ -453,7 +453,7 @@ pub(crate) unsafe extern "C" fn coex_bb_reset_lock() -> u32 { #[allow(unused_variables)] pub(crate) unsafe extern "C" fn coex_bb_reset_unlock(event: u32) { - debug!("coex_bb_reset_unlock"); + trace!("coex_bb_reset_unlock"); extern "C" { #[cfg(coex)] fn coex_bb_reset_unlock(event: u32); @@ -480,7 +480,7 @@ pub(crate) unsafe extern "C" fn coex_schm_register_btdm_callback_wrapper( } pub(crate) unsafe extern "C" fn coex_schm_interval_get() -> u32 { - debug!("coex_schm_interval_get"); + trace!("coex_schm_interval_get"); #[cfg(coex)] return crate::binary::include::coex_schm_interval_get(); @@ -490,7 +490,7 @@ pub(crate) unsafe extern "C" fn coex_schm_interval_get() -> u32 { } pub(crate) unsafe extern "C" fn coex_schm_curr_period_get() -> u8 { - debug!("coex_schm_curr_period_get"); + trace!("coex_schm_curr_period_get"); #[cfg(coex)] return crate::binary::include::coex_schm_curr_period_get(); @@ -500,7 +500,7 @@ pub(crate) unsafe extern "C" fn coex_schm_curr_period_get() -> u8 { } pub(crate) unsafe extern "C" fn coex_schm_curr_phase_get() -> *const () { - debug!("coex_schm_curr_phase_get"); + trace!("coex_schm_curr_phase_get"); #[cfg(coex)] return crate::binary::include::coex_schm_curr_phase_get() as *const (); diff --git a/esp-wifi/src/ble/os_adapter_esp32c3.rs b/esp-wifi/src/ble/os_adapter_esp32c3.rs index 6d27236a5c1..697e17e4189 100644 --- a/esp-wifi/src/ble/os_adapter_esp32c3.rs +++ b/esp-wifi/src/ble/os_adapter_esp32c3.rs @@ -235,7 +235,7 @@ extern "C" fn ets_delay_us_wrapper(us: u32) { } extern "C" fn btdm_rom_table_ready_wrapper() { - debug!("btdm_rom_table_ready_wrapper not implemented"); + trace!("btdm_rom_table_ready_wrapper not implemented"); // #if BT_BLE_CCA_MODE == 2 // btdm_cca_feature_enable(); @@ -370,7 +370,7 @@ pub(crate) unsafe extern "C" fn interrupt_handler_set( } pub(crate) unsafe extern "C" fn coex_wifi_sleep_set(sleep: i32) { - debug!( + trace!( "ignored coex_wifi_sleep_set {} - because original implementation does the same", sleep ); @@ -384,7 +384,7 @@ pub(crate) unsafe extern "C" fn coex_core_ble_conn_dyn_prio_get( extern "C" { fn coex_core_ble_conn_dyn_prio_get(low: *mut i32, high: *mut i32) -> i32; } - debug!("coex_core_ble_conn_dyn_prio_get"); + trace!("coex_core_ble_conn_dyn_prio_get"); #[cfg(coex)] return coex_core_ble_conn_dyn_prio_get(low, high); diff --git a/esp-wifi/src/ble/os_adapter_esp32c6.rs b/esp-wifi/src/ble/os_adapter_esp32c6.rs index 6f90a45cf4c..50b1127e058 100644 --- a/esp-wifi/src/ble/os_adapter_esp32c6.rs +++ b/esp-wifi/src/ble/os_adapter_esp32c6.rs @@ -82,9 +82,13 @@ pub(super) unsafe extern "C" fn esp_intr_alloc( arg: *mut crate::binary::c_types::c_void, ret_handle: *mut *mut crate::binary::c_types::c_void, ) -> i32 { - debug!( + trace!( "esp_intr_alloc {} {} {:?} {:?} {:?}", - source, flags, handler, arg, ret_handle + source, + flags, + handler, + arg, + ret_handle ); match source { diff --git a/esp-wifi/src/ble/os_adapter_esp32h2.rs b/esp-wifi/src/ble/os_adapter_esp32h2.rs index e7acc24bcde..f0f8d49b1f1 100644 --- a/esp-wifi/src/ble/os_adapter_esp32h2.rs +++ b/esp-wifi/src/ble/os_adapter_esp32h2.rs @@ -82,9 +82,13 @@ pub(super) unsafe extern "C" fn esp_intr_alloc( arg: *mut crate::binary::c_types::c_void, ret_handle: *mut *mut crate::binary::c_types::c_void, ) -> i32 { - debug!( + trace!( "esp_intr_alloc {} {} {:?} {:?} {:?}", - source, flags, handler, arg, ret_handle + source, + flags, + handler, + arg, + ret_handle ); match source { diff --git a/esp-wifi/src/ble/os_adapter_esp32s3.rs b/esp-wifi/src/ble/os_adapter_esp32s3.rs index 00acc19bb63..71960df0023 100644 --- a/esp-wifi/src/ble/os_adapter_esp32s3.rs +++ b/esp-wifi/src/ble/os_adapter_esp32s3.rs @@ -239,7 +239,7 @@ extern "C" fn ets_delay_us_wrapper(us: u32) { } extern "C" fn btdm_rom_table_ready_wrapper() { - debug!("btdm_rom_table_ready_wrapper is NOT implemented"); + trace!("btdm_rom_table_ready_wrapper is NOT implemented"); // #if BT_BLE_CCA_MODE == 2 // btdm_cca_feature_enable(); @@ -383,7 +383,7 @@ pub(crate) unsafe extern "C" fn interrupt_handler_set( } pub(crate) unsafe extern "C" fn coex_wifi_sleep_set(sleep: i32) { - debug!( + trace!( "ignored coex_wifi_sleep_set {} - because original implementation does the same", sleep ); @@ -397,7 +397,7 @@ pub(crate) unsafe extern "C" fn coex_core_ble_conn_dyn_prio_get( extern "C" { fn coex_core_ble_conn_dyn_prio_get(low: *mut i32, high: *mut i32) -> i32; } - debug!("coex_core_ble_conn_dyn_prio_get"); + trace!("coex_core_ble_conn_dyn_prio_get"); #[cfg(coex)] return coex_core_ble_conn_dyn_prio_get(low, high); diff --git a/esp-wifi/src/compat/timer_compat.rs b/esp-wifi/src/compat/timer_compat.rs index ca734a4d1ff..8d9587208db 100644 --- a/esp-wifi/src/compat/timer_compat.rs +++ b/esp-wifi/src/compat/timer_compat.rs @@ -53,9 +53,12 @@ pub fn compat_timer_arm_us(ets_timer: *mut ets_timer, us: u32, repeat: bool) { let systick = crate::timer::get_systimer_count(); let ticks = crate::timer::micros_to_ticks(us as u64); - debug!( + trace!( "timer_arm_us {:x} current: {} ticks: {} repeat: {}", - ets_timer as usize, systick, ticks, repeat + ets_timer as usize, + systick, + ticks, + repeat ); critical_section::with(|_| unsafe { @@ -65,7 +68,7 @@ pub fn compat_timer_arm_us(ets_timer: *mut ets_timer, us: u32, repeat: bool) { timer.active = true; timer.periodic = repeat; } else { - debug!("timer_arm_us {:x} not found", ets_timer as usize); + trace!("timer_arm_us {:x} not found", ets_timer as usize); } }) } @@ -73,10 +76,10 @@ pub fn compat_timer_arm_us(ets_timer: *mut ets_timer, us: u32, repeat: bool) { pub fn compat_timer_disarm(ets_timer: *mut ets_timer) { critical_section::with(|_| unsafe { if let Some(timer) = TIMERS.iter_mut().find(|t| t.ets_timer == ets_timer) { - debug!("timer_disarm {:x}", timer.id()); + trace!("timer_disarm {:x}", timer.id()); timer.active = false; } else { - debug!("timer_disarm {:x} not found", ets_timer as usize); + trace!("timer_disarm {:x} not found", ets_timer as usize); } }) } @@ -88,7 +91,7 @@ pub fn compat_timer_done(ets_timer: *mut ets_timer) { .enumerate() .find(|(_, t)| t.ets_timer == ets_timer) { - debug!("timer_done {:x}", timer.id()); + trace!("timer_done {:x}", timer.id()); timer.active = false; (*ets_timer).priv_ = core::ptr::null_mut(); @@ -96,7 +99,7 @@ pub fn compat_timer_done(ets_timer: *mut ets_timer) { TIMERS.swap_remove(idx); } else { - debug!("timer_done {:x} not found", ets_timer as usize); + trace!("timer_done {:x} not found", ets_timer as usize); } }) } @@ -106,9 +109,11 @@ pub fn compat_timer_setfn( pfunction: unsafe extern "C" fn(*mut c_types::c_void), parg: *mut c_types::c_void, ) { - debug!( + trace!( "timer_setfn {:x} {:?} {:?}", - ets_timer as usize, pfunction, parg + ets_timer as usize, + pfunction, + parg ); let set = critical_section::with(|_| unsafe { diff --git a/esp-wifi/src/tasks.rs b/esp-wifi/src/tasks.rs index 51eeb5455b7..c2d329daa42 100644 --- a/esp-wifi/src/tasks.rs +++ b/esp-wifi/src/tasks.rs @@ -24,7 +24,7 @@ pub extern "C" fn timer_task(_param: *mut esp_wifi_sys::c_types::c_void) { if timer.active && crate::timer::time_diff(timer.started, current_timestamp) >= timer.timeout { - debug!("timer is due.... {:x}", timer.id()); + trace!("timer is due.... {:x}", timer.id()); if to_run.enqueue(timer.callback).is_err() { break;