Skip to content

Commit cc32808

Browse files
committed
feat(chip): Add definition for BOOT_PIN for all chips
For use in sketches as default button
1 parent cd772f1 commit cc32808

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: cores/esp32/esp32-hal.h

+14
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@ extern "C" {
6161
#define ARDUINO_EVENT_RUNNING_CORE CONFIG_ARDUINO_EVENT_RUNNING_CORE
6262
#endif
6363

64+
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
65+
const uint8_t BOOT_PIN = 0;
66+
#define BOOT_PIN BOOT_PIN
67+
#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C61
68+
const uint8_t BOOT_PIN = 9;
69+
#define BOOT_PIN BOOT_PIN
70+
#elif CONFIG_IDF_TARGET_ESP32P4
71+
const uint8_t BOOT_PIN = 35;
72+
#define BOOT_PIN BOOT_PIN
73+
#elif CONFIG_IDF_TARGET_ESP32C5
74+
const uint8_t BOOT_PIN = 28;
75+
#define BOOT_PIN BOOT_PIN
76+
#endif
77+
6478
//forward declaration from freertos/portmacro.h
6579
void vPortYield(void);
6680
void yield(void);

0 commit comments

Comments
 (0)