You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes to the attachInterrupt() function code prevents the pin from being set-up when a NULL pointer callback is detected.
The older attachInterrupt() code allowed for both, enabling the attachInterrupt() to be used for setting up events on the SAMD21's event system, with the callback argument being passed as NULL or 0. Unfortunately, this is now not possible.
The event system can be used to allow pin interrupts to trigger TCC timer capture, please see Arduino Zero forum thread: https://forum.arduino.cc/index.php?topic=396804.0. The change to attachInterrupt() breaks most of the code examples on this thread.
The workaround is to use a dummy callback in place on the NULL, this solution however is rather inelegant.
The text was updated successfully, but these errors were encountered:
This is the related code change (9a49ce2#diff-2d6f462f44c0386e70bfb9e3ba804d5bR84). I must admit that I agree with @martinl1 , the SAMD21 case is quite particular but not unique, so we should revert part of the patch (leaving the null check but configuring the interrupt anyway) @cmaglie
Changes to the attachInterrupt() function code prevents the pin from being set-up when a NULL pointer callback is detected.
The older attachInterrupt() code allowed for both, enabling the attachInterrupt() to be used for setting up events on the SAMD21's event system, with the callback argument being passed as NULL or 0. Unfortunately, this is now not possible.
The event system can be used to allow pin interrupts to trigger TCC timer capture, please see Arduino Zero forum thread: https://forum.arduino.cc/index.php?topic=396804.0. The change to attachInterrupt() breaks most of the code examples on this thread.
The workaround is to use a dummy callback in place on the NULL, this solution however is rather inelegant.
The text was updated successfully, but these errors were encountered: