diff options
| author | hathach <[email protected]> | 2018-05-15 12:37:48 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-05-15 12:37:48 +0700 |
| commit | 1d428b7fefa1a41d47918b1c6ddd7c96e84f98e3 (patch) | |
| tree | c3ff414460d7c6cd3ed938ba730f4f8df2e01d47 /tinyusb | |
| parent | 03d442a86124d759f294828b46ad134f3e2f18dc (diff) | |
get nrf5x hal work with SD and non_SD configure
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/portable/nordic/nrf5x/hal_nrf5x.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/tinyusb/portable/nordic/nrf5x/hal_nrf5x.c b/tinyusb/portable/nordic/nrf5x/hal_nrf5x.c index fc4f55237..b90a09032 100644 --- a/tinyusb/portable/nordic/nrf5x/hal_nrf5x.c +++ b/tinyusb/portable/nordic/nrf5x/hal_nrf5x.c @@ -136,6 +136,8 @@ static void hfclk_disable(void) /*------------------------------------------------------------------*/ /* TUSB HAL *------------------------------------------------------------------*/ + +// tusb_hal_nrf_power_event must be called by SOC event handler bool tusb_hal_init(void) { #ifdef SOFTDEVICE_PRESENT @@ -159,23 +161,10 @@ bool tusb_hal_init(void) { tusb_hal_nrf_power_event(NRFX_POWER_USB_EVT_READY); } - - // tusb_hal_nrf_power_event must be called by SOC event handler - return true; - }else -#endif - { -#if 0 - // USB Power detection - const nrf_drv_power_usbevt_config_t config = - { - .handler = (nrf_drv_power_usb_event_handler_t) tusb_hal_nrf_power_event - }; - return ( NRF_SUCCESS == nrf_drv_power_usbevt_init(&config) ); -#else - return true; -#endif } +#endif + + return true; } void tusb_hal_int_enable(uint8_t rhport) |
