Skip to content

Commit 1b46d2b

Browse files
author
Arto Kinnunen
committed
Avoid type collision by renaming callback variable
Build jobs are failing due build error "arm_hal_timer.cpp:50:5: error: reference to 'callback' is ambiguous". Fix the build error by renaming callback to arm_hal_callback to avoid collision with callback defined in ./mbed-os/hal/api/Callback.h
1 parent dd5649d commit 1b46d2b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

features/FEATURE_COMMON_PAL/nanostack-hal-mbed-cmsis-rtos/arm_hal_timer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static osThreadId timer_thread_id;
1616
static Timer timer;
1717
static Timeout timeout;
1818
static uint32_t due;
19-
static void (*callback)(void);
19+
static void (*arm_hal_callback)(void);
2020

2121
static void timer_thread(const void *)
2222
{
@@ -25,7 +25,7 @@ static void timer_thread(const void *)
2525
// !!! We don't do our own enter/exit critical - we rely on callback
2626
// doing it (ns_timer_interrupt_handler does)
2727
//platform_enter_critical();
28-
callback();
28+
arm_hal_callback();
2929
//platform_exit_critical();
3030
}
3131
}
@@ -47,7 +47,7 @@ void platform_timer_disable(void)
4747
// Not called while running, fortunately
4848
void platform_timer_set_cb(void (*new_fp)(void))
4949
{
50-
callback = new_fp;
50+
arm_hal_callback = new_fp;
5151
}
5252

5353
static void timer_callback(void)

0 commit comments

Comments
 (0)