Skip to content

Commit

Permalink
Update FunctionalInterruptStruct.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
me-no-dev committed Feb 20, 2023
1 parent 45a3bd2 commit cabb7b7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ struct Button {

void isr(void* param) {
struct Button *button = (struct Button*) param;
button->numberKeyPresses += 1;
button->numberKeyPresses = button->numberKeyPresses + 1;
button->pressed = 1;
}

void checkPressed(struct Button* button) {
if(button->pressed) {
Serial.printf("Button on pin %u has been pressed %u times\n", button->PIN, button->numberKeyPresses);
Serial.printf("Button on pin %u has been pressed %lu times\n", button->PIN, button->numberKeyPresses);
button->pressed = 0;
}
}
Expand Down

0 comments on commit cabb7b7

Please sign in to comment.