Loading...
Searching...
No Matches
usbdev_stm32.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
38#ifndef USBDEV_STM32_H
39#define USBDEV_STM32_H
40
41#include <stdint.h>
42#include <stdlib.h>
43#include "periph_cpu.h"
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
53#define DWC2_USB_OTG_FS_NUM_EP STM32_USB_OTG_FS_NUM_EP
54
59#define DWC2_USB_OTG_HS_NUM_EP STM32_USB_OTG_HS_NUM_EP
60
69#ifndef DWC2_USB_OTG_FS_RX_FIFO_SIZE
70#define DWC2_USB_OTG_FS_RX_FIFO_SIZE (128U)
71#endif
72
78#ifndef DWC2_USB_OTG_HS_RX_FIFO_SIZE
79#define DWC2_USB_OTG_HS_RX_FIFO_SIZE (512U)
80#endif
81
89#ifndef USB_OTG_FS_TOTAL_FIFO_SIZE
90#define USB_OTG_FS_TOTAL_FIFO_SIZE (1280U)
91#endif
92
100#ifndef USB_OTG_HS_TOTAL_FIFO_SIZE
101#define USB_OTG_HS_TOTAL_FIFO_SIZE (4096U)
102#endif
103
107#define DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE USB_OTG_FS_TOTAL_FIFO_SIZE
108
112#define DWC2_USB_OTG_HS_TOTAL_FIFO_SIZE USB_OTG_HS_TOTAL_FIFO_SIZE
113
114/* periph/usbdev.h is included after the definitions above by intention */
115#include "periph/usbdev.h"
116
127
128#ifdef __cplusplus
129}
130#endif
131#endif /* USBDEV_STM32_H */
Shared CPU specific definitions for the STM32 family.
stm32 USB device FS configuration
Definition cpu_usbdev.h:45
stm32 USB Device FS only peripheral device context
const stm32_usbdev_fs_config_t * config
USB peripheral config
usbdev_t usbdev
Inherited usbdev struct.
size_t used
Bytes used by usbdev stack.
usbdev_ep_t * in
In endpoints.
usbdev_ep_t * out
Out endpoints.
usbdev endpoint descriptor
Definition usbdev.h:259
usbdev device descriptor
Definition usbdev.h:247
Definitions low-level USB driver interface.