cfg_usb_otg_hs_fs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Koen Zandberg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef CFG_USB_OTG_HS_FS_H
20 #define CFG_USB_OTG_HS_FS_H
21 
22 #include "periph_cpu.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 #define STM32_USB_OTG_HS_ENABLED
32 
37 static const stm32_usb_otg_fshs_config_t stm32_usb_otg_fshs_config[] = {
38  {
39  .periph = (uint8_t *)USB_OTG_HS_PERIPH_BASE,
40  .rcc_mask = RCC_AHB1ENR_OTGHSEN,
41  .phy = STM32_USB_OTG_PHY_BUILTIN,
42  .type = STM32_USB_OTG_HS,
43  .irqn = OTG_HS_IRQn,
44  .ahb = AHB1,
45  .dm = GPIO_PIN(PORT_B, 14),
46  .dp = GPIO_PIN(PORT_B, 15),
47  .af = GPIO_AF12,
48  }
49 };
55 #define USBDEV_NUMOF ARRAY_SIZE(stm32_usb_otg_fshs_config)
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* CFG_USB_OTG_HS_FS_H */
62 
STM32_USB_OTG_HS
@ STM32_USB_OTG_HS
High speed peripheral.
Definition: periph_cpu.h:810
GPIO_AF12
@ GPIO_AF12
use alternate function 12
Definition: periph_cpu_common.h:98
stm32_usb_otg_fshs_config_t::periph
uint8_t * periph
USB peripheral base address.
Definition: periph_cpu.h:828
stm32_usb_otg_fshs_config_t
stm32 USB OTG configuration
Definition: periph_cpu.h:827
GPIO_PIN
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition: periph_cpu.h:35
PORT_B
@ PORT_B
port B
Definition: periph_cpu.h:37