fix third_party_usb/usbhost data format bugs

This commit is contained in:
Liu_Weichao
2021-12-07 09:43:53 +08:00
parent a21ca4af2a
commit a7baf1e7ed
7 changed files with 46 additions and 16 deletions
@@ -58,6 +58,10 @@ menu "aiit-riscv64-board feature"
bool "mount cd card"
default n
select BSP_USING_SDIO
config MOUNT_USB
bool "mount usb"
default n
select BSP_USING_USB
endmenu
endmenu
@@ -64,13 +64,24 @@ extern int HwRtcInit(void);
extern int HwTouchBusInit(void);
extern int HwCh376Init(void);
#if defined(FS_VFS) && defined(MOUNT_SDCARD)
#ifdef FS_CH376
#include <iot-vfs.h>
#ifdef MOUNT_USB
/**
* @description: Mount SD card
* @description: Mount USB
* @return 0
*/
int MountUSB(void)
{
if (MountFilesystem(USB_BUS_NAME, USB_DEVICE_NAME, USB_DRIVER_NAME, FSTYPE_CH376, "/") == 0)
KPrintf("usb mount to '/'");
else
KPrintf("usb mount to '/' failed!");
return 0;
}
#endif
#ifdef MOUNT_SDCARD
/**
* @description: Mount SD card
* @return 0
@@ -85,6 +96,7 @@ int MountSDCard(void)
return 0;
}
#endif
#endif
void init_bss(void)
{
@@ -185,6 +197,9 @@ struct InitSequenceDesc _board_init[] =
#ifdef BSP_USING_SDIO
{ "hw_sdio", HwCh376Init},
#endif
#ifdef BSP_USING_USB
{ "hw_usb", HwCh376Init},
#endif
#ifdef BSP_USING_TOUCH
{ "hw_touch", HwTouchBusInit},
#endif