Skip to content

Commit 6ab531d

Browse files
authored
Merge pull request #103 from whj4674672/master
【修正】开发手册中错误的配图 【完善】usb 驱动
2 parents 68a2a99 + b81795e commit 6ab531d

File tree

6 files changed

+29
-3
lines changed

6 files changed

+29
-3
lines changed

documents/figures/debuger.png

6.5 KB
Loading

documents/figures/new_prj_2.png

30.3 KB
Loading

libraries/Kconfig

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,27 @@ menu "On-chip Peripheral"
259259
config BSP_USING_DCMI
260260
bool "Enable DCMI"
261261
default n
262-
262+
263+
config BSP_USING_USBD
264+
bool "Enable USB Device"
265+
select RT_USING_USB_DEVICE
266+
default n
267+
268+
menuconfig BSP_USING_USBH
269+
bool "Enable USB Host"
270+
select RT_USING_USB_HOST
271+
default n
272+
if BSP_USING_USBH
273+
menuconfig RT_USBH_MSTORAGE
274+
bool "Enable Udisk Drivers"
275+
default n
276+
if RT_USBH_MSTORAGE
277+
config UDISK_MOUNTPOINT
278+
string "Udisk mount dir"
279+
default "/"
280+
endif
281+
endif
282+
263283
menuconfig BSP_USING_TIM
264284
bool "Enable timer"
265285
default n

libraries/drivers/SConscript

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ if GetDepend(['RT_USING_I2C', 'RT_USING_I2C_BITOPS']):
3939

4040
if GetDepend(['BSP_USING_ONCHIP_RTC']):
4141
src += Glob('drv_rtc.c')
42+
43+
if GetDepend(['BSP_USING_USBD']):
44+
src += Glob('drv_usbd.c')
45+
46+
if GetDepend(['BSP_USING_USBH']):
47+
src += ['drv_usbh.c']
4248

4349
path = [cwd]
4450
path += [cwd + '/include']

libraries/drivers/drv_usbd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <rtthread.h>
1313
#include "board.h"
1414

15-
#ifdef BSP_USING_USBDEVICE
15+
#ifdef BSP_USING_USBD
1616

1717
#include <rtdevice.h>
1818
#include <string.h>

libraries/drivers/drv_usbh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include<rtthread.h>
1414
#include<rtdevice.h>
1515

16-
#ifdef BSP_USING_USBHOST
16+
#ifdef BSP_USING_USBH
1717

1818
static HCD_HandleTypeDef stm32_hhcd_fs;
1919
static struct rt_completion urb_completion;

0 commit comments

Comments
 (0)