diff options
Diffstat (limited to 'board/discovery-stm32f072')
-rw-r--r-- | board/discovery-stm32f072/board.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/board/discovery-stm32f072/board.c b/board/discovery-stm32f072/board.c index c6a9b3c8a3..8303aa6a27 100644 --- a/board/discovery-stm32f072/board.c +++ b/board/discovery-stm32f072/board.c @@ -39,10 +39,22 @@ static enum gpio_signal const usb_gpio_list[] = { GPIO_LED_R, }; +/* + * This instantiates struct usb_gpio_config const usb_gpio, plus several other + * variables, all named something beginning with usb_gpio_ + */ USB_GPIO_CONFIG(usb_gpio, usb_gpio_list, USB_IFACE_GPIO, - USB_EP_GPIO) + USB_EP_GPIO); + +void usb_gpio_tick(void) +{ + if (usb_gpio.state->set_mask || usb_gpio.state->clear_mask) + return; + button_event(0); +} +DECLARE_HOOK(HOOK_TICK, usb_gpio_tick, HOOK_PRIO_DEFAULT); const void *const usb_strings[] = { [USB_STR_DESC] = usb_string_desc, |