18#ifndef __HAL_DRIVER_${SERIES}_USB_H__
19#define __HAL_DRIVER_${SERIES}_USB_H__
25#if VSF_HAL_USE_USBD == ENABLED || VSF_HAL_USE_USBH == ENABLED
30#include "../../__device.h"
49#if defined(__VSF_HAL_HW_USB_CLASS_IMPLEMENT)
50# define __VSF_CLASS_IMPLEMENT__
51#elif defined(__VSF_HAL_HW_USB_CLASS_INHERIT__)
52# define __VSF_CLASS_INHERIT__
64#define __VSF_HW_USB_OTG_DEF(__N, __VALUE) \
65 extern vsf_hw_usb_t VSF_HW_USB_OTG##__N; \
66 static vsf_hw_usb_t USB_DC##__N VSF_CAL_WEAK_ALIAS(VSF_HW_USB_OTG##__N, USB_DC##__N);\
67 extern const i_usb_dc_t VSF_USB_DC##__N;
69#define _VSF_HW_USB_OTG_DEF(__N, __VALUE) __VSF_HW_USB_OTG_DEF(__N, __VALUE)
70#define VSF_HW_USB_OTG_DEF(__N, __VALUE) _VSF_HW_USB_OTG_DEF(__N, __VALUE)
86#if VSF_HAL_USE_USBH == ENABLED
91#if VSF_HAL_USE_USBD == ENABLED
103#include "./hc/usbh.h"
104#include "./dc/usbd.h"
113#if defined(__VSF_HAL_HW_USB_CLASS_IMPLEMENT) || defined(__VSF_HAL_HW_USB_CLASS_INHERIT__)
121#undef __VSF_HAL_HW_USB_CLASS_IMPLEMENT
122#undef __VSF_HAL_HW_USB_CLASS_INHERIT__
#define ENABLED
Definition __type.h:28
#define VSF_HW_USB_OTG_COUNT
Definition device.h:62
#define VSF_HW_USB_OTG_DEF(__N, __VALUE)
Definition usb.h:70
#define NULL
Definition lvgl.h:26
#define vsf_class(__name)
Definition ooc_class.h:48
#define VSF_HAL_USE_USBD
Definition vsf_hal_cfg.h:113
#define VSF_HAL_USE_USBH
Definition vsf_hal_cfg.h:117
#define VSF_MREPEAT(__COUNT, __MACRO, __PARAM)
Definition vsf_repeat_macro.h:51
void(* usb_dc_evthandler_t)(void *param, usb_evt_t evt, uint_fast8_t value)
Definition vsf_template_usb.h:309