VSF Documented
vsf_dwcotg_hcd.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 __VSF_DWCOTG_HCD_H__
19#define __VSF_DWCOTG_HCD_H__
20
21/*============================ INCLUDES ======================================*/
22
24
25#if VSF_USE_USB_HOST == ENABLED && VSF_USBH_USE_HCD_DWCOTG == ENABLED
26
28#include "hal/vsf_hal.h"
29#include "./vsf_dwcotg_common.h"
30
31#if defined(__VSF_DWCOTG_HCD_CLASS_IMPLEMENT)
32# undef __VSF_DWCOTG_HCD_CLASS_IMPLEMENT
33# define __VSF_CLASS_IMPLEMENT__
34#endif
35
36#include "utilities/ooc_class.h"
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/*============================ MACROS ========================================*/
43/*============================ MACROFIED FUNCTIONS ===========================*/
44/*============================ TYPES =========================================*/
45
46typedef struct vk_dwcotg_hcd_param_t {
47 const i_usb_hc_ip_t *op;
50
52 // reset_port_prepare/reset_port/enable_port return delay in ms before next step
54 uint_fast32_t (*reset_port)(void *param);
55 uint_fast32_t (*enable_port)(void *param, uint8_t speed);
56 void (*init_phy)(void *param);
57 bool (*check_dma_addr)(void *param, uintptr_t addr);
59
60typedef struct vk_dwcotg_hc_ip_info_t {
61 implement(usb_hc_ip_info_t)
62 implement(vk_dwcotg_hw_info_t)
66
67/*============================ GLOBAL VARIABLES ==============================*/
68
70
71/*============================ INCLUDES ======================================*/
72/*============================ PROTOTYPES ====================================*/
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif
79#endif
80/* EOF */
bool
Definition type.h:60
Definition vsf_usbh.h:322
vsf_arch_prio_t
Definition cortex_a_generic.h:88
uint32_t uintptr_t
Definition stdint.h:38
unsigned int uint_fast32_t
Definition stdint.h:27
unsigned char uint8_t
Definition stdint.h:5
Definition vsf_template_usb.h:446
Definition vsf_dwcotg_hcd.h:60
vk_dwcotg_hcd_workaround_t * workaround
Definition vsf_dwcotg_hcd.h:64
usb_hc_ip_info_t vk_dwcotg_hw_info_t void * workaround_param
Definition vsf_dwcotg_hcd.h:63
Definition vsf_dwcotg_hcd.h:46
const i_usb_hc_ip_t * op
Definition vsf_dwcotg_hcd.h:47
vsf_arch_prio_t priority
Definition vsf_dwcotg_hcd.h:48
Definition vsf_dwcotg_hcd.h:51
uint_fast32_t(* enable_port)(void *param, uint8_t speed)
Definition vsf_dwcotg_hcd.h:55
uint_fast32_t(* reset_port)(void *param)
Definition vsf_dwcotg_hcd.h:54
bool(* check_dma_addr)(void *param, uintptr_t addr)
Definition vsf_dwcotg_hcd.h:57
void(* init_phy)(void *param)
Definition vsf_dwcotg_hcd.h:56
uint_fast32_t(* reset_port_prepare)(void *param)
Definition vsf_dwcotg_hcd.h:53
Definition vsf_dwcotg_hw.h:38
const vk_usbh_hcd_drv_t vk_dwcotg_hcd_drv
Definition vsf_dwcotg_hcd.c:200