Loading...
Searching...
No Matches
usbdev_stm32.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Koen Zandberg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
36
37#include <stdint.h>
38#include <stdlib.h>
39#include "periph_cpu.h"
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
49#define DWC2_USB_OTG_FS_NUM_EP STM32_USB_OTG_FS_NUM_EP
50
55#define DWC2_USB_OTG_HS_NUM_EP STM32_USB_OTG_HS_NUM_EP
56
65#ifndef DWC2_USB_OTG_FS_RX_FIFO_SIZE
66#define DWC2_USB_OTG_FS_RX_FIFO_SIZE (128U)
67#endif
68
74#ifndef DWC2_USB_OTG_HS_RX_FIFO_SIZE
75#define DWC2_USB_OTG_HS_RX_FIFO_SIZE (512U)
76#endif
77
85#ifndef USB_OTG_FS_TOTAL_FIFO_SIZE
86#define USB_OTG_FS_TOTAL_FIFO_SIZE (1280U)
87#endif
88
96#ifndef USB_OTG_HS_TOTAL_FIFO_SIZE
97#define USB_OTG_HS_TOTAL_FIFO_SIZE (4096U)
98#endif
99
103#define DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE USB_OTG_FS_TOTAL_FIFO_SIZE
104
108#define DWC2_USB_OTG_HS_TOTAL_FIFO_SIZE USB_OTG_HS_TOTAL_FIFO_SIZE
109
110/* periph/usbdev.h is included after the definitions above by intention */
111#include "periph/usbdev.h"
112
123
124#ifdef __cplusplus
125}
126#endif
struct usbdev_ep usbdev_ep_t
usbdev_ep_t forward declaration
Definition usbdev.h:99
struct usbdev usbdev_t
usbdev_t forward declaration
Definition usbdev.h:94
Shared CPU specific definitions for the STM32 family.
stm32 USB device FS configuration
Definition cpu_usbdev.h:52
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.
Definitions low-level USB driver interface.