Skip to content

Update/correct attach/detachInterrupts pin parameter compatibility documentation #524

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
Feb 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Language/Functions/External Interrupts/attachInterrupt.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ For more information on interrupts, see http://gammon.com.au/interrupts[Nick Gam
=== Syntax
`attachInterrupt(digitalPinToInterrupt(pin), ISR, mode);` (recommended) +
`attachInterrupt(interrupt, ISR, mode);` (not recommended) +
`attachInterrupt(pin, ISR, mode);` (not recommended Arduino Due, Zero, MKR1000, 101 only)
`attachInterrupt(pin, ISR, mode);` (Not recommended. Arduino SAMD Boards, Uno WiFi Rev2, Due, 101 only)


[float]
=== Parameters
`interrupt`: the number of the interrupt (`int`) +
`pin`: the pin number _(Arduino Due, Zero, MKR1000 only)_ +
`pin`: the pin number +
`ISR`: the ISR to call when the interrupt occurs; this function must take no parameters and return nothing. This function is sometimes referred to as an interrupt service routine. +
`mode`: defines when the interrupt should be triggered. Four constants are predefined as valid values: +

Expand Down
6 changes: 3 additions & 3 deletions Language/Functions/External Interrupts/detachInterrupt.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Turns off the given interrupt.

[float]
=== Syntax
`detachInterrupt(digitalPinToInterrupt(pin))` (Arduino AVR Boards only, recommended) +
`detachInterrupt(interrupt)` (Arduino AVR Boards only, not recommended) +
`detachInterrupt(pin)` (Arduino SAMD Boards, Due, 101 only)
`detachInterrupt(digitalPinToInterrupt(pin))` (recommended) +
`detachInterrupt(interrupt)` (not recommended) +
`detachInterrupt(pin)` (Not recommended. Arduino SAMD Boards, Uno WiFi Rev2, Due, 101 only)

[float]
=== Parameters
Expand Down