-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fixes all Board Variants issues for Arduino Core 3.0.0 #8706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes all Board Variants issues for Arduino Core 3.0.0 #8706
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SuGlider PTAL on the Adafruit LEDs
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) | ||
#define digitalPinHasPWM(p) (p < 46) | ||
|
||
#define LED_BUILTIN 13 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, you removed the define for LED_BUILTIN on pin 13
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | ||
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+PIN_NEOPIXEL; | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | ||
#define RGB_BUILTIN LED_BUILTIN | ||
#define RGB_BRIGHTNESS 64 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define LED_BUILTIN 13
can't be removed.
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | |
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+PIN_NEOPIXEL; | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN LED_BUILTIN | |
#define RGB_BRIGHTNESS 64 | |
#define LED_BUILTIN 13 | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) | |
#define RGB_BRIGHTNESS 64 | |
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | ||
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+PIN_NEOPIXEL; | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | ||
#define RGB_BUILTIN LED_BUILTIN | ||
#define RGB_BRIGHTNESS 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define LED_BUILTIN 13 can't be removed.
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | |
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+PIN_NEOPIXEL; | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN LED_BUILTIN | |
#define RGB_BRIGHTNESS 64 | |
#define LED_BUILTIN 13 | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) | |
#define RGB_BRIGHTNESS 64 |
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | ||
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); // Only 1 NeoPixel will be affected | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | ||
#define RGB_BUILTIN LED_BUILTIN | ||
#define RGB_BRIGHTNESS 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define LED_BUILTIN 13 can't be removed.
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | |
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); // Only 1 NeoPixel will be affected | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN LED_BUILTIN | |
#define RGB_BRIGHTNESS 64 | |
#define LED_BUILTIN 13 | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) | |
#define RGB_BRIGHTNESS 64 |
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | ||
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | ||
#define RGB_BUILTIN LED_BUILTIN | ||
#define RGB_BRIGHTNESS 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LED_BUILTIN 13
can't be removed.
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | |
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN LED_BUILTIN | |
#define RGB_BRIGHTNESS 64 | |
#define LED_BUILTIN 13 | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) | |
#define RGB_BRIGHTNESS 64 |
#define PIN_NEOPIXEL 33 | ||
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | ||
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | ||
#define RGB_BUILTIN LED_BUILTIN | ||
#define RGB_BRIGHTNESS 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LED_BUILTIN 13
can't be removed.
#define PIN_NEOPIXEL 33 | |
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | |
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN LED_BUILTIN | |
#define RGB_BRIGHTNESS 64 | |
#define LED_BUILTIN 13 | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) | |
#define RGB_BRIGHTNESS 64 |
#define PIN_NEOPIXEL 33 | ||
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | ||
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | ||
#define RGB_BUILTIN LED_BUILTIN | ||
#define RGB_BRIGHTNESS 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LED_BUILTIN 13
can't be removed.
#define PIN_NEOPIXEL 33 | |
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | |
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN LED_BUILTIN | |
#define RGB_BRIGHTNESS 64 | |
#define LED_BUILTIN 13 | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) | |
#define RGB_BRIGHTNESS 64 |
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | ||
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | ||
#define RGB_BUILTIN LED_BUILTIN | ||
#define RGB_BRIGHTNESS 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LED_BUILTIN 13
can't be removed.
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | |
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN LED_BUILTIN | |
#define RGB_BRIGHTNESS 64 | |
#define LED_BUILTIN 13 | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) | |
#define RGB_BRIGHTNESS 64 |
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | ||
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
#define LED_BUILTIN LED_BUILTIN | ||
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | ||
#define RGB_BUILTIN LED_BUILTIN | ||
#define RGB_BRIGHTNESS 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LED_BUILTIN 13
can't be removed.
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | |
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
#define LED_BUILTIN LED_BUILTIN | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN LED_BUILTIN | |
#define RGB_BRIGHTNESS 64 | |
#define LED_BUILTIN 13 | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) | |
#define RGB_BRIGHTNESS 64 |
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | ||
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | ||
#define RGB_BUILTIN LED_BUILTIN | ||
#define RGB_BRIGHTNESS 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LED_BUILTIN 13
can't be removed.
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino | |
static const uint8_t LED_BUILTIN = (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT); | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN LED_BUILTIN | |
#define RGB_BRIGHTNESS 64 | |
#define LED_BUILTIN 13 | |
#define BUILTIN_LED LED_BUILTIN // backward compatibility | |
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite() | |
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT) | |
#define RGB_BRIGHTNESS 64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just needs to solve the conflicts when merging.
Force rebase to master in #8726 |
Description of Change
This PR follows #8600 and #8562 changes for all necessary variant files / boards.txt.
It also fixes the #8560 issue in the Arduino Core 3.0.0
The PR moves common macros and defines to
Arduino.h
, not necessary inpins_arduino.h
file anymore.It also adds NEO_LED macros and constants in order to allow using it in a
digitalWrite()
for Blinking as in the example:https://github.com/espressif/arduino-esp32/blob/master/libraries/ESP32/examples/GPIO/BlinkRGB/BlinkRGB.ino
Tests scenarios
Passed boards CI https://github.com/SuGlider/arduino-esp32/actions/runs/6413632411
Testing compilation of a sketch using the new
Arduino.h
and its changes:Tested the sketch from #8560
Related links
Fix #8560