-
Notifications
You must be signed in to change notification settings - Fork 390
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
Esp32 arduino core 2.0.3 support #114
Esp32 arduino core 2.0.3 support #114
Conversation
if ( pin < 32 ) | ||
return (GPIO.in >> pin) & 0x1; | ||
else if ( pin < 40 ) | ||
else if ( pin < 46 ) |
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.
Can't this be digitalPinCanOutput(pin) to be a bit more discriminating for the variants?
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.
Good question, probably. Did just the needed changes, without touching existing code.
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.
Sorry, that line (for the input) should be digitalPinIsValid(). Later, in the output pin validation it should be digitalPinCanOutput().
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 send a pull request
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.
@lbernstone - Are you planning to send a pull request to use digitalPinCanOutput()? Or in other words, should I hold off making an official release to make this fix with number 46 hard coded available to the wide ESP32 Arduino community?
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.
At least a few people have now confirmed this solves the problems on ESP32. So unless someone sends a pull request, and even more people step up to give feedback (definitely the rate limiting factor), I'm leaning towards making a release with this code people have tested and confirmed is working.
fixes the compile error
esp32_gpioMux
for ESP32, ESP32-C3, ESP32-S2 and ESP32-S3