summaryrefslogtreecommitdiff
path: root/keyboards/duck/octagon/v1
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/duck/octagon/v1')
-rw-r--r--keyboards/duck/octagon/v1/config.h5
-rw-r--r--keyboards/duck/octagon/v1/info.json3
-rw-r--r--keyboards/duck/octagon/v1/matrix.c4
-rw-r--r--keyboards/duck/octagon/v1/rules.mk10
-rw-r--r--keyboards/duck/octagon/v1/v1.c10
5 files changed, 15 insertions, 17 deletions
diff --git a/keyboards/duck/octagon/v1/config.h b/keyboards/duck/octagon/v1/config.h
index 150436ffe4..fe44ef5126 100644
--- a/keyboards/duck/octagon/v1/config.h
+++ b/keyboards/duck/octagon/v1/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/octagon/v1/info.json b/keyboards/duck/octagon/v1/info.json
index 8912165c6d..c8208f0697 100644
--- a/keyboards/duck/octagon/v1/info.json
+++ b/keyboards/duck/octagon/v1/info.json
@@ -8,6 +8,9 @@
"pid": "0x4F31",
"device_version": "0.0.1"
},
+ "processor": "atmega32u4",
+ "bootloader": "atmel-dfu",
+ "community_layouts": ["75_ansi"],
"layouts": {
"LAYOUT_75_ansi": {
"layout": [
diff --git a/keyboards/duck/octagon/v1/matrix.c b/keyboards/duck/octagon/v1/matrix.c
index a2bea865bc..c903e619aa 100644
--- a/keyboards/duck/octagon/v1/matrix.c
+++ b/keyboards/duck/octagon/v1/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) */
diff --git a/keyboards/duck/octagon/v1/rules.mk b/keyboards/duck/octagon/v1/rules.mk
index 84dd4e31db..8d7b854ec0 100644
--- a/keyboards/duck/octagon/v1/rules.mk
+++ b/keyboards/duck/octagon/v1/rules.mk
@@ -1,9 +1,3 @@
-# MCU name
-MCU = atmega32u4
-
-# Bootloader selection
-BOOTLOADER = atmel-dfu
-
# Build Options
# change yes to no to disable
#
@@ -19,6 +13,4 @@ AUDIO_ENABLE = no # Audio output
RGBLIGHT_ENABLE = yes
CUSTOM_MATRIX = yes
-SRC += matrix.c \
-
-LAYOUTS = 75_ansi
+SRC += matrix.c
diff --git a/keyboards/duck/octagon/v1/v1.c b/keyboards/duck/octagon/v1/v1.c
index e9e88c70d0..575847f588 100644
--- a/keyboards/duck/octagon/v1/v1.c
+++ b/keyboards/duck/octagon/v1/v1.c
@@ -40,7 +40,11 @@ void backlight_set(uint8_t level) {
level & BACKLIGHT_RGBBLUE ? (PORTD |= 0b00010000) : (PORTD &= ~0b00010000);
}
-void led_set_kb(uint8_t usb_led) {
- backlight_os_state & (1<<USB_LED_CAPS_LOCK) ? (PORTB &= ~0b00000001) : (PORTB |= 0b00000001);
- backlight_os_state & (1<<USB_LED_SCROLL_LOCK) ? (PORTB &= ~0b00010000) : (PORTB |= 0b00010000);
+bool led_update_kb(led_t led_state) {
+ bool res = led_update_user(led_state);
+ if(res) {
+ backlight_os_state & (1<<USB_LED_CAPS_LOCK) ? (PORTB &= ~0b00000001) : (PORTB |= 0b00000001);
+ backlight_os_state & (1<<USB_LED_SCROLL_LOCK) ? (PORTB &= ~0b00010000) : (PORTB |= 0b00010000);
+ }
+ return res;
}