sduino icon indicating copy to clipboard operation
sduino copied to clipboard

IRQ example not quite right

Open dirkx opened this issue 4 years ago • 0 comments

The IRQ example for attachInterrupt(pin, hander, mode) shows the

attachInterrupt(digitalPinToInterrupt(pin), ISR, mode)

as the recommended example. This has two issues I think; first digitalPinToInterrupt() does not exist; but more seriously - the argument expected in attachInterrupt() is passed to digitalPinToPort() -and- is passed/used in the mask with digitalPinToBitMask(). So it should actually be the real pin.

dirkx avatar Jan 12 '22 20:01 dirkx