periph_cpu_esp32s3.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Gunar Schorcht
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 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
26 #define CLOCK_CORECLOCK (1000000UL * CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ)
27 
31 #define CPU_CYCLES_PER_LOOP (5)
32 
37 #define GPIO0 (GPIO_PIN(PORT_GPIO, 0))
38 #define GPIO1 (GPIO_PIN(PORT_GPIO, 1))
39 #define GPIO2 (GPIO_PIN(PORT_GPIO, 2))
40 #define GPIO3 (GPIO_PIN(PORT_GPIO, 3))
41 #define GPIO4 (GPIO_PIN(PORT_GPIO, 4))
42 #define GPIO5 (GPIO_PIN(PORT_GPIO, 5))
43 #define GPIO6 (GPIO_PIN(PORT_GPIO, 6))
44 #define GPIO7 (GPIO_PIN(PORT_GPIO, 7))
45 #define GPIO8 (GPIO_PIN(PORT_GPIO, 8))
46 #define GPIO9 (GPIO_PIN(PORT_GPIO, 9))
47 #define GPIO10 (GPIO_PIN(PORT_GPIO, 10))
48 #define GPIO11 (GPIO_PIN(PORT_GPIO, 11))
49 #define GPIO12 (GPIO_PIN(PORT_GPIO, 12))
50 #define GPIO13 (GPIO_PIN(PORT_GPIO, 13))
51 #define GPIO14 (GPIO_PIN(PORT_GPIO, 14))
52 #define GPIO15 (GPIO_PIN(PORT_GPIO, 15))
53 #define GPIO16 (GPIO_PIN(PORT_GPIO, 16))
54 #define GPIO17 (GPIO_PIN(PORT_GPIO, 17))
55 #define GPIO18 (GPIO_PIN(PORT_GPIO, 18))
56 #define GPIO19 (GPIO_PIN(PORT_GPIO, 19))
57 #define GPIO20 (GPIO_PIN(PORT_GPIO, 20))
58 #define GPIO21 (GPIO_PIN(PORT_GPIO, 21))
59 /* GPIOs 22 ...25 are not available */
60 #define GPIO26 (GPIO_PIN(PORT_GPIO, 26))
61 #define GPIO27 (GPIO_PIN(PORT_GPIO, 27))
62 #define GPIO28 (GPIO_PIN(PORT_GPIO, 28))
63 #define GPIO29 (GPIO_PIN(PORT_GPIO, 29))
64 #define GPIO30 (GPIO_PIN(PORT_GPIO, 30))
65 #define GPIO31 (GPIO_PIN(PORT_GPIO, 31))
66 #define GPIO32 (GPIO_PIN(PORT_GPIO, 32))
67 #define GPIO33 (GPIO_PIN(PORT_GPIO, 33))
68 #define GPIO34 (GPIO_PIN(PORT_GPIO, 34))
69 #define GPIO35 (GPIO_PIN(PORT_GPIO, 35))
70 #define GPIO36 (GPIO_PIN(PORT_GPIO, 36))
71 #define GPIO37 (GPIO_PIN(PORT_GPIO, 37))
72 #define GPIO38 (GPIO_PIN(PORT_GPIO, 38))
73 #define GPIO39 (GPIO_PIN(PORT_GPIO, 39))
74 #define GPIO40 (GPIO_PIN(PORT_GPIO, 40))
75 #define GPIO41 (GPIO_PIN(PORT_GPIO, 41))
76 #define GPIO42 (GPIO_PIN(PORT_GPIO, 42))
77 #define GPIO43 (GPIO_PIN(PORT_GPIO, 43))
78 #define GPIO44 (GPIO_PIN(PORT_GPIO, 44))
79 #define GPIO45 (GPIO_PIN(PORT_GPIO, 45))
80 #define GPIO46 (GPIO_PIN(PORT_GPIO, 46))
81 #define GPIO47 (GPIO_PIN(PORT_GPIO, 47))
82 #define GPIO48 (GPIO_PIN(PORT_GPIO, 48))
191 #ifdef MODULE_ESP_HW_COUNTER
193 #define TIMER_NUMOF (2)
194 #define TIMER_CHANNEL_NUMOF (1)
195 #endif
196 
241 #define DWC2_USB_OTG_FS_ENABLED 1
242 
246 #define DWC2_USB_OTG_FS_NUM_EP (5)
247 
251 #ifndef DWC2_USB_OTG_FS_RX_FIFO_SIZE
252 #define DWC2_USB_OTG_FS_RX_FIFO_SIZE (128U)
253 #endif
254 
258 #define DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE (1024U)
259 
263 #define USBDEV_CPU_DMA_ALIGNMENT (4)
264 
268 #define USBDEV_NUM_ENDPOINTS DWC2_USB_OTG_FS_NUM_EP
271 #ifdef __cplusplus
272 }
273 #endif
274