fix warnings cast function type for nrf, fix pico osal warning

add TODO for overflow in tusb_fifo.c
This commit is contained in:
hathach
2021-05-25 21:02:40 +07:00
parent ca8724ee08
commit 954056da0c
4 changed files with 13 additions and 2 deletions
+6 -1
View File
@@ -55,6 +55,11 @@ 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)
{
tusb_hal_nrf_power_event((uint32_t) event);
}
void board_init(void)
{
// stop LF clock just in case we jump from application without reset
@@ -121,7 +126,7 @@ void board_init(void)
// Register tusb function as USB power handler
// cause cast-function-type warning
const nrfx_power_usbevt_config_t config = { .handler = ((nrfx_power_usb_event_handler_t) tusb_hal_nrf_power_event) };
const nrfx_power_usbevt_config_t config = { .handler = power_event_handler };
nrfx_power_usbevt_init(&config);
nrfx_power_usbevt_enable();