VSF Documented
usb.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __HAL_DRIVER_NUVOTON_M480_USB_H__
19#define __HAL_DRIVER_NUVOTON_M480_USB_H__
20
21/*============================ INCLUDES ======================================*/
22#include "hal/vsf_hal_cfg.h"
23#include "../../__device.h"
24#include "./ohci/ohci.h"
25#include "./dc/usbd_hs.h"
26
27/*============================ MACROS ========================================*/
28
29#define ____USB_HC_DEF(__N, __TYPE) \
30 extern m480_##__TYPE##_t USB_HC##__N##_IP; \
31 extern const i_usb_hc_ip_t VSF_USB_HC##__N##_IP;
32#define __USB_HC_DEF(__N, __TYPE) ____USB_HC_DEF(__N, __TYPE)
33#define USB_HC_DEF(__N, __VALUE) __USB_HC_DEF(__N, VSF_HW_USB_HC##__N##_TYPE)
34
35#define ____USB_DC_DEF(__N, __TYPE) \
36 extern m480_##__TYPE##_t USB_DC##__N; \
37 extern const i_usb_dc_t VSF_USB_DC##__N;
38#define __USB_DC_DEF(__N, __TYPE) ____USB_DC_DEF(__N, __TYPE)
39#define USB_DC_DEF(__N, __VALUE) __USB_DC_DEF(__N, VSF_HW_USB_DC##__N##_TYPE)
40
41/*============================ MACROFIED FUNCTIONS ===========================*/
42/*============================ TYPES =========================================*/
43/*============================ GLOBAL VARIABLES ==============================*/
44
47
48/*============================ INCLUDES ======================================*/
49/*============================ PROTOTYPES ====================================*/
50
51
52#endif
53/* EOF */
#define VSF_HW_USB_DC_COUNT
Definition device.h:124
#define VSF_HW_USB_HC_COUNT
Definition device.h:107
#define USB_DC_DEF(__N, __VALUE)
Definition usb.h:39
#define USB_HC_DEF(__N, __VALUE)
Definition usb.h:33
#define NULL
Definition stddef.h:52
#define VSF_MREPEAT(__COUNT, __MACRO, __PARAM)
Definition vsf_repeat_macro.h:51