-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Bugfix: attach interrupt (#6049) #6048
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
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 PR shows lots of changes because of tab/space/style updates, making It hard to read.
Approving because
- it fixes a bug (for release 2.5.1?)
- (and if) restyle core and libraries with Allman #5726/prepare allman style #5774 will come back right after 2.5.1 release so that readability issue will happen no more.
Indeed and I took time to digest them. #5774 is not meant to be used on some files but on all files at once (and will be checked by CI from that moment). In the meantime, doing that in a PR is not nice for reviewers. |
@d-a-v I am really aware of that and quite sorry, but please trust me that all these smart code editors I use keep changing layouts all the time and having three proposals in the game, it began to seem to make sense to me to use the styling provided for in the repo sources already. The examples even get |
@d-a-v This bug-fixing PR should be readable now (please use diff settings: hide whitespace changes). |
@dok-net |
@d-a-v If deleting |
You are right,
Well it is true in such case where a handler stopping itself needs to destroy everything. The other way would be to use a Scheduled function to do that job but then it would have to be managed with a bool in the interrupt handler to check wether the handler is in a destroy state. I vote for putting iram back in |
I think I reconsider my opinion on supporting detachInterrupt() from inside executing ISRs - does this not lead to object destruction on functional etc. occurring while the same are in the middle of executing? Is that well specified? From reading up on the IRAM size of the ESP8266, it would also seem to be unwise pinning all this code there out of convenience, given that the resulting inability to run applications at all will be most inconvenient ;-) |
@earlephilhower So here I am asking you to speed up acceptance of this PR in order for me to update EspSoftwareSerial. It's getting quite tedious switching between my esp8266 branches, especially due to the SoftwareSerial submodule that keeps changing back and forth all the time due to this dependency. |
@dok-net please open a gitter account and let me know here. I'll send an invite to discuss directly there. |
@devyte I have an account there now. |
e406754
to
9a6e9e5
Compare
@d-a-v @devyte At the speed of Schedule merges, I'm getting jealous :-)
I've done this now. This one PR really doesn't change all that much, it just enables me to publish the proper next EspSoftwareSerial and we could go forward with discussing more seriously my other PRs after this. |
I think we can merge. @devyte was requesting a chat, I'll let him merge. |
5812996
to
0ca7134
Compare
@devyte I've a bug report against EspSoftwareSerial that I expect to fix within 24h, which will bring a new release of the package into focus. Is there anything standing in the way of a positive review and merge of this mostly-pure-bugfix PR? The additional exposing of attachInterruptArg() is just alignment with ESP32 and is also due, I'd like to add. |
69e56ed
to
b41d5c6
Compare
4bf3c05
to
fac85ec
Compare
2c6ca16
to
ad3028d
Compare
(cherry picked from commit 15c0b5b356aad0c3032b96ed6db0ec70cbf719d3) # Conflicts: # cores/esp8266/core_esp8266_wiring_digital.cpp
ad3028d
to
c3d359c
Compare
@devyte I was asked by d-a-v to close the lesser of those PRs fixing the same problem. #6047 supersedes this one, but is much more complex, where this here PR is just a few lines. So please understand that I personally would not close it and hope for an iterative approach - rebasing #6047 on this PR is not challenging. |
Fixes: #6049
(Reference: PR #6047 implement all-C++ functional based interrupt service routine handling. Caveat: ICACHE_RAM_ATTR attributes maybe don't quite work on functional instances, like lambdas, yet)