clean up
This commit is contained in:
parent
e30392251a
commit
cb310027b6
@ -1 +1 @@
|
||||
Subproject commit f25cf35634650dabc9fdd493eb563f2c88299b3e
|
||||
Subproject commit 03d442a86124d759f294828b46ad134f3e2f18dc
|
19
src/main.c
19
src/main.c
@ -602,11 +602,22 @@ uint32_t proc_soc(void)
|
||||
|
||||
if (NRF_SUCCESS == err)
|
||||
{
|
||||
// from hal_nrf5x.c
|
||||
extern void power_usb_event_handler(uint32_t evt);
|
||||
|
||||
pstorage_sys_event_handler(soc_evt);
|
||||
power_usb_event_handler(soc_evt);
|
||||
|
||||
/*------------- usb power event handler -------------*/
|
||||
extern void tusb_hal_nrf_power_event(uint32_t evt);
|
||||
enum // TODO remove when migrating to SDK15
|
||||
{
|
||||
NRFX_POWER_USB_EVT_DETECTED = 0,
|
||||
NRFX_POWER_USB_EVT_REMOVED,
|
||||
NRFX_POWER_USB_EVT_READY
|
||||
};
|
||||
|
||||
int32_t usbevt = (soc_evt == NRF_EVT_POWER_USB_DETECTED ) ? NRFX_POWER_USB_EVT_DETECTED:
|
||||
(soc_evt == NRF_EVT_POWER_USB_POWER_READY) ? NRFX_POWER_USB_EVT_READY :
|
||||
(soc_evt == NRF_EVT_POWER_USB_REMOVED ) ? NRFX_POWER_USB_EVT_REMOVED : -1;
|
||||
|
||||
if ( usbevt >= 0) tusb_hal_nrf_power_event(usbevt);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
Loading…
Reference in New Issue
Block a user