Re: Listen for "USB_DETECTED" events?
toggle quoted messageShow quoted text
I noticed `int usb_dc_ep_set_callback(const u8_t ep, const usb_dc_ep_callback cb);` in `usb_dc.h`, but using them doesn't sound so stable to me. Since `usb_dc_ep_set_callback` actually *overwrites* the currently registered callback (that's what it looks like anyway), we'd break everything inside the usb stack that relies on that cb.
Using the nordic HAL directly is an ok workaround for me (just check NRF_POWER->USBREGSTATUS for instance) but it seems like a reasonable thing to present in a public API too.