summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-05-26 16:41:17 +0700
committerhathach <[email protected]>2021-05-26 16:41:17 +0700
commit689d74a595f3620e60297a121f678e0e523e517e (patch)
tree252d7c03c8fed4a853079eb2e1acc9332a156e26
parent954056da0ca4633d27f022858600164721963104 (diff)
fix board test example build with nrf
-rw-r--r--hw/bsp/nrf/family.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/bsp/nrf/family.c b/hw/bsp/nrf/family.c
index f117fbe33..ed742daaf 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);
}