feat(chip): Add definition for BOOT_PIN for all chips (#10700)
* feat(chip): Add definition for BOOT_PIN for all chips For use in sketches as default button * fix(core): Make BOOT_PIN static * fix(hal): BOOT_PIN should always be defined
This commit is contained in:
parent
538efe3b8c
commit
9660e66325
1 changed files with 13 additions and 0 deletions
|
|
@ -61,6 +61,19 @@ extern "C" {
|
||||||
#define ARDUINO_EVENT_RUNNING_CORE CONFIG_ARDUINO_EVENT_RUNNING_CORE
|
#define ARDUINO_EVENT_RUNNING_CORE CONFIG_ARDUINO_EVENT_RUNNING_CORE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
|
||||||
|
static const uint8_t BOOT_PIN = 0;
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C61
|
||||||
|
static const uint8_t BOOT_PIN = 9;
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32P4
|
||||||
|
static const uint8_t BOOT_PIN = 35;
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32C5
|
||||||
|
static const uint8_t BOOT_PIN = 28;
|
||||||
|
#else
|
||||||
|
#error BOOT_PIN not defined for this chip!
|
||||||
|
#endif
|
||||||
|
#define BOOT_PIN BOOT_PIN
|
||||||
|
|
||||||
//forward declaration from freertos/portmacro.h
|
//forward declaration from freertos/portmacro.h
|
||||||
void vPortYield(void);
|
void vPortYield(void);
|
||||||
void yield(void);
|
void yield(void);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue