Thread safe and fast pin interrupt dispatching (attachInterrupt)

tni

Well-known member
I have submitted a pull request for a new attachInterrupt implementation:
https://github.com/PaulStoffregen/cores/pull/182

The first commit primarily addresses issue 181, thread safety and slightly improves performance.

The second commit has a CTZ/CLZ-based implementation of the port -> pin interrupt dispatching functionality (this is used when attaching a pin interrupt via attachInterrupt) for Kinetis K (Teensy 3.x) and is much faster. Teensy LC doesn't have hardware support for CLZ and is excluded.
 
Back
Top