There's a mismatch between how interrupts are documented and how they are used in the example code.
The docs describe how to use the function attachInterrupt(digitalPinToInterrupt(BUTTON_PIN), buttonPressed, FALLING); to enable interrupts on a button. This function is encapsulated by the enableInterrupt() function, used in the examples. While it might be useful to document the lower level attachInterrupt() function, the docs should show how to use enableInterrupt() first, and then show what's happening within enableInterrupt().
There's a mismatch between how interrupts are documented and how they are used in the example code.
The docs describe how to use the function
attachInterrupt(digitalPinToInterrupt(BUTTON_PIN), buttonPressed, FALLING);
to enable interrupts on a button. This function is encapsulated by theenableInterrupt()
function, used in the examples. While it might be useful to document the lower levelattachInterrupt()
function, the docs should show how to useenableInterrupt()
first, and then show what's happening withinenableInterrupt()
.