53#include "interrupts.h"
56#define NVIC_EnableIRQ(_x) interrupt_enable(_x + 16)
57#define NVIC_DisableIRQ(_x) interrupt_disable(_x + 16)
58#define power_set() ( USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_PWRDWN )
59#ifdef USB_OTG_GCCFG_VBUSASEN
60#define vbus_enable() ( USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBUSASEN )
62#define vbus_enable() ( USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_VBDEN )
86static inline void usb_hw_init(
void) {
88 RCC->AHBENR |= RCC_AHBENR_GPIOAEN;
90 RCC->APB1ENR |= RCC_APB1ENR_USBEN;
92 RCC->CFGR3 |= RCC_CFGR3_USBSW_PLLCLK;