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) {
89 #ifdef RCC_AHBENR_GPIOAEN
90 RCC->AHBENR |= RCC_AHBENR_GPIOAEN;
96 RCC->APB1ENR |= RCC_APB1ENR_USBEN;
#define RCC_APB1ENR_PWREN
Definition stm32f107xc.h:1839
#define RCC_APB2ENR_IOPAEN
Definition stm32f107xc.h:1777