- usbdrv_init_hook() added
This commit is contained in:
parent
983c8a8840
commit
fb894c4703
@ -192,6 +192,14 @@ void usbdrv_init_global_state() {
|
||||
gs.rx_buf_level = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hook for initializing modules after the low-level driver has been initialized
|
||||
* but has not been connected to the bus yet.
|
||||
*/
|
||||
__weak void usbdrv_init_hook() {
|
||||
return;
|
||||
}
|
||||
|
||||
// initialize USB subsystem
|
||||
void usbdrv_init() {
|
||||
USB_IRQ_DISABLE(USB_IRQ_N); // disable USB interrupts
|
||||
@ -201,6 +209,7 @@ void usbdrv_init() {
|
||||
usbdrv_gpio_init();
|
||||
usbdrv_periph_init(false);
|
||||
usbdrv_initial_ep0_setup();
|
||||
usbdrv_init_hook(); // <---
|
||||
usbdrv_power_and_connect(true);
|
||||
|
||||
USB_IRQ_SET_PRIORITY(USB_IRQ_N, USB_IRQ_PRIORITY);
|
||||
|
Loading…
x
Reference in New Issue
Block a user