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 __OSA_HAL_DRIVER_AIC_AIC8800_USB_H__
19#define __OSA_HAL_DRIVER_AIC_AIC8800_USB_H__
20
21/*============================ INCLUDES ======================================*/
22
23#include "hal/vsf_hal_cfg.h"
24
25#if (VSF_USE_USB_DEVICE == ENABLED && VSF_USBD_USE_DCD_DWCOTG == ENABLED) \
26 || (VSF_USE_USB_HOST == ENABLED && VSF_USBH_USE_HCD_DWCOTG == ENABLED)
27
28#include "../__device.h"
29
31
32// for dedicated vk_dwcotg_hw_info_t
34
35/*============================ MACROS ========================================*/
36/*============================ MACROFIED FUNCTIONS ===========================*/
37
38#define ____USB_OTG_DEF(__N, __VALUE) \
39 extern aic8800_usb_t USB_OTG##__N##_IP; \
40 extern const i_usb_dc_ip_t VSF_USB_DC##__N##_IP; \
41 extern const i_usb_hc_ip_t VSF_USB_HC##__N##_IP;
42#define __USB_OTG_DEF(__N, __VALUE) ____USB_OTG_DEF(__N, __VALUE)
43#define USB_OTG_DEF(__N, __VALUE) __USB_OTG_DEF(__N, __VALUE)
44
45/*============================ TYPES =========================================*/
46
47typedef struct aic8800_usb_const_t {
50 void *reg;
51
52 implement(vk_dwcotg_hw_info_t)
54
55typedef struct aic8800_usb_t {
56 bool is_host;
57 struct {
59 void *param;
62
63 union {
64 struct {
66 void *param;
69 };
71
72/*============================ INCLUDES ======================================*/
73
74#include "./hc/usbh.h"
75#include "./dc/usbd.h"
76
77/*============================ GLOBAL VARIABLES ==============================*/
78
80
81/*============================ INCLUDES ======================================*/
82/*============================ PROTOTYPES ====================================*/
83
84#endif
85#endif
86/* EOF */
#define USB_OTG_COUNT
Definition device.h:75
#define USB_OTG_DEF(__N, __VALUE)
Definition usb.h:43
#define NULL
Definition stddef.h:52
unsigned char uint8_t
Definition stdint.h:5
Definition usb.h:47
void * reg
Definition usb.h:50
uint8_t dc_ep_num
Definition usb.h:48
uint8_t hc_ep_num
Definition usb.h:49
Definition usb.h:55
usb_ip_irqhandler_t irqhandler
Definition usb.h:58
usb_dc_speed_t speed
Definition usb.h:67
void * param
Definition usb.h:59
struct aic8800_usb_t::@338 callback
struct aic8800_usb_t::@339::@341 device
bool is_host
Definition usb.h:56
const aic8800_usb_const_t * param
Definition usb.h:61
Definition vsf_dwcotg_hw.h:38
#define VSF_MREPEAT(__COUNT, __MACRO, __PARAM)
Definition vsf_repeat_macro.h:51
uint8_t usb_dc_speed_t
Definition vsf_template_usb.h:313
void(* usb_ip_irqhandler_t)(void *param)
Definition vsf_template_usb.h:308