summaryrefslogtreecommitdiff
path: root/keyboards/duck/lightsaver
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/duck/lightsaver')
-rw-r--r--keyboards/duck/lightsaver/config.h5
-rw-r--r--keyboards/duck/lightsaver/matrix.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/keyboards/duck/lightsaver/config.h b/keyboards/duck/lightsaver/config.h
index 6b06edd008..88cd81f7d3 100644
--- a/keyboards/duck/lightsaver/config.h
+++ b/keyboards/duck/lightsaver/config.h
@@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#include "config_common.h"
/* key matrix size */
#define MATRIX_ROWS 6
@@ -25,10 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
-/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCE 5
-
-/* number of backlight levels */
#define BACKLIGHT_LEVELS 1
#define RGBLIGHT_EFFECT_BREATHING
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) |