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
9#pragma once
10
39
40#include <stdint.h>
41#include <stdlib.h>
42#include "periph_cpu.h"
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
52#define DWC2_USB_OTG_FS_NUM_EP STM32_USB_OTG_FS_NUM_EP
53
58#define DWC2_USB_OTG_HS_NUM_EP STM32_USB_OTG_HS_NUM_EP
59
68#ifndef DWC2_USB_OTG_FS_RX_FIFO_SIZE
69#define DWC2_USB_OTG_FS_RX_FIFO_SIZE (128U)
70#endif
71
77#ifndef DWC2_USB_OTG_HS_RX_FIFO_SIZE
78#define DWC2_USB_OTG_HS_RX_FIFO_SIZE (512U)
79#endif
80
88#ifndef USB_OTG_FS_TOTAL_FIFO_SIZE
89#define USB_OTG_FS_TOTAL_FIFO_SIZE (1280U)
90#endif
91
99#ifndef USB_OTG_HS_TOTAL_FIFO_SIZE
100#define USB_OTG_HS_TOTAL_FIFO_SIZE (4096U)
101#endif
102
106#define DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE USB_OTG_FS_TOTAL_FIFO_SIZE
107
111#define DWC2_USB_OTG_HS_TOTAL_FIFO_SIZE USB_OTG_HS_TOTAL_FIFO_SIZE
112
113/* periph/usbdev.h is included after the definitions above by intention */
114#include "periph/usbdev.h"
115
126
127#ifdef __cplusplus
128}
129#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:44
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.