Skip to content

Commit bf51367

Browse files
bugadanibjoernQ
authored andcommitted
Misc small changes (esp-rs#312)
* Set levels to trace, unify some stuff, implement int disable * Remove unnecessary paths * Only check once if random is set, copy impl from esp-hal * Avoid matching on constant * Print current time in same line as other arming params * Simplify tick <-> time conversions * Work around espflash resolving timer addresses * Raise compat_timer_setfn level to debug * Resolve warnings * Fix malloc pointer mutability * Simplify import * Resolve commented question
1 parent b472395 commit bf51367

28 files changed

+284
-311
lines changed

esp-wifi/src/ble/btdm.rs

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,14 @@ use critical_section::Mutex;
55
use crate::ble::btdm::ble_os_adapter_chip_specific::G_OSI_FUNCS;
66
use crate::ble::HciOutCollector;
77
use crate::ble::HCI_OUT_COLLECTOR;
8+
use crate::hal::macros::ram;
89
use crate::{
910
binary::include::*,
1011
compat::{common::str_from_c, queue::SimpleQueue, work_queue::queue_work},
1112
memory_fence::memory_fence,
1213
timer::yield_task,
1314
};
1415

15-
#[cfg(esp32)]
16-
use esp32_hal as hal;
17-
#[cfg(esp32c3)]
18-
use esp32c3_hal as hal;
19-
#[cfg(esp32s3)]
20-
use esp32s3_hal as hal;
21-
22-
use hal::macros::ram;
23-
2416
#[cfg_attr(esp32c3, path = "os_adapter_esp32c3.rs")]
2517
#[cfg_attr(esp32s3, path = "os_adapter_esp32s3.rs")]
2618
#[cfg_attr(esp32, path = "os_adapter_esp32.rs")]
@@ -226,9 +218,8 @@ unsafe extern "C" fn queue_recv(queue: *const (), item: *const (), block_time_ms
226218
block_time_ms
227219
);
228220

229-
// is this ticks or millis?
230-
let end_time = crate::timer::get_systimer_count()
231-
+ (block_time_ms as u64 * (crate::timer::TICKS_PER_SECOND / 1000));
221+
let end_time_ticks =
222+
crate::timer::get_systimer_count() + crate::timer::millis_to_ticks(block_time_ms as u64);
232223

233224
// handle the BT_QUEUE
234225
if queue == &BT_INTERNAL_QUEUE as *const _ as *const () {
@@ -257,7 +248,7 @@ unsafe extern "C" fn queue_recv(queue: *const (), item: *const (), block_time_ms
257248
}
258249

259250
if block_time_ms != OSI_FUNCS_TIME_BLOCKING
260-
&& crate::timer::get_systimer_count() > end_time
251+
&& crate::timer::get_systimer_count() > end_time_ticks
261252
{
262253
trace!("queue_recv returns with timeout");
263254
return -1;
@@ -338,18 +329,6 @@ unsafe extern "C" fn cause_sw_intr_to_core(_core: i32, _intr_no: i32) -> i32 {
338329
}
339330
}
340331

341-
unsafe extern "C" fn malloc(size: u32) -> *const () {
342-
crate::compat::malloc::malloc(size as usize) as *const ()
343-
}
344-
345-
unsafe extern "C" fn malloc_internal(size: u32) -> *const () {
346-
crate::compat::malloc::malloc(size as usize) as *const ()
347-
}
348-
349-
unsafe extern "C" fn free(ptr: *const ()) {
350-
crate::compat::malloc::free(ptr as *const u8);
351-
}
352-
353332
#[allow(unused)]
354333
#[ram]
355334
unsafe extern "C" fn srand(seed: u32) {

esp-wifi/src/ble/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ pub(crate) use ble::send_hci;
1919

2020
pub mod controller;
2121

22+
pub unsafe extern "C" fn malloc(size: u32) -> *mut crate::binary::c_types::c_void {
23+
crate::compat::malloc::malloc(size as usize).cast()
24+
}
25+
26+
pub unsafe extern "C" fn malloc_internal(size: u32) -> *mut crate::binary::c_types::c_void {
27+
crate::compat::malloc::malloc(size as usize).cast()
28+
}
29+
30+
pub unsafe extern "C" fn free(ptr: *mut crate::binary::c_types::c_void) {
31+
crate::compat::malloc::free(ptr.cast())
32+
}
33+
2234
static mut HCI_OUT_COLLECTOR: MaybeUninit<HciOutCollector> = MaybeUninit::uninit();
2335

2436
#[derive(PartialEq, Debug)]

esp-wifi/src/ble/npl.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ pub struct ext_funcs_t {
288288
>,
289289
esp_intr_free:
290290
Option<unsafe extern "C" fn(ret_handle: *mut *mut crate::binary::c_types::c_void) -> i32>,
291-
malloc: Option<unsafe extern "C" fn(size: u32) -> *const u8>,
292-
free: Option<unsafe extern "C" fn(*const crate::binary::c_types::c_void)>,
291+
malloc: Option<unsafe extern "C" fn(size: u32) -> *mut crate::binary::c_types::c_void>,
292+
free: Option<unsafe extern "C" fn(*mut crate::binary::c_types::c_void)>,
293293
hal_uart_start_tx: Option<unsafe extern "C" fn(i32)>,
294294
hal_uart_init_cbs: Option<
295295
unsafe extern "C" fn(
@@ -330,8 +330,8 @@ static G_OSI_FUNCS: ext_funcs_t = ext_funcs_t {
330330
ext_version: 0x20221122,
331331
esp_intr_alloc: Some(self::ble_os_adapter_chip_specific::esp_intr_alloc),
332332
esp_intr_free: Some(esp_intr_free),
333-
malloc: Some(self::malloc),
334-
free: Some(free),
333+
malloc: Some(crate::ble::malloc),
334+
free: Some(crate::ble::free),
335335
hal_uart_start_tx: None,
336336
hal_uart_init_cbs: None,
337337
hal_uart_config: None,
@@ -417,14 +417,6 @@ unsafe extern "C" fn esp_intr_free(_ret_handle: *mut *mut crate::binary::c_types
417417
todo!();
418418
}
419419

420-
unsafe extern "C" fn malloc(size: u32) -> *const u8 {
421-
crate::compat::malloc::malloc(size as usize)
422-
}
423-
424-
unsafe extern "C" fn free(ptr: *const crate::binary::c_types::c_void) {
425-
crate::compat::malloc::free(ptr as *const u8);
426-
}
427-
428420
#[repr(C)]
429421
pub struct npl_funcs_t {
430422
p_ble_npl_os_started: Option<unsafe extern "C" fn() -> bool>,

esp-wifi/src/ble/os_adapter_esp32.rs

Lines changed: 32 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,22 @@ pub(super) struct osi_funcs_s {
3030
version: u32,
3131
set_isr: Option<unsafe extern "C" fn(i32, unsafe extern "C" fn(), *const ()) -> i32>,
3232
ints_on: Option<unsafe extern "C" fn(u32)>,
33-
interrupt_disable: Option<unsafe extern "C" fn() -> ()>,
34-
interrupt_restore: Option<unsafe extern "C" fn() -> ()>,
35-
task_yield: Option<unsafe extern "C" fn() -> ()>,
36-
task_yield_from_isr: Option<unsafe extern "C" fn() -> ()>,
33+
interrupt_disable: Option<unsafe extern "C" fn()>,
34+
interrupt_restore: Option<unsafe extern "C" fn()>,
35+
task_yield: Option<unsafe extern "C" fn()>,
36+
task_yield_from_isr: Option<unsafe extern "C" fn()>,
3737
semphr_create: Option<unsafe extern "C" fn(u32, u32) -> *const ()>,
38-
semphr_delete: Option<unsafe extern "C" fn(*const ()) -> ()>,
38+
semphr_delete: Option<unsafe extern "C" fn(*const ())>,
3939
semphr_take_from_isr: Option<unsafe extern "C" fn(*const (), *const ()) -> i32>,
4040
semphr_give_from_isr: Option<unsafe extern "C" fn(*const (), *const ()) -> i32>,
4141
semphr_take: Option<unsafe extern "C" fn(*const (), u32) -> i32>,
4242
semphr_give: Option<unsafe extern "C" fn(*const ()) -> i32>,
4343
mutex_create: Option<unsafe extern "C" fn() -> *const ()>,
44-
mutex_delete: Option<unsafe extern "C" fn(*const ()) -> ()>,
44+
mutex_delete: Option<unsafe extern "C" fn(*const ())>,
4545
mutex_lock: Option<unsafe extern "C" fn(*const ()) -> i32>,
4646
mutex_unlock: Option<unsafe extern "C" fn(*const ()) -> i32>,
4747
queue_create: Option<unsafe extern "C" fn(u32, u32) -> *const ()>,
48-
queue_delete: Option<unsafe extern "C" fn(*const ()) -> ()>,
48+
queue_delete: Option<unsafe extern "C" fn(*const ())>,
4949
queue_send: Option<unsafe extern "C" fn(*const (), *const (), u32) -> i32>,
5050
queue_send_from_isr: Option<unsafe extern "C" fn(*const (), *const (), *const ()) -> i32>,
5151
queue_recv: Option<unsafe extern "C" fn(*const (), *const (), u32) -> i32>,
@@ -61,42 +61,42 @@ pub(super) struct osi_funcs_s {
6161
u32,
6262
) -> i32,
6363
>,
64-
task_delete: Option<unsafe extern "C" fn(*const ()) -> ()>,
64+
task_delete: Option<unsafe extern "C" fn(*const ())>,
6565
is_in_isr: Option<unsafe extern "C" fn() -> i32>,
6666
cause_sw_intr_to_core: Option<unsafe extern "C" fn(i32, i32) -> i32>,
67-
malloc: Option<unsafe extern "C" fn(u32) -> *const ()>,
68-
malloc_internal: Option<unsafe extern "C" fn(u32) -> *const ()>,
69-
free: Option<unsafe extern "C" fn(*const ()) -> ()>,
67+
malloc: Option<unsafe extern "C" fn(u32) -> *mut crate::binary::c_types::c_void>,
68+
malloc_internal: Option<unsafe extern "C" fn(u32) -> *mut crate::binary::c_types::c_void>,
69+
free: Option<unsafe extern "C" fn(*mut crate::binary::c_types::c_void)>,
7070
read_efuse_mac: Option<unsafe extern "C" fn(*const ()) -> i32>,
71-
srand: Option<unsafe extern "C" fn(u32) -> ()>,
71+
srand: Option<unsafe extern "C" fn(u32)>,
7272
rand: Option<unsafe extern "C" fn() -> i32>,
7373
btdm_lpcycles_2_hus: Option<unsafe extern "C" fn(u32, u32) -> u32>,
7474
btdm_hus_2_lpcycles: Option<unsafe extern "C" fn(u32) -> u32>,
7575
btdm_sleep_check_duration: Option<unsafe extern "C" fn(i32) -> i32>,
76-
btdm_sleep_enter_phase1: Option<unsafe extern "C" fn(i32) -> ()>,
77-
btdm_sleep_enter_phase2: Option<unsafe extern "C" fn() -> ()>,
78-
btdm_sleep_exit_phase1: Option<unsafe extern "C" fn() -> ()>,
79-
btdm_sleep_exit_phase2: Option<unsafe extern "C" fn() -> ()>,
80-
btdm_sleep_exit_phase3: Option<unsafe extern "C" fn() -> ()>,
76+
btdm_sleep_enter_phase1: Option<unsafe extern "C" fn(i32)>,
77+
btdm_sleep_enter_phase2: Option<unsafe extern "C" fn()>,
78+
btdm_sleep_exit_phase1: Option<unsafe extern "C" fn()>,
79+
btdm_sleep_exit_phase2: Option<unsafe extern "C" fn()>,
80+
btdm_sleep_exit_phase3: Option<unsafe extern "C" fn()>,
8181
coex_bt_wakeup_request: Option<unsafe extern "C" fn() -> bool>,
82-
coex_bt_wakeup_request_end: Option<unsafe extern "C" fn() -> ()>,
82+
coex_bt_wakeup_request_end: Option<unsafe extern "C" fn()>,
8383
coex_bt_request: Option<unsafe extern "C" fn(u32, u32, u32) -> i32>,
8484
coex_bt_release: Option<unsafe extern "C" fn(u32) -> i32>,
8585
coex_register_bt_cb: Option<unsafe extern "C" fn(unsafe extern "C" fn()) -> i32>,
8686
coex_bb_reset_lock: Option<unsafe extern "C" fn() -> u32>,
8787
coex_bb_reset_unlock: Option<unsafe extern "C" fn(u32)>,
8888
coex_schm_register_btdm_callback: Option<unsafe extern "C" fn(unsafe extern "C" fn()) -> i32>,
89-
coex_schm_status_bit_clear: Option<unsafe extern "C" fn(i32, i32) -> ()>,
90-
coex_schm_status_bit_set: Option<unsafe extern "C" fn(i32, i32) -> ()>,
89+
coex_schm_status_bit_clear: Option<unsafe extern "C" fn(i32, i32)>,
90+
coex_schm_status_bit_set: Option<unsafe extern "C" fn(i32, i32)>,
9191
coex_schm_interval_get: Option<unsafe extern "C" fn() -> u32>,
9292
coex_schm_curr_period_get: Option<unsafe extern "C" fn() -> u8>,
9393
coex_schm_curr_phase_get: Option<unsafe extern "C" fn() -> *const ()>,
9494
coex_wifi_channel_get: Option<unsafe extern "C" fn(*mut u8, *mut u8) -> i32>,
9595
coex_register_wifi_channel_change_callback:
9696
Option<unsafe extern "C" fn(unsafe extern "C" fn()) -> i32>,
9797
set_isr13: Option<unsafe extern "C" fn(i32, unsafe extern "C" fn(), *const ()) -> i32>,
98-
interrupt_l3_disable: Option<unsafe extern "C" fn() -> ()>,
99-
interrupt_l3_restore: Option<unsafe extern "C" fn() -> ()>,
98+
interrupt_l3_disable: Option<unsafe extern "C" fn()>,
99+
interrupt_l3_restore: Option<unsafe extern "C" fn()>,
100100
custom_queue_create:
101101
Option<unsafe extern "C" fn(u32, u32) -> *mut crate::binary::c_types::c_void>,
102102
coex_version_get: Option<
@@ -137,9 +137,9 @@ pub(super) static G_OSI_FUNCS: osi_funcs_s = osi_funcs_s {
137137
task_delete: Some(task_delete),
138138
is_in_isr: Some(is_in_isr),
139139
cause_sw_intr_to_core: Some(cause_sw_intr_to_core),
140-
malloc: Some(malloc),
141-
malloc_internal: Some(malloc_internal),
142-
free: Some(free),
140+
malloc: Some(crate::ble::malloc),
141+
malloc_internal: Some(crate::ble::malloc_internal),
142+
free: Some(crate::ble::free),
143143
read_efuse_mac: Some(read_efuse_mac),
144144
srand: Some(crate::ble::btdm::srand),
145145
rand: Some(crate::ble::btdm::rand),
@@ -540,7 +540,7 @@ pub(crate) unsafe extern "C" fn set_isr(n: i32, f: unsafe extern "C" fn(), arg:
540540

541541
pub(crate) unsafe extern "C" fn ints_on(mask: u32) {
542542
trace!("chip_ints_on esp32 {:b}", mask);
543-
hal::xtensa_lx::interrupt::enable_mask(mask);
543+
crate::hal::xtensa_lx::interrupt::enable_mask(mask);
544544
}
545545

546546
#[cfg(coex)]
@@ -571,15 +571,9 @@ fn async_wakeup_request(event: i32) -> bool {
571571
let mut do_wakeup_request = false;
572572

573573
match event {
574-
BTDM_ASYNC_WAKEUP_REQ_HCI => {
575-
request_lock = true;
576-
}
577-
BTDM_ASYNC_WAKEUP_REQ_COEX => {
578-
request_lock = false;
579-
}
580-
_ => {
581-
return false;
582-
}
574+
e if e == BTDM_ASYNC_WAKEUP_REQ_HCI => request_lock = true,
575+
e if e == BTDM_ASYNC_WAKEUP_REQ_COEX => request_lock = false,
576+
_ => return false,
583577
}
584578

585579
extern "C" {
@@ -614,15 +608,9 @@ fn async_wakeup_request_end(event: i32) {
614608
let request_lock: bool;
615609

616610
match event {
617-
BTDM_ASYNC_WAKEUP_REQ_HCI => {
618-
request_lock = true;
619-
}
620-
BTDM_ASYNC_WAKEUP_REQ_COEX => {
621-
request_lock = false;
622-
}
623-
_ => {
624-
return;
625-
}
611+
e if e == BTDM_ASYNC_WAKEUP_REQ_HCI => request_lock = true,
612+
e if e == BTDM_ASYNC_WAKEUP_REQ_COEX => request_lock = false,
613+
_ => return,
626614
}
627615

628616
extern "C" {

esp-wifi/src/ble/os_adapter_esp32c3.rs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ pub(crate) static mut BT_INTERRUPT_FUNCTION8: (
1515
pub(super) struct osi_funcs_s {
1616
magic: u32,
1717
version: u32,
18-
interrupt_set: Option<unsafe extern "C" fn(i32, i32, i32, i32) -> ()>,
19-
interrupt_clear: Option<unsafe extern "C" fn(i32, i32) -> ()>,
20-
interrupt_handler_set: Option<unsafe extern "C" fn(i32, extern "C" fn(), *const ()) -> ()>,
21-
interrupt_disable: Option<unsafe extern "C" fn() -> ()>,
22-
interrupt_enable: Option<unsafe extern "C" fn() -> ()>,
23-
task_yield: Option<unsafe extern "C" fn() -> ()>,
24-
task_yield_from_isr: Option<unsafe extern "C" fn() -> ()>,
18+
interrupt_set: Option<unsafe extern "C" fn(i32, i32, i32, i32)>,
19+
interrupt_clear: Option<unsafe extern "C" fn(i32, i32)>,
20+
interrupt_handler_set: Option<unsafe extern "C" fn(i32, extern "C" fn(), *const ())>,
21+
interrupt_disable: Option<unsafe extern "C" fn()>,
22+
interrupt_enable: Option<unsafe extern "C" fn()>,
23+
task_yield: Option<unsafe extern "C" fn()>,
24+
task_yield_from_isr: Option<unsafe extern "C" fn()>,
2525
semphr_create: Option<unsafe extern "C" fn(u32, u32) -> *const ()>,
26-
semphr_delete: Option<unsafe extern "C" fn(*const ()) -> ()>,
26+
semphr_delete: Option<unsafe extern "C" fn(*const ())>,
2727
semphr_take_from_isr: Option<unsafe extern "C" fn(*const (), *const ()) -> i32>,
2828
semphr_give_from_isr: Option<unsafe extern "C" fn(*const (), *const ()) -> i32>,
2929
semphr_take: Option<unsafe extern "C" fn(*const (), u32) -> i32>,
3030
semphr_give: Option<unsafe extern "C" fn(*const ()) -> i32>,
3131
mutex_create: Option<unsafe extern "C" fn() -> *const ()>,
32-
mutex_delete: Option<unsafe extern "C" fn(*const ()) -> ()>,
32+
mutex_delete: Option<unsafe extern "C" fn(*const ())>,
3333
mutex_lock: Option<unsafe extern "C" fn(*const ()) -> i32>,
3434
mutex_unlock: Option<unsafe extern "C" fn(*const ()) -> i32>,
3535
queue_create: Option<unsafe extern "C" fn(u32, u32) -> *const ()>,
36-
queue_delete: Option<unsafe extern "C" fn(*const ()) -> ()>,
36+
queue_delete: Option<unsafe extern "C" fn(*const ())>,
3737
queue_send: Option<unsafe extern "C" fn(*const (), *const (), u32) -> i32>,
3838
queue_send_from_isr: Option<unsafe extern "C" fn(*const (), *const (), *const ()) -> i32>,
3939
queue_recv: Option<unsafe extern "C" fn(*const (), *const (), u32) -> i32>,
@@ -49,32 +49,32 @@ pub(super) struct osi_funcs_s {
4949
u32,
5050
) -> i32,
5151
>,
52-
task_delete: Option<unsafe extern "C" fn(*const ()) -> ()>,
52+
task_delete: Option<unsafe extern "C" fn(*const ())>,
5353
is_in_isr: Option<unsafe extern "C" fn() -> i32>,
5454
cause_sw_intr_to_core: Option<unsafe extern "C" fn(i32, i32) -> i32>,
55-
malloc: Option<unsafe extern "C" fn(u32) -> *const ()>,
56-
malloc_internal: Option<unsafe extern "C" fn(u32) -> *const ()>,
57-
free: Option<unsafe extern "C" fn(*const ()) -> ()>,
55+
malloc: Option<unsafe extern "C" fn(u32) -> *mut crate::binary::c_types::c_void>,
56+
malloc_internal: Option<unsafe extern "C" fn(u32) -> *mut crate::binary::c_types::c_void>,
57+
free: Option<unsafe extern "C" fn(*mut crate::binary::c_types::c_void)>,
5858
read_efuse_mac: Option<unsafe extern "C" fn(*const ()) -> i32>,
59-
srand: Option<unsafe extern "C" fn(u32) -> ()>,
59+
srand: Option<unsafe extern "C" fn(u32)>,
6060
rand: Option<unsafe extern "C" fn() -> i32>,
6161
btdm_lpcycles_2_hus: Option<unsafe extern "C" fn(u32, u32) -> u32>,
6262
btdm_hus_2_lpcycles: Option<unsafe extern "C" fn(u32) -> u32>,
6363
btdm_sleep_check_duration: Option<unsafe extern "C" fn(i32) -> i32>,
64-
btdm_sleep_enter_phase1: Option<unsafe extern "C" fn(i32) -> ()>,
65-
btdm_sleep_enter_phase2: Option<unsafe extern "C" fn() -> ()>,
66-
btdm_sleep_exit_phase1: Option<unsafe extern "C" fn() -> ()>,
67-
btdm_sleep_exit_phase2: Option<unsafe extern "C" fn() -> ()>,
68-
btdm_sleep_exit_phase3: Option<unsafe extern "C" fn() -> ()>,
69-
coex_wifi_sleep_set: Option<unsafe extern "C" fn(i32) -> ()>,
64+
btdm_sleep_enter_phase1: Option<unsafe extern "C" fn(i32)>,
65+
btdm_sleep_enter_phase2: Option<unsafe extern "C" fn()>,
66+
btdm_sleep_exit_phase1: Option<unsafe extern "C" fn()>,
67+
btdm_sleep_exit_phase2: Option<unsafe extern "C" fn()>,
68+
btdm_sleep_exit_phase3: Option<unsafe extern "C" fn()>,
69+
coex_wifi_sleep_set: Option<unsafe extern "C" fn(i32)>,
7070
coex_core_ble_conn_dyn_prio_get: Option<unsafe extern "C" fn(*mut i32, *mut i32) -> i32>,
71-
coex_schm_status_bit_set: Option<unsafe extern "C" fn(i32, i32) -> ()>,
72-
coex_schm_status_bit_clear: Option<unsafe extern "C" fn(i32, i32) -> ()>,
73-
interrupt_on: Option<unsafe extern "C" fn(i32) -> ()>,
74-
interrupt_off: Option<unsafe extern "C" fn(i32) -> ()>,
75-
esp_hw_power_down: Option<unsafe extern "C" fn() -> ()>,
76-
esp_hw_power_up: Option<unsafe extern "C" fn() -> ()>,
77-
ets_backup_dma_copy: Option<unsafe extern "C" fn(u32, u32, u32, i32) -> ()>,
71+
coex_schm_status_bit_set: Option<unsafe extern "C" fn(i32, i32)>,
72+
coex_schm_status_bit_clear: Option<unsafe extern "C" fn(i32, i32)>,
73+
interrupt_on: Option<unsafe extern "C" fn(i32)>,
74+
interrupt_off: Option<unsafe extern "C" fn(i32)>,
75+
esp_hw_power_down: Option<unsafe extern "C" fn()>,
76+
esp_hw_power_up: Option<unsafe extern "C" fn()>,
77+
ets_backup_dma_copy: Option<unsafe extern "C" fn(u32, u32, u32, i32)>,
7878
}
7979

8080
pub(super) static G_OSI_FUNCS: osi_funcs_s = osi_funcs_s {
@@ -107,9 +107,9 @@ pub(super) static G_OSI_FUNCS: osi_funcs_s = osi_funcs_s {
107107
task_delete: Some(task_delete),
108108
is_in_isr: Some(is_in_isr),
109109
cause_sw_intr_to_core: Some(cause_sw_intr_to_core),
110-
malloc: Some(malloc),
111-
malloc_internal: Some(malloc_internal),
112-
free: Some(free),
110+
malloc: Some(crate::ble::malloc),
111+
malloc_internal: Some(crate::ble::malloc_internal),
112+
free: Some(crate::ble::free),
113113
read_efuse_mac: Some(read_efuse_mac),
114114
srand: Some(crate::ble::btdm::srand),
115115
rand: Some(crate::ble::btdm::rand),

0 commit comments

Comments
 (0)