WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
usb_api_pri.h
浏览该文件的文档.
1/* ----------------------------------------------------------------------------
2 * Copyright (c) Huawei Technologies Co., Ltd. 2013-2019. All rights reserved.
3 * Description: Usb Api Private File
4 * Author: Huawei LiteOS Team
5 * Create: 2013-01-01
6 * Redistribution and use in source and binary forms, with or without modification,
7 * are permitted provided that the following conditions are met:
8 * 1. Redistributions of source code must retain the above copyright notice, this list of
9 * conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11 * of conditions and the following disclaimer in the documentation and/or other materials
12 * provided with the distribution.
13 * 3. Neither the name of the copyright holder nor the names of its contributors may be used
14 * to endorse or promote products derived from this software without specific prior written
15 * permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
18 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
20 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 * --------------------------------------------------------------------------- */
28
29#ifndef _USB_API_H
30#define _USB_API_H
31
32#include <los_config.h>
33
34#ifdef __cplusplus
35extern "C" {
36#endif /* __cplusplus */
37
38/* extern struct module_data bsd_##name##_##busname##_driver_mod */
39#ifdef LOSCFG_DRIVERS_USB_HOST_EHCI
40/* host or device controller modules */
41/* usb controller modules link xxx-controller bus */
42extern struct module_data bsd_usbus_ehci_driver_mod;
43#endif
44
45#ifdef LOSCFG_DRIVERS_USB_HOST_OHCI
46extern struct module_data bsd_usbus_ohci_driver_mod;
47#endif
48
49#ifdef LOSCFG_DRIVERS_USB_HOST_XHCI
50extern struct module_data bsd_usbus_xhci_driver_mod;
51#endif
52
53#ifdef LOSCFG_DRIVERS_USB_HOST_DRIVER
54/* root hub driver modules link to usb bus */
55extern struct module_data bsd_uhub_usbus_driver_mod;
56/* xxx class driver moudles link to usb hub bus */
57extern struct module_data bsd_uhub_uhub_driver_mod;
58#endif
59
60#ifdef LOSCFG_DRIVERS_USB_4G_MODEM
61extern struct module_data bsd_cdce_uhub_driver_mod;
62#endif
63
64#if defined (LOSCFG_DRIVERS_USB_SERIAL) || defined (LOSCFG_DRIVERS_USB_4G_MODEM)
65extern struct module_data bsd_u3g_uhub_driver_mod;
66#endif
67
68#ifdef LOSCFG_DRIVERS_USB_ETHERNET
69extern struct module_data bsd_axe_uhub_driver_mod;
70extern struct module_data bsd_axge_uhub_driver_mod;
71#endif
72
73#ifdef LOSCFG_DRIVERS_USB_RNDIS_HOST
74extern struct module_data bsd_urndis_uhub_driver_mod;
75#endif
76
77#ifdef LOSCFG_DRIVERS_USB_MASS_STORAGE
78extern struct module_data bsd_umass_uhub_driver_mod;
79#endif
80
81#ifdef LOSCFG_DRIVERS_USB_HOST_UVC_CLASS
82extern struct module_data bsd_uvc_uhub_driver_mod;
83#endif
84
85#ifdef LOSCFG_DRIVERS_USB_WIRELESS
86extern struct module_data bsd_usb_linux_uhub_driver_mod;
87#endif
88
89#ifdef LOSCFG_DRIVERS_USB_HOST_HID
90extern struct module_data bsd_uhid_uhub_driver_mod;
91#endif
92
93#ifdef LOSCFG_DRIVERS_USB_HOST_OHCI
94int ohci_hcd_init(void);
95int ohci_hcd_exit(void);
96#endif
97
98#ifdef LOSCFG_DRIVERS_USB_HOST_XHCI
99int xhci_hcd_init(void);
100int xhci_hcd_exit(void);
101#endif
102
103#ifdef LOSCFG_DRIVERS_USB_HOST_EHCI
104int ehci_hcd_init(void);
105int ehci_hcd_exit(void);
106#endif
107
108#ifdef LOSCFG_DRIVERS_USB2_DEVICE_CONTROLLER
109int udc_init(void);
110int udc_exit(void);
111#endif
112
113#ifdef LOSCFG_DRIVERS_USB3_DEVICE_CONTROLLER
114int udc3_init(void);
115int udc3_exit(void);
116#endif
117
118#ifdef LOSCFG_USB_DEBUG
119void usb_debug_module_regsiter(void);
120void usb_debug_module_unregsiter(void);
121#endif
122
123const char *fetach_usbversion(void);
124
125unsigned int userial_mask_get(void);
126void userial_mask_set(unsigned int val);
127
128#define OHCI_BUS_NAME "OHCI"
129
130#ifdef __cplusplus
131}
132#endif /* __cplusplus */
133
134#endif /* _USB_API_H */
135
unsigned int userial_mask_get(void)
void userial_mask_set(unsigned int val)
const char * fetach_usbversion(void)