-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
19256: pkg/tinyusb: add GD32VF103 support r=benpicco a=gschorcht ### Contribution description This PR provides the tinyUSB support for GD32VF103 and enables the `tinyusb_device` feature as well as `stdio_tinyusb_cdc_acm` for GD32VF103 boards. ### Testing procedure ``` BOARD=sipeeed-longan-nano make -C tests/shell flash term ``` should work ### Issues/PRs references Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
- Loading branch information
Showing
28 changed files
with
1,820 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright (C) 2023 Gunar Schorcht <gunar@schorcht.net> | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
/** | ||
* @ingroup boards_common_gd32v | ||
* @{ | ||
* | ||
* @file | ||
* @brief Default USB OTG configuration for GD32 RISC-V board | ||
* | ||
* @author Gunar Schorcht <gunar@schorcht.net> | ||
*/ | ||
|
||
#ifndef CFG_USBDEV_DEFAULT_H | ||
#define CFG_USBDEV_DEFAULT_H | ||
|
||
#include "vendor/usbdev_gd32v.h" | ||
#include "usbdev_synopsys_dwc2.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @name USB OTG configuration | ||
* @{ | ||
*/ | ||
/** | ||
* @brief Enable the full speed USB OTG peripheral | ||
*/ | ||
#define DWC2_USB_OTG_FS_ENABLED | ||
|
||
/** | ||
* @brief Common USB OTG FS configuration | ||
*/ | ||
static const dwc2_usb_otg_fshs_config_t dwc2_usb_otg_fshs_config[] = { | ||
{ | ||
.periph = USB_OTG_FS_PERIPH_BASE, | ||
.type = DWC2_USB_OTG_FS, | ||
.phy = DWC2_USB_OTG_PHY_BUILTIN, | ||
.rcu_mask = RCU_AHBEN_USBFSEN_Msk, | ||
.bus = AHB, | ||
.irqn = USBFS_IRQn, | ||
} | ||
}; | ||
|
||
/** | ||
* @brief Number of available USB OTG peripherals | ||
*/ | ||
#define USBDEV_NUMOF ARRAY_SIZE(dwc2_usb_otg_fshs_config) | ||
/** @} */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* CFG_USBDEV_DEFAULT_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
PORT_LINUX ?= /dev/ttyACM0 | ||
include $(RIOTBOARD)/common/gd32v/Makefile.include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
PORT_LINUX ?= /dev/ttyACM0 | ||
PROGRAMMER ?= dfu-util | ||
include $(RIOTBOARD)/common/gd32v/Makefile.include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.