Skip to content

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

Merged
d-a-v merged 1 commit intoesp8266:masterfrom
dok-net:master
Apr 20, 2019
Merged

ISR code must be in ICACHE_RAM - the check was commited in ab125162bf#6002
d-a-v merged 1 commit intoesp8266:masterfrom
dok-net:master

Conversation

@dok-net
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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