Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
luozhenger
rt-thread
提交
b42fc964
R
rt-thread
项目概览
luozhenger
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b42fc964
编写于
12月 13, 2017
作者:
lymzzyh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[host first]
上级
dcb0f280
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
77 addition
and
138 deletion
+77
-138
components/drivers/include/drivers/usb_host.h
components/drivers/include/drivers/usb_host.h
+31
-74
components/drivers/usb/usbhost/SConscript
components/drivers/usb/usbhost/SConscript
+1
-1
components/drivers/usb/usbhost/core/hub.c
components/drivers/usb/usbhost/core/hub.c
+45
-36
components/drivers/usb/usbhost/core/usbhost.c
components/drivers/usb/usbhost/core/usbhost.c
+0
-27
未找到文件。
components/drivers/include/drivers/usb_host.h
浏览文件 @
b42fc964
...
...
@@ -37,14 +37,17 @@ extern "C" {
#define USB_HUB_PORT_NUM 0x04
#define SIZEOF_USB_REQUEST 0x08
#define DEV_STATUS_IDLE 0x00
#define DEV_STATUS_BUSY 0x01
#define DEV_STATUS_ERROR 0x02
#define DEV_STATUS_IDLE
0x00
#define DEV_STATUS_BUSY
0x01
#define DEV_STATUS_ERROR
0x02
#define UPIPE_STATUS_OK 0x00
#define UPIPE_STATUS_STALL 0x01
#define UPIPE_STATUS_ERROR 0x02
#define USBH_PID_SETUP 0x00
#define USBH_PID_DATA 0x01
struct
uhcd
;
struct
uintf
;
struct
uhub
;
...
...
@@ -74,10 +77,15 @@ typedef struct uprotocal* uprotocal_t;
struct
uinstance
{
struct
rt_device
parent
;
struct
udevice_descriptor
dev_desc
;
ucfg_desc_t
cfg_desc
;
struct
uhcd
*
hcd
;
upipe_t
pipe_ep0_out
;
upipe_t
pipe_ep0_in
;
rt_uint8_t
status
;
rt_uint8_t
type
;
rt_uint8_t
index
;
...
...
@@ -86,12 +94,12 @@ struct uinstance
rt_uint8_t
max_packet_size
;
rt_uint8_t
port
;
struct
uhub
*
parent
;
struct
uintf
*
intf
[
USB_MAX_INTERFACE
];
struct
uhub
*
parent
_hub
;
struct
u
h
intf
*
intf
[
USB_MAX_INTERFACE
];
};
typedef
struct
uinstance
*
uinst_t
;
struct
uintf
struct
u
h
intf
{
struct
uinstance
*
device
;
uintf_desc_t
intf_desc
;
...
...
@@ -102,9 +110,10 @@ struct uintf
struct
upipe
{
rt_uint8_t
pipe_index
;
rt_uint32_t
status
;
struct
uendpoint_descriptor
ep
;
struct
uintf
*
intf
;
struct
u
h
intf
*
intf
;
func_callback
callback
;
void
*
user_data
;
};
...
...
@@ -127,23 +136,16 @@ typedef struct uhub* uhub_t;
struct
uhcd_ops
{
int
(
*
ctl_xfer
)(
struct
uinstance
*
inst
,
ureq_t
setup
,
void
*
buffer
,
int
nbytes
,
int
timeout
);
int
(
*
bulk_xfer
)(
upipe_t
pipe
,
void
*
buffer
,
int
nbytes
,
int
timeout
);
int
(
*
int_xfer
)(
upipe_t
pipe
,
void
*
buffer
,
int
nbytes
,
int
timeout
);
int
(
*
iso_xfer
)(
upipe_t
pipe
,
void
*
buffer
,
int
nbytes
,
int
timeout
);
rt_err_t
(
*
alloc_pipe
)(
struct
upipe
**
pipe
,
struct
uintf
*
intf
,
uep_desc_t
ep
,
func_callback
callback
);
rt_err_t
(
*
free_pipe
)(
upipe_t
pipe
);
rt_err_t
(
*
hub_ctrl
)(
rt_uint16_t
port
,
rt_uint8_t
cmd
,
void
*
args
);
int
(
*
pipe_xfer
)
(
upipe_t
pipe
,
rt_uint8_t
token
,
void
*
buffer
,
int
nbytes
,
int
timeout
);
rt_err_t
(
*
alloc_pipe
)
(
struct
upipe
*
pipe
,
uep_desc_t
ep
);
rt_err_t
(
*
free_pipe
)
(
upipe_t
pipe
);
};
typedef
struct
uhcd_ops
*
uhcd_ops_t
;
struct
uhcd
{
struct
rt_device
parent
;
struct
uhcd_ops
*
ops
;
struct
uhub
*
roothub
;
uhcd_ops_t
ops
;
uhub_t
roothub
;
};
typedef
struct
uhcd
*
uhcd_t
;
...
...
@@ -177,16 +179,13 @@ void rt_usbh_hub_init(void);
struct
uinstance
*
rt_usbh_alloc_instance
(
void
);
rt_err_t
rt_usbh_attatch_instance
(
struct
uinstance
*
device
);
rt_err_t
rt_usbh_detach_instance
(
struct
uinstance
*
device
);
rt_err_t
rt_usbh_get_descriptor
(
struct
uinstance
*
device
,
rt_uint8_t
type
,
void
*
buffer
,
int
nbytes
);
rt_err_t
rt_usbh_get_descriptor
(
struct
uinstance
*
device
,
rt_uint8_t
type
,
void
*
buffer
,
int
nbytes
);
rt_err_t
rt_usbh_set_configure
(
struct
uinstance
*
device
,
int
config
);
rt_err_t
rt_usbh_set_address
(
struct
uinstance
*
device
);
rt_err_t
rt_usbh_set_interface
(
struct
uinstance
*
device
,
int
intf
);
rt_err_t
rt_usbh_clear_feature
(
struct
uinstance
*
device
,
int
endpoint
,
int
feature
);
rt_err_t
rt_usbh_get_interface_descriptor
(
ucfg_desc_t
cfg_desc
,
int
num
,
uintf_desc_t
*
intf_desc
);
rt_err_t
rt_usbh_get_endpoint_descriptor
(
uintf_desc_t
intf_desc
,
int
num
,
uep_desc_t
*
ep_desc
);
rt_err_t
rt_usbh_get_interface_descriptor
(
ucfg_desc_t
cfg_desc
,
int
num
,
uintf_desc_t
*
intf_desc
);
rt_err_t
rt_usbh_get_endpoint_descriptor
(
uintf_desc_t
intf_desc
,
int
num
,
uep_desc_t
*
ep_desc
);
/* usb class driver interface */
rt_err_t
rt_usbh_class_driver_init
(
void
);
...
...
@@ -197,19 +196,10 @@ rt_err_t rt_usbh_class_driver_disable(ucd_t drv, void* args);
ucd_t
rt_usbh_class_driver_find
(
int
class_code
,
int
subclass_code
);
/* usb class driver implement */
ucd_t
rt_usbh_class_driver_hid
(
void
);
ucd_t
rt_usbh_class_driver_hub
(
void
);
ucd_t
rt_usbh_class_driver_storage
(
void
);
ucd_t
rt_usbh_class_driver_adk
(
void
);
/* usb hid protocal implement */
uprotocal_t
rt_usbh_hid_protocal_kbd
(
void
);
uprotocal_t
rt_usbh_hid_protocal_mouse
(
void
);
/* usb adk class driver interface */
rt_err_t
rt_usbh_adk_set_string
(
const
char
*
manufacturer
,
const
char
*
model
,
const
char
*
description
,
const
char
*
version
,
const
char
*
uri
,
const
char
*
serial
);
/* usb hub interface */
rt_err_t
rt_usbh_hub_get_descriptor
(
struct
uinstance
*
device
,
rt_uint8_t
*
buffer
,
...
...
@@ -225,57 +215,24 @@ rt_err_t rt_usbh_hub_reset_port(uhub_t uhub, rt_uint16_t port);
rt_err_t
rt_usbh_event_signal
(
struct
uhost_msg
*
msg
);
/* usb host controller driver interface */
rt_inline
rt_err_t
rt_usb_hcd_alloc_pipe
(
uhcd_t
hcd
,
upipe_t
*
pipe
,
struct
uintf
*
intf
,
uep_desc_t
ep
,
func_callback
callback
)
rt_inline
rt_err_t
rt_usb_hcd_alloc_pipe
(
uhcd_t
hcd
,
upipe_t
pipe
,
uep_desc_t
ep
)
{
if
(
intf
==
RT_NULL
)
return
-
RT_EIO
;
return
hcd
->
ops
->
alloc_pipe
(
pipe
,
intf
,
ep
,
callback
);
return
hcd
->
ops
->
alloc_pipe
(
pipe
,
ep
);
}
rt_inline
rt_err_t
rt_usb_hcd_free_pipe
(
uhcd_t
hcd
,
upipe_t
pipe
)
{
RT_ASSERT
(
pipe
!=
RT_NULL
);
return
hcd
->
ops
->
free_pipe
(
pipe
);
}
rt_inline
int
rt_usb_hcd_bulk_xfer
(
uhcd_t
hcd
,
upipe_t
pipe
,
void
*
buffer
,
int
nbytes
,
int
timeout
)
rt_inline
int
rt_usb_hcd_pipe_xfer
(
uhcd_t
hcd
,
upipe_t
pipe
,
void
*
buffer
,
int
nbytes
,
int
timeout
)
{
if
(
pipe
==
RT_NULL
)
return
-
1
;
if
(
pipe
->
intf
==
RT_NULL
)
return
-
1
;
if
(
pipe
->
intf
->
device
==
RT_NULL
)
return
-
1
;
if
(
pipe
->
intf
->
device
->
status
==
DEV_STATUS_IDLE
)
return
-
1
;
return
hcd
->
ops
->
bulk_xfer
(
pipe
,
buffer
,
nbytes
,
timeout
);
return
hcd
->
ops
->
pipe_xfer
(
pipe
,
USBH_PID_DATA
,
buffer
,
nbytes
,
timeout
);
}
rt_inline
int
rt_usb_hcd_control_xfer
(
uhcd_t
hcd
,
struct
uinstance
*
device
,
ureq_t
setup
,
void
*
buffer
,
int
nbytes
,
int
timeout
)
rt_inline
int
rt_usb_hcd_setup_xfer
(
uhcd_t
hcd
,
upipe_t
pipe
,
ureq_t
setup
,
int
timeout
)
{
if
(
device
->
status
==
DEV_STATUS_IDLE
)
return
-
1
;
return
hcd
->
ops
->
ctl_xfer
(
device
,
setup
,
buffer
,
nbytes
,
timeout
);
}
rt_inline
int
rt_usb_hcd_int_xfer
(
uhcd_t
hcd
,
upipe_t
pipe
,
void
*
buffer
,
int
nbytes
,
int
timeout
)
{
if
(
pipe
==
RT_NULL
)
return
-
1
;
if
(
pipe
->
intf
==
RT_NULL
)
return
-
1
;
if
(
pipe
->
intf
->
device
==
RT_NULL
)
return
-
1
;
if
(
pipe
->
intf
->
device
->
status
==
DEV_STATUS_IDLE
)
return
-
1
;
return
hcd
->
ops
->
int_xfer
(
pipe
,
buffer
,
nbytes
,
timeout
);
}
rt_inline
rt_err_t
rt_usb_hcd_hub_control
(
uhcd_t
hcd
,
rt_uint16_t
port
,
rt_uint8_t
cmd
,
void
*
args
)
{
return
hcd
->
ops
->
hub_ctrl
(
port
,
cmd
,
args
);
return
hcd
->
ops
->
pipe_xfer
(
pipe
,
USBH_PID_SETUP
,
(
void
*
)
setup
,
8
,
timeout
);
}
#ifdef __cplusplus
...
...
components/drivers/usb/usbhost/SConscript
浏览文件 @
b42fc964
...
...
@@ -29,6 +29,6 @@ if GetDepend('RT_USBH_HID_KEYBOARD'):
CPPPATH
=
[
cwd
,
cwd
+
'/class'
,
cwd
+
'/core'
,
\
cwd
+
'/include'
,
cwd
+
'../../../include'
]
group
=
DefineGroup
(
'rt_usbh'
,
src
,
depend
=
[
'RT_USING_USB
H
'
],
CPPPATH
=
CPPPATH
)
group
=
DefineGroup
(
'rt_usbh'
,
src
,
depend
=
[
'RT_USING_USB
_HOST
'
],
CPPPATH
=
CPPPATH
)
Return
(
'group'
)
components/drivers/usb/usbhost/core/hub.c
浏览文件 @
b42fc964
...
...
@@ -40,8 +40,7 @@ static struct uclass_driver hub_driver;
*
* @return the error code, RT_EOK on successfully.
*/
rt_err_t
rt_usbh_hub_get_descriptor
(
struct
uinstance
*
device
,
rt_uint8_t
*
buffer
,
rt_size_t
nbytes
)
rt_err_t
rt_usbh_hub_get_descriptor
(
struct
uinstance
*
device
,
rt_uint8_t
*
buffer
,
rt_size_t
nbytes
)
{
struct
urequest
setup
;
int
timeout
=
100
;
...
...
@@ -49,16 +48,20 @@ rt_err_t rt_usbh_hub_get_descriptor(struct uinstance* device, rt_uint8_t *buffer
/* parameter check */
RT_ASSERT
(
device
!=
RT_NULL
);
setup
.
request_type
=
USB_REQ_TYPE_DIR_IN
|
USB_REQ_TYPE_CLASS
|
USB_REQ_TYPE_DEVICE
;
setup
.
request_type
=
USB_REQ_TYPE_DIR_IN
|
USB_REQ_TYPE_CLASS
|
USB_REQ_TYPE_DEVICE
;
setup
.
bRequest
=
USB_REQ_GET_DESCRIPTOR
;
setup
.
wIndex
=
0
;
setup
.
wLength
=
nbytes
;
setup
.
wValue
=
USB_DESC_TYPE_HUB
<<
8
;
if
(
rt_usb_hcd_control_xfer
(
device
->
hcd
,
device
,
&
setup
,
buffer
,
nbytes
,
timeout
)
==
nbytes
)
return
RT_EOK
;
else
return
-
RT_FALSE
;
if
(
rt_usb_hcd_setup_xfer
(
device
->
hcd
,
device
->
pipe_ep0_out
,
&
setup
,
timeout
)
==
8
)
{
if
(
rt_usb_hcd_pipe_xfer
(
device
->
hcd
,
device
->
pipe_ep0_in
,
buffer
,
nbytes
,
timeout
)
==
nbytes
)
{
return
RT_EOK
;
}
}
return
-
RT_FALSE
;
}
/**
...
...
@@ -70,25 +73,27 @@ rt_err_t rt_usbh_hub_get_descriptor(struct uinstance* device, rt_uint8_t *buffer
*
* @return the error code, RT_EOK on successfully.
*/
rt_err_t
rt_usbh_hub_get_status
(
struct
uinstance
*
device
,
rt_uint
8
_t
*
buffer
)
rt_err_t
rt_usbh_hub_get_status
(
struct
uinstance
*
device
,
rt_uint
32
_t
*
buffer
)
{
struct
urequest
setup
;
int
timeout
=
100
;
int
length
=
4
;
/* parameter check */
RT_ASSERT
(
device
!=
RT_NULL
);
setup
.
request_type
=
USB_REQ_TYPE_DIR_IN
|
USB_REQ_TYPE_CLASS
|
USB_REQ_TYPE_DEVICE
;
setup
.
request_type
=
USB_REQ_TYPE_DIR_IN
|
USB_REQ_TYPE_CLASS
|
USB_REQ_TYPE_DEVICE
;
setup
.
bRequest
=
USB_REQ_GET_STATUS
;
setup
.
wIndex
=
0
;
setup
.
wLength
=
length
;
setup
.
wLength
=
4
;
setup
.
wValue
=
0
;
if
(
rt_usb_hcd_control_xfer
(
device
->
hcd
,
device
,
&
setup
,
buffer
,
length
,
timeout
)
==
length
)
return
RT_EOK
;
else
return
-
RT_FALSE
;
if
(
rt_usb_hcd_setup_xfer
(
device
->
hcd
,
device
->
pipe_ep0_out
,
&
setup
,
timeout
)
==
8
)
{
if
(
rt_usb_hcd_pipe_xfer
(
device
->
hcd
,
device
->
pipe_ep0_in
,
buffer
,
4
,
timeout
)
==
4
)
{
return
RT_EOK
;
}
}
return
-
RT_FALSE
;
}
/**
...
...
@@ -101,12 +106,10 @@ rt_err_t rt_usbh_hub_get_status(struct uinstance* device, rt_uint8_t* buffer)
*
* @return the error code, RT_EOK on successfully.
*/
rt_err_t
rt_usbh_hub_get_port_status
(
uhub_t
hub
,
rt_uint16_t
port
,
rt_uint8_t
*
buffer
)
rt_err_t
rt_usbh_hub_get_port_status
(
uhub_t
hub
,
rt_uint16_t
port
,
rt_uint32_t
*
buffer
)
{
struct
urequest
setup
;
int
timeout
=
100
;
int
length
=
4
;
/* parameter check */
RT_ASSERT
(
hub
!=
RT_NULL
);
...
...
@@ -119,16 +122,20 @@ rt_err_t rt_usbh_hub_get_port_status(uhub_t hub, rt_uint16_t port,
return
RT_EOK
;
}
setup
.
request_type
=
USB_REQ_TYPE_DIR_IN
|
USB_REQ_TYPE_CLASS
|
USB_REQ_TYPE_OTHER
;
setup
.
request_type
=
USB_REQ_TYPE_DIR_IN
|
USB_REQ_TYPE_CLASS
|
USB_REQ_TYPE_OTHER
;
setup
.
bRequest
=
USB_REQ_GET_STATUS
;
setup
.
wIndex
=
port
;
setup
.
wLength
=
4
;
setup
.
wValue
=
0
;
if
(
rt_usb_hcd_control_xfer
(
hub
->
hcd
,
hub
->
self
,
&
setup
,
buffer
,
length
,
timeout
)
==
timeout
)
return
RT_EOK
;
else
return
-
RT_FALSE
;
if
(
rt_usb_hcd_setup_xfer
(
hub
->
hcd
,
hub
->
self
->
pipe_ep0_out
,
&
setup
,
timeout
)
==
8
)
{
if
(
rt_usb_hcd_pipe_xfer
(
hub
->
hcd
,
hub
->
self
->
pipe_ep0_in
,
buffer
,
4
,
timeout
)
==
4
)
{
return
RT_EOK
;
}
}
return
-
RT_FALSE
;
}
/**
...
...
@@ -141,8 +148,7 @@ rt_err_t rt_usbh_hub_get_port_status(uhub_t hub, rt_uint16_t port,
*
* @return the error code, RT_EOK on successfully.
*/
rt_err_t
rt_usbh_hub_clear_port_feature
(
uhub_t
hub
,
rt_uint16_t
port
,
rt_uint16_t
feature
)
rt_err_t
rt_usbh_hub_clear_port_feature
(
uhub_t
hub
,
rt_uint16_t
port
,
rt_uint16_t
feature
)
{
struct
urequest
setup
;
int
timeout
=
100
;
...
...
@@ -165,9 +171,11 @@ rt_err_t rt_usbh_hub_clear_port_feature(uhub_t hub, rt_uint16_t port,
setup
.
wLength
=
0
;
setup
.
wValue
=
feature
;
if
(
rt_usb_hcd_control_xfer
(
hub
->
hcd
,
hub
->
self
,
&
setup
,
RT_NULL
,
0
,
timeout
)
==
0
)
return
RT_EOK
;
else
return
-
RT_FALSE
;
if
(
rt_usb_hcd_setup_xfer
(
hub
->
hcd
,
hub
->
self
->
pipe_ep0_out
,
&
setup
,
timeout
)
==
8
)
{
return
RT_EOK
;
}
return
-
RT_FALSE
;
}
/**
...
...
@@ -204,8 +212,10 @@ rt_err_t rt_usbh_hub_set_port_feature(uhub_t hub, rt_uint16_t port,
setup
.
wLength
=
0
;
setup
.
wValue
=
feature
;
if
(
rt_usb_hcd_control_xfer
(
hub
->
hcd
,
hub
->
self
,
&
setup
,
RT_NULL
,
0
,
timeout
)
==
0
)
return
RT_EOK
;
if
(
rt_usb_hcd_setup_xfer
(
hub
->
hcd
,
hub
->
self
->
pipe_ep0_out
,
&
setup
,
timeout
)
==
8
)
{
return
RT_EOK
;
}
else
return
-
RT_FALSE
;
}
...
...
@@ -341,7 +351,7 @@ static rt_err_t rt_usbh_hub_port_change(uhub_t hub)
/* set usb device speed */
device
->
speed
=
(
pstatus
&
PORT_LSDA
)
?
1
:
0
;
device
->
parent
=
hub
;
device
->
parent
_hub
=
hub
;
device
->
hcd
=
hub
->
hcd
;
hub
->
child
[
i
]
=
device
;
...
...
@@ -366,7 +376,7 @@ static rt_err_t rt_usbh_hub_port_change(uhub_t hub)
static
void
rt_usbh_hub_irq
(
void
*
context
)
{
upipe_t
pipe
;
struct
uintf
*
intf
;
struct
u
h
intf
*
intf
;
uhub_t
hub
;
int
timeout
=
100
;
...
...
@@ -389,8 +399,7 @@ static void rt_usbh_hub_irq(void* context)
/* parameter check */
RT_ASSERT
(
pipe
->
intf
->
device
->
hcd
!=
RT_NULL
);
rt_usb_hcd_int_xfer
(
intf
->
device
->
hcd
,
pipe
,
hub
->
buffer
,
pipe
->
ep
.
wMaxPacketSize
,
timeout
);
rt_usb_hcd_pipe_xfer
(
intf
->
device
->
hcd
,
pipe
,
hub
->
buffer
,
pipe
->
ep
.
wMaxPacketSize
,
timeout
);
}
/**
...
...
@@ -408,7 +417,7 @@ static rt_err_t rt_usbh_hub_enable(void *arg)
uep_desc_t
ep_desc
;
uhub_t
hub
;
struct
uinstance
*
device
;
struct
u
intf
*
intf
=
(
struct
u
intf
*
)
arg
;
struct
u
hintf
*
intf
=
(
struct
uh
intf
*
)
arg
;
int
timeout
=
300
;
/* paremeter check */
...
...
components/drivers/usb/usbhost/core/usbhost.c
浏览文件 @
b42fc964
...
...
@@ -40,9 +40,6 @@ rt_err_t rt_usb_host_init(void)
{
ucd_t
drv
;
rt_device_t
uhc
;
#ifdef RT_USBH_HID
uprotocal_t
protocal
;
#endif
uhc
=
rt_device_find
(
USB_HOST_CONTROLLER_NAME
);
if
(
uhc
==
RT_NULL
)
...
...
@@ -63,30 +60,6 @@ rt_err_t rt_usb_host_init(void)
rt_usbh_class_driver_register
(
drv
);
#endif
#ifdef RT_USBH_HID
/* register hid class driver */
drv
=
rt_usbh_class_driver_hid
();
rt_usbh_class_driver_register
(
drv
);
#ifdef RT_USBH_HID_KEYBOARD
/* register hid keyboard protocal */
protocal
=
rt_usbh_hid_protocal_kbd
();
rt_usbh_hid_protocal_register
(
protocal
);
#endif
#ifdef RT_USBH_HID_MOUSE
/* register hid mouse protocal */
protocal
=
rt_usbh_hid_protocal_mouse
();
rt_usbh_hid_protocal_register
(
protocal
);
#endif
#endif
#ifdef RT_USBH_ADK
/* register adk class driver */
drv
=
rt_usbh_class_driver_adk
();
rt_usbh_class_driver_register
(
drv
);
#endif
/* register hub class driver */
drv
=
rt_usbh_class_driver_hub
();
rt_usbh_class_driver_register
(
drv
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录