Skip to content

ISR code must be in ICACHE_RAM - the check was commited in ab125162bf #6002

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

Merged
merged 1 commit into from
Apr 20, 2019

Conversation

dok-net
Copy link
Contributor

@dok-net dok-net commented Apr 20, 2019

#5995 hasn't actually merged any PR - the minimum to get actual code working is in this PR.
Caveat: I don't know how to check if ICACHE_RAM_ATTR has the desired effect on lambda expressions, if it does not, there will still be an adverse performance (no real-time behavior!) impact over the standard Arduino attachInterrupt() usage.
Q: why not implement void attachInterruptArg(uint8_t pin, void ()(void), void * arg, int mode) like the ESP32 has already?

@d-a-v d-a-v merged commit 0dd6549 into esp8266:master Apr 20, 2019
@d-a-v
Copy link
Collaborator

d-a-v commented Apr 20, 2019

why not implement void attachInterruptArg(uint8_t pin, void ()(void), void * arg, int mode) like the ESP32 has already?

It is the same

typedef void (*voidFuncPtr)(void);
extern void ICACHE_RAM_ATTR __attachInterruptArg(uint8_t pin, voidFuncPtr userFunc, void *arg, int mode) {

@d-a-v
Copy link
Collaborator

d-a-v commented Apr 20, 2019

I don't know how to check if ICACHE_RAM_ATTR has the desired effect on lambda expressions

I used that code: #5780 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants