Skip to content

Changes to attachInterrupt() prevent pin set-up with NULL callback pointer #309

Open
@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions