1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-19 19:43:52 +01:00
RIOT/boards/common/gd32v/include/cfg_usbdev_default.h
2025-07-18 14:23:37 +02:00

59 lines
1.1 KiB
C

/*
* SPDX-FileCopyrightText: 2023 Gunar Schorcht <gunar@schorcht.net>
* SPDX-License-Identifier: LGPL-2.1-only
*/
#pragma once
/**
* @ingroup boards_common_gd32v
* @{
*
* @file
* @brief Default USB OTG configuration for GD32 RISC-V board
*
* @author Gunar Schorcht <gunar@schorcht.net>
*/
#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,
.irqn = USBFS_IRQn,
.bus = AHB,
}
};
/**
* @brief Number of available USB OTG peripherals
*/
#define USBDEV_NUMOF ARRAY_SIZE(dwc2_usb_otg_fshs_config)
/** @} */
#ifdef __cplusplus
}
#endif
/** @} */