Change debug! to trace! to reduce logging noise (#2284)

This commit is contained in:
Björn Quentin 2024-10-07 11:29:41 +02:00 committed by GitHub
parent efe58e94a2
commit e5bc63916f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 47 additions and 34 deletions

View File

@ -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. // 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); 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 // probably not right ... NX returns half of the values we calculate here
cycles as u32 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) { 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)] #[cfg(coex)]
crate::binary::include::coex_schm_status_bit_set(_typ as u32, status as u32); 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) { 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)] #[cfg(coex)]
crate::binary::include::coex_schm_status_bit_clear(_typ as u32, status as u32); crate::binary::include::coex_schm_status_bit_clear(_typ as u32, status as u32);
} }

View File

@ -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 { 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); trace!("ble_hs_hci_rx_evt {:?} {:?}", cmd, arg);
debug!("$ cmd = {:x}", *cmd); trace!("$ cmd = {:x}", *cmd);
debug!("$ len = {:x}", *(cmd.offset(1))); trace!("$ len = {:x}", *(cmd.offset(1)));
let event = *cmd; let event = *cmd;
let len = *(cmd.offset(1)) as usize; let len = *(cmd.offset(1)) as usize;
let payload = core::slice::from_raw_parts(cmd.offset(2), len); let payload = core::slice::from_raw_parts(cmd.offset(2), len);
debug!("$ pld = {:?}", payload); trace!("$ pld = {:?}", payload);
critical_section::with(|cs| { critical_section::with(|cs| {
let mut queue = BT_RECEIVE_QUEUE.borrow_ref_mut(cs); let mut queue = BT_RECEIVE_QUEUE.borrow_ref_mut(cs);

View File

@ -376,7 +376,7 @@ pub(crate) fn disable_sleep_mode() {
} }
pub(crate) unsafe extern "C" fn coex_bt_wakeup_request() -> bool { pub(crate) unsafe extern "C" fn coex_bt_wakeup_request() -> bool {
debug!("coex_bt_wakeup_request"); trace!("coex_bt_wakeup_request");
#[cfg(coex)] #[cfg(coex)]
return async_wakeup_request(BTDM_ASYNC_WAKEUP_REQ_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)] #[allow(unused_variables)]
pub(crate) unsafe extern "C" fn coex_bt_request(event: u32, latency: u32, duration: u32) -> i32 { 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" { extern "C" {
#[cfg(coex)] #[cfg(coex)]
fn coex_bt_request(event: u32, latency: u32, duration: u32) -> i32; 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)] #[allow(unused_variables)]
pub(crate) unsafe extern "C" fn coex_bt_release(event: u32) -> i32 { pub(crate) unsafe extern "C" fn coex_bt_release(event: u32) -> i32 {
debug!("coex_bt_release"); trace!("coex_bt_release");
extern "C" { extern "C" {
#[cfg(coex)] #[cfg(coex)]
fn coex_bt_release(event: u32) -> i32; 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 { pub(crate) unsafe extern "C" fn coex_bb_reset_lock() -> u32 {
debug!("coex_bb_reset_lock"); trace!("coex_bb_reset_lock");
extern "C" { extern "C" {
#[cfg(coex)] #[cfg(coex)]
fn coex_bb_reset_lock() -> u32; fn coex_bb_reset_lock() -> u32;
@ -453,7 +453,7 @@ pub(crate) unsafe extern "C" fn coex_bb_reset_lock() -> u32 {
#[allow(unused_variables)] #[allow(unused_variables)]
pub(crate) unsafe extern "C" fn coex_bb_reset_unlock(event: u32) { pub(crate) unsafe extern "C" fn coex_bb_reset_unlock(event: u32) {
debug!("coex_bb_reset_unlock"); trace!("coex_bb_reset_unlock");
extern "C" { extern "C" {
#[cfg(coex)] #[cfg(coex)]
fn coex_bb_reset_unlock(event: u32); 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 { pub(crate) unsafe extern "C" fn coex_schm_interval_get() -> u32 {
debug!("coex_schm_interval_get"); trace!("coex_schm_interval_get");
#[cfg(coex)] #[cfg(coex)]
return crate::binary::include::coex_schm_interval_get(); 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 { 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)] #[cfg(coex)]
return crate::binary::include::coex_schm_curr_period_get(); 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 () { 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)] #[cfg(coex)]
return crate::binary::include::coex_schm_curr_phase_get() as *const (); return crate::binary::include::coex_schm_curr_phase_get() as *const ();

View File

@ -235,7 +235,7 @@ extern "C" fn ets_delay_us_wrapper(us: u32) {
} }
extern "C" fn btdm_rom_table_ready_wrapper() { 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 // #if BT_BLE_CCA_MODE == 2
// btdm_cca_feature_enable(); // 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) { 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", "ignored coex_wifi_sleep_set {} - because original implementation does the same",
sleep sleep
); );
@ -384,7 +384,7 @@ pub(crate) unsafe extern "C" fn coex_core_ble_conn_dyn_prio_get(
extern "C" { extern "C" {
fn coex_core_ble_conn_dyn_prio_get(low: *mut i32, high: *mut i32) -> i32; 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)] #[cfg(coex)]
return coex_core_ble_conn_dyn_prio_get(low, high); return coex_core_ble_conn_dyn_prio_get(low, high);

View File

@ -82,9 +82,13 @@ pub(super) unsafe extern "C" fn esp_intr_alloc(
arg: *mut crate::binary::c_types::c_void, arg: *mut crate::binary::c_types::c_void,
ret_handle: *mut *mut crate::binary::c_types::c_void, ret_handle: *mut *mut crate::binary::c_types::c_void,
) -> i32 { ) -> i32 {
debug!( trace!(
"esp_intr_alloc {} {} {:?} {:?} {:?}", "esp_intr_alloc {} {} {:?} {:?} {:?}",
source, flags, handler, arg, ret_handle source,
flags,
handler,
arg,
ret_handle
); );
match source { match source {

View File

@ -82,9 +82,13 @@ pub(super) unsafe extern "C" fn esp_intr_alloc(
arg: *mut crate::binary::c_types::c_void, arg: *mut crate::binary::c_types::c_void,
ret_handle: *mut *mut crate::binary::c_types::c_void, ret_handle: *mut *mut crate::binary::c_types::c_void,
) -> i32 { ) -> i32 {
debug!( trace!(
"esp_intr_alloc {} {} {:?} {:?} {:?}", "esp_intr_alloc {} {} {:?} {:?} {:?}",
source, flags, handler, arg, ret_handle source,
flags,
handler,
arg,
ret_handle
); );
match source { match source {

View File

@ -239,7 +239,7 @@ extern "C" fn ets_delay_us_wrapper(us: u32) {
} }
extern "C" fn btdm_rom_table_ready_wrapper() { 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 // #if BT_BLE_CCA_MODE == 2
// btdm_cca_feature_enable(); // 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) { 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", "ignored coex_wifi_sleep_set {} - because original implementation does the same",
sleep sleep
); );
@ -397,7 +397,7 @@ pub(crate) unsafe extern "C" fn coex_core_ble_conn_dyn_prio_get(
extern "C" { extern "C" {
fn coex_core_ble_conn_dyn_prio_get(low: *mut i32, high: *mut i32) -> i32; 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)] #[cfg(coex)]
return coex_core_ble_conn_dyn_prio_get(low, high); return coex_core_ble_conn_dyn_prio_get(low, high);

View File

@ -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 systick = crate::timer::get_systimer_count();
let ticks = crate::timer::micros_to_ticks(us as u64); let ticks = crate::timer::micros_to_ticks(us as u64);
debug!( trace!(
"timer_arm_us {:x} current: {} ticks: {} repeat: {}", "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 { 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.active = true;
timer.periodic = repeat; timer.periodic = repeat;
} else { } 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) { pub fn compat_timer_disarm(ets_timer: *mut ets_timer) {
critical_section::with(|_| unsafe { critical_section::with(|_| unsafe {
if let Some(timer) = TIMERS.iter_mut().find(|t| t.ets_timer == ets_timer) { 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; timer.active = false;
} else { } 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() .enumerate()
.find(|(_, t)| t.ets_timer == ets_timer) .find(|(_, t)| t.ets_timer == ets_timer)
{ {
debug!("timer_done {:x}", timer.id()); trace!("timer_done {:x}", timer.id());
timer.active = false; timer.active = false;
(*ets_timer).priv_ = core::ptr::null_mut(); (*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); TIMERS.swap_remove(idx);
} else { } 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), pfunction: unsafe extern "C" fn(*mut c_types::c_void),
parg: *mut c_types::c_void, parg: *mut c_types::c_void,
) { ) {
debug!( trace!(
"timer_setfn {:x} {:?} {:?}", "timer_setfn {:x} {:?} {:?}",
ets_timer as usize, pfunction, parg ets_timer as usize,
pfunction,
parg
); );
let set = critical_section::with(|_| unsafe { let set = critical_section::with(|_| unsafe {

View File

@ -24,7 +24,7 @@ pub extern "C" fn timer_task(_param: *mut esp_wifi_sys::c_types::c_void) {
if timer.active if timer.active
&& crate::timer::time_diff(timer.started, current_timestamp) >= timer.timeout && 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() { if to_run.enqueue(timer.callback).is_err() {
break; break;