diff options
Diffstat (limited to 'keyboards/duck/octagon/v1')
-rw-r--r-- | keyboards/duck/octagon/v1/config.h | 9 | ||||
-rw-r--r-- | keyboards/duck/octagon/v1/info.json | 6 | ||||
-rw-r--r-- | keyboards/duck/octagon/v1/matrix.c | 8 | ||||
-rw-r--r-- | keyboards/duck/octagon/v1/rules.mk | 10 | ||||
-rw-r--r-- | keyboards/duck/octagon/v1/v1.c | 10 |
5 files changed, 20 insertions, 23 deletions
diff --git a/keyboards/duck/octagon/v1/config.h b/keyboards/duck/octagon/v1/config.h index 150436ffe4..c19aa1f22d 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 @@ -44,8 +39,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN D6 #define RGBLED_NUM 17 -/* Set to top left most key */ -#define BOOTMAGIC_LITE_ROW 5 -#define BOOTMAGIC_LITE_COLUMN 10 - #define TAPPING_TERM 200 diff --git a/keyboards/duck/octagon/v1/info.json b/keyboards/duck/octagon/v1/info.json index 8912165c6d..8eaf8fb0d9 100644 --- a/keyboards/duck/octagon/v1/info.json +++ b/keyboards/duck/octagon/v1/info.json @@ -8,6 +8,12 @@ "pid": "0x4F31", "device_version": "0.0.1" }, + "bootmagic": { + "matrix": [5, 10] + }, + "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..cf37a654a6 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) */ @@ -69,7 +73,7 @@ void matrix_init(void) { matrix_debouncing[i] = 0; } - matrix_init_quantum(); + matrix_init_kb(); } uint8_t matrix_scan(void) { @@ -103,7 +107,7 @@ uint8_t matrix_scan(void) { } } - matrix_scan_quantum(); + matrix_scan_kb(); return 1; } 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; } |