diff options
Diffstat (limited to 'keyboards/duck/lightsaver/matrix.c')
-rw-r--r-- | keyboards/duck/lightsaver/matrix.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/keyboards/duck/lightsaver/matrix.c b/keyboards/duck/lightsaver/matrix.c index 066452724f..48861e08fe 100644 --- a/keyboards/duck/lightsaver/matrix.c +++ b/keyboards/duck/lightsaver/matrix.c @@ -22,6 +22,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "print.h" #include "debug.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ @@ -138,7 +142,7 @@ static void init_rows(void) { PORTE |= 0b00000100; } -static uint8_t read_rows() { +static uint8_t read_rows(void) { return (PINB&(1<<7) ? (1<<0) : 0) | (PIND&(1<<0) ? (1<<1) : 0) | (PIND&(1<<1) ? (1<<2) : 0) | |