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 )
87static inline void usb_hw_init(
void) {
89 RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
105 #if CFG_TUSB_MCU == OPT_MCU_STM32F2
106 GPIOA->OTYPER |= GPIO_OTYPER_OT10;
117 RCC->AHB2ENR |= RCC_AHB2ENR_OTGFSEN;
119 RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;
#define GPIOA
Definition MK60D10.h:6910
#define GPIO_OTYPER_OT10_Msk
Definition stm32f407xx.h:8239
#define GPIO_MODER_MODER11_1
Definition stm32f207xx.h:8109
#define GPIO_OSPEEDR_OSPEED12_1
Definition stm32f207xx.h:8206
#define GPIO_AFRH_AFSEL11_3
Definition stm32f207xx.h:8664
#define GPIO_PUPDR_PUPD10_0
Definition stm32f207xx.h:8299
#define GPIO_MODER_MODER12_1
Definition stm32f207xx.h:8114
#define GPIO_AFRH_AFSEL11_1
Definition stm32f207xx.h:8662
#define GPIO_MODER_MODER10_1
Definition stm32f207xx.h:8104
#define GPIO_AFRH_AFSEL12_1
Definition stm32f207xx.h:8667
#define GPIO_AFRH_AFSEL12_3
Definition stm32f207xx.h:8669
#define GPIO_AFRH_AFSEL10_3
Definition stm32f207xx.h:8659
#define GPIO_OSPEEDR_OSPEED11_1
Definition stm32f207xx.h:8203
#define GPIO_AFRH_AFSEL10_1
Definition stm32f207xx.h:8657