This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Key { | |
byte id; | |
boolean pressed; | |
uint8_t bounceKey; | |
Key(byte id) : id(id), pressed(false), bounceKey(NOT_BOUNCING) {}; | |
} | |
boolean toggleKey(struct Key *key) { | |
key->bounceKey = checkStillBouncing(key->bounceKey); | |
if(key->bounceKey == NOT_BOUNCING){ |