-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
feat(gpio): allows mixing digital and analog read/write operations #11016
Conversation
👋 Hello SuGlider, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results 76 files 76 suites 12m 38s ⏱️ Results for commit d3a02f0. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
I am firmly against allowing |
@me-no-dev - it is updated as requested. PTAL. |
cores/esp32/esp32-hal-gpio.c
Outdated
#endif | ||
|
||
#endif // RGB_BUILTIN | ||
// This work when the pin is set as GPIO and in INPUT mode. For all other pin functions, it may return inconsistent response | ||
if (perimanGetPinBus(pin, ESP32_BUS_TYPE_GPIO) != NULL) { |
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.
This should check if getPinBus is equal to NULL, else you are sending warning when the pin is actually set as GPIO
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.
Correct.
Description of Change
This PR will improve the message when the sketch wants to set a pin with
digitalWrite()
that has a different function than GPIO. It also allowdigitalRead()
to read the io level for any IO function. A warning message will be sent to the console in case that the pin is not set as GPIO.Example:
Tests scenarios
Using the sketches above.
Related links
None.