Skip to content

Commit cabb7b7

Browse files
committed
Update FunctionalInterruptStruct.ino
1 parent 45a3bd2 commit cabb7b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/ESP32/examples/GPIO/FunctionalInterruptStruct/FunctionalInterruptStruct.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ struct Button {
1111

1212
void isr(void* param) {
1313
struct Button *button = (struct Button*) param;
14-
button->numberKeyPresses += 1;
14+
button->numberKeyPresses = button->numberKeyPresses + 1;
1515
button->pressed = 1;
1616
}
1717

1818
void checkPressed(struct Button* button) {
1919
if(button->pressed) {
20-
Serial.printf("Button on pin %u has been pressed %u times\n", button->PIN, button->numberKeyPresses);
20+
Serial.printf("Button on pin %u has been pressed %lu times\n", button->PIN, button->numberKeyPresses);
2121
button->pressed = 0;
2222
}
2323
}

0 commit comments

Comments
 (0)