[bsp][ch32v307]添加了适配RT-Thread的全速USB驱动

This commit is contained in:
IceBear003
2024-05-04 01:02:47 -04:00
committed by Meco Man
parent c4e7a0e5e3
commit 39e6b36bb0
7 changed files with 1595 additions and 0 deletions
@@ -30,6 +30,12 @@ if GetDepend('SOC_RISCV_FAMILY_CH32'):
if GetDepend('BSP_USING_RTC'):
src += ['drv_rtc.c']
if GetDepend('BSP_USING_USBH'):
src += ['drv_usbh.c']
if GetDepend('BSP_USING_USBD'):
src += ['drv_usbd.c']
if GetDepend('BSP_USING_IWDT'):
src += ['drv_iwdt.c']
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2024-4-1 IceBear003 the first version
*/
#ifndef __DRV_USBD_H_
#define __DRV_USBD_H_
#include <rtthread.h>
#include <rtdevice.h>
int rt_hw_usbd_init();
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2006-2024, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2024-4-1 IceBear003 the first version
*/
#ifndef __DRV_USBH_H_
#define __DRV_USBH_H_
#include <rtthread.h>
#include <rtdevice.h>
int rt_hw_usbh_init();
#endif
File diff suppressed because it is too large Load Diff
+10
View File
@@ -121,6 +121,16 @@ menu "On-chip Peripheral Drivers"
default n
endif
config BSP_USING_USBH
bool "Enable USB Host"
select RT_USING_USB_HOST
default n
config BSP_USING_USBD
bool "Enable USB Device"
select RT_USING_USB_DEVICE
default n
menuconfig BSP_USING_I2C
bool "Enable I2C"
select RT_USING_I2C