#ifndef SRC_FLATUSB_CONFIG #define SRC_FLATUSB_CONFIG #include #define USB_VBUSSENSE (0) static inline void usbdrv_gpio_init() { // FIXME #if USB_VBUSSENSE // FIXME #endif } #define USB_IRQ_N OTG_HS_IRQn #define USB_IRQ_HANDLER OTG_HS_IRQHandler #define USB_IRQ_PRIORITY (8) #define USB_IRQ_SET_PRIORITY(irq, priority) HAL_NVIC_SetPriority((irq),(priority),0) #define USB_IRQ_ENABLE(irq) HAL_NVIC_EnableIRQ((irq)) #define USB_IRQ_DISABLE(irq) HAL_NVIC_DisableIRQ((irq)) #define USBG (USB_OTG_HS) #define USB_STM32H7_ENABLE_USB_VOLTAGE_DETECTOR() // FIXME #define USB_CLOCK_ENABLE() // FIXME #define USB_INTERNAL (0) #define USB_UPLI (1) #include "embfmt/embformat.h" #define SNPRINTF(str, n, fmt, ...) embfmt(str, n, fmt, __VA_ARGS__) #ifdef USBDBGMSG #define USBMSG(...) MSG(__VA_ARGS__) #endif #endif /* SRC_FLATUSB_CONFIG */