flatUSB/examples/configs/flatUSB_config_stm32h7_ulpi.h
Epagris 2a69c57225 - basic docs added
- doxygen styling added
- CDC -> ACM refactor
- type refactoring
- examples categorized
- flatUSB_config.h examples added
2024-11-16 21:53:01 +01:00

38 lines
865 B
C

#ifndef SRC_FLATUSB_CONFIG
#define SRC_FLATUSB_CONFIG
#include <stm32h7xx_hal.h>
#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 */