-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add: make digitalRead() for RGB_BUILTIN work #9418
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
Conversation
Standard Arduino-Way of blinking a LED can be the shortest with: void loop() { static uint32_t ledticker = 0; if (millis() - ledticker > 1000) { ledticker = millis(); digitalWrite(RGB_BUILTIN, !digitalRead(RGB_BUILTIN)); } } Worked with the old LED_BUILTIN on Pin 2, now even works with Pin 48/neopixel.
👋 Hello holgerlembke, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
extern void enableInterrupt(uint8_t pin) { | ||
gpio_intr_enable((gpio_num_t)pin); | ||
} | ||
|
||
extern void disableInterrupt(uint8_t pin) { | ||
gpio_intr_disable((gpio_num_t)pin); | ||
} | ||
|
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.
Please don't delete the ISR enabler/disabler
@@ -204,7 +215,7 @@ extern void __attachInterruptFunctionalArg(uint8_t pin, voidFuncPtrArg userFunc, | |||
interrupt_initialized = (err == ESP_OK) || (err == ESP_ERR_INVALID_STATE); | |||
} | |||
if(!interrupt_initialized) { | |||
log_e("IO %i ISR Service Failed To Start", pin); |
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.
Please don't simplify the error messages. This will make it more difficult to debug.
I did not update my locale code, so that is the state of the current 3.x alpha. Will close and resubmit. |
Standard Arduino-Way of blinking a LED can be the shortest with:
void loop() {
static uint32_t ledticker = 0;
if (millis() - ledticker > 1000) {
ledticker = millis();
digitalWrite(RGB_BUILTIN, !digitalRead(RGB_BUILTIN));
}
}
Worked with the old LED_BUILTIN on Pin 2, now even works with Pin 48/neopixel.
By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes
Checklist
This entire section above can be deleted if all items are checked.
Description of Change
Please describe your proposed Pull Request and it's impact.
Tests scenarios
Please describe on what Hardware and Software combinations you have tested this Pull Request and how.
(eg. I have tested my Pull Request on Arduino-esp32 core v2.0.2 with ESP32 and ESP32-S2 Board with this scenario)
Related links
Please provide links to related issue, PRs etc.
(eg. Closes #number of issue)