Hello,
I'm remaking an nrf52 project in Keil and ran into an issue when it came to compiling. All of the errors outputted have came from bsp.c, mostly stating that a few macros are undefined:
bsp.c(200): error: #20: identifier "BSP_BUTTON_ACTION_LONG_PUSH" is undefined
case BSP_BUTTON_ACTION_LONG_PUSH:
bsp.c(217): error: #20: identifier "BSP_BUTTON_ACTION_LONG_PUSH" is undefined
bsp_button_event_handler(*(uint8_t *)p_context, BSP_BUTTON_ACTION_LONG_PUSH);
bsp.c(532): error: #20: identifier "BSP_BUTTON_ACTION_PUSH" is undefined
err_code = bsp_event_to_button_action_assign(num, BSP_BUTTON_ACTION_PUSH, BSP_EVENT_DEFAULT);
bsp.c(607): error: #20: identifier "BSP_BUTTON_ACTION_PUSH" is undefined
event = (action == BSP_BUTTON_ACTION_PUSH) ? (bsp_event_t)(BSP_EVENT_KEY_0 + button) : BSP_EVENT_NOTHING;
bsp.c(611): error: #20: identifier "BSP_BUTTON_ACTION_PUSH" is undefined
case BSP_BUTTON_ACTION_PUSH:
bsp.c(614): error: #20: identifier "BSP_BUTTON_ACTION_LONG_PUSH" is undefined
case BSP_BUTTON_ACTION_LONG_PUSH:
bsp.c(617): error: #20: identifier "BSP_BUTTON_ACTION_RELEASE" is undefined
case BSP_BUTTON_ACTION_RELEASE:
but I can see that in the file these are defined in bsp.h, which is also included in this file. Any suggestions as to why this may be happening? It just seems too coincidental that all of these macros are undefined, especially when they are all used in the same switch statement.
switch (action) {
case BSP_BUTTON_ACTION_PUSH:
m_events_list[button].push_event = event;
break;
case BSP_BUTTON_ACTION_LONG_PUSH:
m_events_list[button].long_push_event = event;
break;
case BSP_BUTTON_ACTION_RELEASE:
m_events_list[button].release_event = event;
break;
default:
err_code = NRF_ERROR_INVALID_PARAM;
break; }
Thanks,
Noel Teku