periph_cpu_esp32.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2022 Gunar Schorcht
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #include "sdkconfig.h"
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
25 #define CLOCK_CORECLOCK (1000000UL * CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ)
26 
30 #define CPU_CYCLES_PER_LOOP (6)
31 
36 #define GPIO0 (GPIO_PIN(PORT_GPIO, 0))
37 #define GPIO1 (GPIO_PIN(PORT_GPIO, 1))
38 #define GPIO2 (GPIO_PIN(PORT_GPIO, 2))
39 #define GPIO3 (GPIO_PIN(PORT_GPIO, 3))
40 #define GPIO4 (GPIO_PIN(PORT_GPIO, 4))
41 #define GPIO5 (GPIO_PIN(PORT_GPIO, 5))
42 #define GPIO6 (GPIO_PIN(PORT_GPIO, 6))
43 #define GPIO7 (GPIO_PIN(PORT_GPIO, 7))
44 #define GPIO8 (GPIO_PIN(PORT_GPIO, 8))
45 #define GPIO9 (GPIO_PIN(PORT_GPIO, 9))
46 #define GPIO10 (GPIO_PIN(PORT_GPIO, 10))
47 #define GPIO11 (GPIO_PIN(PORT_GPIO, 11))
48 #define GPIO12 (GPIO_PIN(PORT_GPIO, 12))
49 #define GPIO13 (GPIO_PIN(PORT_GPIO, 13))
50 #define GPIO14 (GPIO_PIN(PORT_GPIO, 14))
51 #define GPIO15 (GPIO_PIN(PORT_GPIO, 15))
52 #define GPIO16 (GPIO_PIN(PORT_GPIO, 16))
53 #define GPIO17 (GPIO_PIN(PORT_GPIO, 17))
54 #define GPIO18 (GPIO_PIN(PORT_GPIO, 18))
55 #define GPIO19 (GPIO_PIN(PORT_GPIO, 19))
56 /* GPIO 20 is not available */
57 #define GPIO21 (GPIO_PIN(PORT_GPIO, 21))
58 #define GPIO22 (GPIO_PIN(PORT_GPIO, 22))
59 #define GPIO23 (GPIO_PIN(PORT_GPIO, 23))
60 /* GPIO 24 is not available */
61 #define GPIO25 (GPIO_PIN(PORT_GPIO, 25))
62 #define GPIO26 (GPIO_PIN(PORT_GPIO, 26))
63 #define GPIO27 (GPIO_PIN(PORT_GPIO, 27))
64 /* GPIOs 28 ...32 are not available */
65 #define GPIO32 (GPIO_PIN(PORT_GPIO, 32))
66 #define GPIO33 (GPIO_PIN(PORT_GPIO, 33))
67 /* GPIOs 34 ... 39 can only be used as inputs and do not have pullups/pulldowns */
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))
213 #ifdef MODULE_ESP_HW_COUNTER
215 #define TIMER_NUMOF (2)
216 #define TIMER_CHANNEL_NUMOF (1)
217 #endif
243 #ifdef __cplusplus
244 }
245 #endif
246 
RIOT-OS modification of the bootloader SDK configuration.