From 689d74a595f3620e60297a121f678e0e523e517e Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 26 May 2021 16:41:17 +0700 Subject: [PATCH] fix board test example build with nrf --- hw/bsp/nrf/family.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/bsp/nrf/family.c b/hw/bsp/nrf/family.c index f117fbe3..ed742daa 100644 --- a/hw/bsp/nrf/family.c +++ b/hw/bsp/nrf/family.c @@ -55,7 +55,9 @@ static nrfx_uarte_t _uart_id = NRFX_UARTE_INSTANCE(0); // We must call it within SD's SOC event handler, or set it as power event handler if SD is not enabled. extern void tusb_hal_nrf_power_event(uint32_t event); -static void power_event_handler(nrfx_power_usb_evt_t event) + +// nrf power callback, could be unused if SD is enabled or usb is disabled (board_test example) +TU_ATTR_UNUSED static void power_event_handler(nrfx_power_usb_evt_t event) { tusb_hal_nrf_power_event((uint32_t) event); }