summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/ktec/ergodone/config.h77
-rw-r--r--keyboards/ktec/ergodone/ergodone.c57
-rw-r--r--keyboards/ktec/ergodone/ergodone.h158
-rw-r--r--keyboards/ktec/ergodone/ergodox_compat.h94
-rw-r--r--keyboards/ktec/ergodone/expander.c104
-rw-r--r--keyboards/ktec/ergodone/expander.h45
-rw-r--r--keyboards/ktec/ergodone/info.json428
-rw-r--r--keyboards/ktec/ergodone/keymaps/default/keymap.c38
-rw-r--r--keyboards/ktec/ergodone/keymaps/via/config.h18
-rw-r--r--keyboards/ktec/ergodone/keymaps/via/readme.md5
-rw-r--r--keyboards/ktec/ergodone/matrix.c388
-rw-r--r--keyboards/ktec/ergodone/rules.mk30
12 files changed, 653 insertions, 789 deletions
diff --git a/keyboards/ktec/ergodone/config.h b/keyboards/ktec/ergodone/config.h
index ee51e4c055..afe1512aa4 100644
--- a/keyboards/ktec/ergodone/config.h
+++ b/keyboards/ktec/ergodone/config.h
@@ -1,77 +1,8 @@
-#pragma once
-
-#include "config_common.h"
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0x1209
-#define PRODUCT_ID 0x2328
-// The official ErgoDone VID and PID are documented at http://pid.codes/1209/2328/.
-#define DEVICE_VER 0x0001
-#define MANUFACTURER K.T.E.C.
-#define PRODUCT ErgoDone
+#pragma once
-/* key matrix size */
+// TODO: handle matrix_size.cols and matrix_size.rows for custom matrix
#define MATRIX_ROWS 6
#define MATRIX_COLS 14
-
-#define MOUSEKEY_INTERVAL 20
-#define MOUSEKEY_DELAY 0
-#define MOUSEKEY_TIME_TO_MAX 60
-#define MOUSEKEY_MAX_SPEED 7
-#define MOUSEKEY_WHEEL_DELAY 0
-
-#define TAPPING_TOGGLE 1
-
-/* define if matrix has ghost */
-//#define MATRIX_HAS_GHOST
-
-#define TAPPING_TERM 200
-#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
-
-/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
-#define LOCKING_SUPPORT_ENABLE
-/* Locking resynchronize hack */
-#define LOCKING_RESYNC_ENABLE
-
-/* key combination for command */
-#define IS_COMMAND() ( \
- get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
- get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
-)
-
-/* number of backlight levels */
-#define BACKLIGHT_LEVELS 3
-
-#define LED_BRIGHTNESS_LO 15
-#define LED_BRIGHTNESS_HI 255
-
-/* fix space cadet rollover issue */
-#define DISABLE_SPACE_CADET_ROLLOVER
-
-/* Set 0 if debouncing isn't needed */
-#define DEBOUNCE 5
-
-#define USB_MAX_POWER_CONSUMPTION 500
-
-/* NKRO */
-#ifndef FORCE_NKRO
- #define FORCE_NKRO // Depends on NKRO_ENABLE.
-#endif
-
-/*
- * Feature disable options
- * These options are also useful to firmware size reduction.
- */
-
-/* disable debug print */
-// #define NO_DEBUG
-
-/* disable print */
-// #define NO_PRINT
-
-/* disable action features */
-//#define NO_ACTION_LAYER
-//#define NO_ACTION_TAPPING
-//#define NO_ACTION_ONESHOT
-
-//#define DEBUG_MATRIX_SCAN_RATE
diff --git a/keyboards/ktec/ergodone/ergodone.c b/keyboards/ktec/ergodone/ergodone.c
index e0579408e5..53ff8c9844 100644
--- a/keyboards/ktec/ergodone/ergodone.c
+++ b/keyboards/ktec/ergodone/ergodone.c
@@ -1,54 +1,11 @@
-#include "ergodone.h"
-
-extern inline void ergodox_board_led_on(void);
-extern inline void ergodox_right_led_1_on(void);
-extern inline void ergodox_right_led_2_on(void);
-extern inline void ergodox_right_led_3_on(void);
-extern inline void ergodox_right_led_on(uint8_t led);
-
-extern inline void ergodox_board_led_off(void);
-extern inline void ergodox_right_led_1_off(void);
-extern inline void ergodox_right_led_2_off(void);
-extern inline void ergodox_right_led_3_off(void);
-extern inline void ergodox_right_led_off(uint8_t led);
-
-extern inline void ergodox_led_all_off(void);
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
-void ergodox_led_init(void);
-void ergodox_blink_all_leds(void);
-
-void matrix_init_kb(void) {
- ergodox_led_init();
- ergodox_blink_all_leds();
- matrix_init_user();
-}
+#include "ergodone.h"
-void ergodox_led_init(void)
- {
- DDRB |= (1<<PB5 | 1<<PB6 | 1<<PB3);
- PORTB &= ~(1<<PB5 | 1<<PB6 | 1<<PB3);
- DDRB |= (1<<PB0);
- PORTB |= (1<<PB0);
- DDRD |= (1<<PB5);
- PORTD |= (1<<PB5);
-}
+#include "ergodox_compat.h"
+void keyboard_post_init_kb(void) {
+ ergodox_blink_all_leds();
-void ergodox_blink_all_leds(void)
-{
- ergodox_led_all_off();
- ergodox_led_all_set(LED_BRIGHTNESS_HI);
- ergodox_right_led_1_on();
- _delay_ms(50);
- ergodox_right_led_2_on();
- _delay_ms(50);
- ergodox_right_led_3_on();
- _delay_ms(50);
- ergodox_right_led_1_off();
- _delay_ms(50);
- ergodox_right_led_2_off();
- _delay_ms(50);
- ergodox_right_led_3_off();
- //ergodox_led_all_on();
- //_delay_ms(333);
- ergodox_led_all_off();
+ keyboard_post_init_user();
}
diff --git a/keyboards/ktec/ergodone/ergodone.h b/keyboards/ktec/ergodone/ergodone.h
index 77e4968543..191b1ca2a9 100644
--- a/keyboards/ktec/ergodone/ergodone.h
+++ b/keyboards/ktec/ergodone/ergodone.h
@@ -1,156 +1,10 @@
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
#pragma once
#include "quantum.h"
-#include <stdint.h>
-#include <stdbool.h>
-
-void init_ergodox(void);
-
-inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<PB5); PORTB &= ~(1<<PB5); }
-inline void ergodox_right_led_1_on(void) { DDRB |= (1<<PB5); PORTB |= (1<<PB5); }
-inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<PB6); PORTB &= ~(1<<PB6); }
-inline void ergodox_right_led_2_on(void) { DDRB |= (1<<PB6); PORTB |= (1<<PB6); }
-inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<PB3); PORTB &= ~(1<<PB3); }
-inline void ergodox_right_led_3_on(void) { DDRB |= (1<<PB3); PORTB |= (1<<PB3); }
-inline void ergodox_right_led_on(uint8_t l) {
- switch (l) {
- case 1:
- ergodox_right_led_1_on();
- break;
- case 2:
- ergodox_right_led_2_on();
- break;
- case 3:
- ergodox_right_led_3_on();
- break;
- default:
- break;
- }
-}
-
-inline void ergodox_right_led_off(uint8_t l) {
- switch (l) {
- case 1:
- ergodox_right_led_1_off();
- break;
- case 2:
- ergodox_right_led_2_off();
- break;
- case 3:
- ergodox_right_led_3_off();
- break;
- default:
- break;
- }
-}
-inline void ergodox_board_led_off(void) { DDRB &= ~(1<<PB0); PORTB |= (1<<PB0); }
-inline void ergodox_board_led_on(void) { DDRB |= (1<<PB0); PORTB &= ~(1<<PB0); }
-inline void ergodox_led_all_on(void) {
- ergodox_right_led_1_on();
- ergodox_right_led_2_on();
- ergodox_right_led_3_on();
- ergodox_board_led_on();
-}
-inline void ergodox_led_all_off(void) {
- ergodox_right_led_1_off();
- ergodox_right_led_2_off();
- ergodox_right_led_3_off();
- ergodox_board_led_off();
-}
-inline void ergodox_right_led_1_set(uint8_t n) {}
-inline void ergodox_right_led_2_set(uint8_t n) {}
-inline void ergodox_right_led_3_set(uint8_t n) {}
-inline void ergodox_right_led_set(uint8_t l, uint8_t n) {}
-inline void ergodox_led_all_set(uint8_t n) {}
-
-#define XXX KC_NO
-
-#define LAYOUT_ergodox( \
- k00, k01, k02, k03, k04, k05, k06, \
- k10, k11, k12, k13, k14, k15, k16, \
- k20, k21, k22, k23, k24, k25, \
- k30, k31, k32, k33, k34, k35, k36, \
- k40, k41, k42, k43, k44, \
- k55, k56, \
- k54, \
- k53, k52, k51, \
-\
- k07, k08, k09, k0A, k0B, k0C, k0D, \
- k17, k18, k19, k1A, k1B, k1C, k1D, \
- k28, k29, k2A, k2B, k2C, k2D, \
- k37, k38, k39, k3A, k3B, k3C, k3D, \
- k49, k4A, k4B, k4C, k4D, \
- k57, k58, \
- k59, \
- k5C, k5B, k5A \
-) { \
- { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
- { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \
- { k20, k21, k22, k23, k24, k25, XXX, XXX, k28, k29, k2A, k2B, k2C, k2D }, \
- { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
- { k40, k41, k42, k43, k44, XXX, XXX, XXX, XXX, k49, k4A, k4B, k4C, k4D }, \
- { XXX, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, XXX } \
-}
-
-#define LAYOUT_ergodox_80( \
- k00, k01, k02, k03, k04, k05, k06, \
- k10, k11, k12, k13, k14, k15, k16, \
- k20, k21, k22, k23, k24, k25, \
- k30, k31, k32, k33, k34, k35, k36, \
- k40, k41, k42, k43, k44, \
- k55, k56, \
- k45, k46, k54, \
- k53, k52, k51, \
-\
- k07, k08, k09, k0A, k0B, k0C, k0D, \
- k17, k18, k19, k1A, k1B, k1C, k1D, \
- k28, k29, k2A, k2B, k2C, k2D, \
- k37, k38, k39, k3A, k3B, k3C, k3D, \
- k49, k4A, k4B, k4C, k4D, \
- k57, k58, \
- k59, k47, k48, \
- k5C, k5B, k5A \
-) { \
- { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
- { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \
- { k20, k21, k22, k23, k24, k25, XXX, XXX, k28, k29, k2A, k2B, k2C, k2D }, \
- { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \
- { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \
- { XXX, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, XXX } \
- }
-
-#define LAYOUT_ergodox_pretty( \
- L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
- L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
- L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, \
- L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
- L40, L41, L42, L43, L44, R42, R43, R44, R45, R46, \
- L55, L56, R50, R51, \
- L54, R52, \
- L53, L52, L51, R55, R54, R53 \
-) { \
- { L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06 }, \
- { L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16 }, \
- { L20, L21, L22, L23, L24, L25, XXX, XXX, R21, R22, R23, R24, R25, R26 }, \
- { L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 }, \
- { L40, L41, L42, L43, L44, XXX, XXX, XXX, XXX, R42, R43, R44, R45, R46 }, \
- { XXX, L51, L52, L53, L54, L55, L56, R50, R51, R52, R53, R54, R55, XXX } \
-}
+#include "layouts.h" // Ensure access to info.json layouts
-#define LAYOUT_ergodox_pretty_80( \
- L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \
- L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \
- L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, \
- L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \
- L40, L41, L42, L43, L44, R42, R43, R44, R45, R46, \
- L55, L56, R50, R51, \
- L45, L46, L54, R52, R40, R41, \
- L53, L52, L51, R55, R54, R53 \
-) { \
- { L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06 }, \
- { L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16 }, \
- { L20, L21, L22, L23, L24, L25, XXX, XXX, R21, R22, R23, R24, R25, R26 }, \
- { L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 }, \
- { L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 }, \
- { XXX, L51, L52, L53, L54, L55, L56, R50, R51, R52, R53, R54, R55, XXX } \
-}
+// This file only exists to pull in....
+#include "ergodox_compat.h"
diff --git a/keyboards/ktec/ergodone/ergodox_compat.h b/keyboards/ktec/ergodone/ergodox_compat.h
new file mode 100644
index 0000000000..de6ee4a211
--- /dev/null
+++ b/keyboards/ktec/ergodone/ergodox_compat.h
@@ -0,0 +1,94 @@
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <stdint.h>
+#include "gpio.h"
+#include "wait.h"
+
+// All this for ergodox led compatibility...
+#ifdef CONVERT_TO_PROTON_C
+# define ERGODOX_BOARD_LED_ON_STATE 1
+#else
+# define ERGODOX_BOARD_LED_ON_STATE 0
+#endif
+#define LED_BRIGHTNESS_LO 15
+#define LED_BRIGHTNESS_HI 255
+static inline void ergodox_right_led_1_off(void) { setPinOutput(LED_NUM_LOCK_PIN); writePin(LED_NUM_LOCK_PIN, 0); }
+static inline void ergodox_right_led_1_on(void) { setPinOutput(LED_NUM_LOCK_PIN); writePin(LED_NUM_LOCK_PIN, 1); }
+static inline void ergodox_right_led_2_off(void) { setPinOutput(LED_CAPS_LOCK_PIN); writePin(LED_CAPS_LOCK_PIN, 0); }
+static inline void ergodox_right_led_2_on(void) { setPinOutput(LED_CAPS_LOCK_PIN); writePin(LED_CAPS_LOCK_PIN, 1); }
+static inline void ergodox_right_led_3_off(void) { setPinOutput(LED_SCROLL_LOCK_PIN); writePin(LED_SCROLL_LOCK_PIN, 0); }
+static inline void ergodox_right_led_3_on(void) { setPinOutput(LED_SCROLL_LOCK_PIN); writePin(LED_SCROLL_LOCK_PIN, 1); }
+static inline void ergodox_right_led_on(uint8_t l) {
+ switch (l) {
+ case 1:
+ ergodox_right_led_1_on();
+ break;
+ case 2:
+ ergodox_right_led_2_on();
+ break;
+ case 3:
+ ergodox_right_led_3_on();
+ break;
+ default:
+ break;
+ }
+}
+static inline void ergodox_right_led_off(uint8_t l) {
+ switch (l) {
+ case 1:
+ ergodox_right_led_1_off();
+ break;
+ case 2:
+ ergodox_right_led_2_off();
+ break;
+ case 3:
+ ergodox_right_led_3_off();
+ break;
+ default:
+ break;
+ }
+}
+static inline void ergodox_board_led_off(void) { setPinOutput(D5); writePin(D5, !ERGODOX_BOARD_LED_ON_STATE); }
+static inline void ergodox_board_led_on(void) { setPinOutput(D5); writePin(D5, ERGODOX_BOARD_LED_ON_STATE); }
+static inline void ergodox_led_all_on(void) {
+ ergodox_right_led_1_on();
+ ergodox_right_led_2_on();
+ ergodox_right_led_3_on();
+ ergodox_board_led_on();
+}
+static inline void ergodox_led_all_off(void) {
+ ergodox_right_led_1_off();
+ ergodox_right_led_2_off();
+ ergodox_right_led_3_off();
+ ergodox_board_led_off();
+}
+static inline void ergodox_right_led_1_set(uint8_t n) {}
+static inline void ergodox_right_led_2_set(uint8_t n) {}
+static inline void ergodox_right_led_3_set(uint8_t n) {}
+static inline void ergodox_right_led_set(uint8_t l, uint8_t n) {}
+static inline void ergodox_led_all_set(uint8_t n) {}
+static inline void ergodox_led_init(void) {}
+static inline void ergodox_blink_all_leds(void) {
+ ergodox_led_all_off();
+ ergodox_board_led_on();
+ wait_ms(50);
+ ergodox_right_led_1_on();
+ wait_ms(50);
+ ergodox_right_led_2_on();
+ wait_ms(50);
+ ergodox_right_led_3_on();
+ wait_ms(50);
+ ergodox_right_led_1_off();
+ wait_ms(50);
+ ergodox_right_led_2_off();
+ wait_ms(50);
+ ergodox_right_led_3_off();
+ wait_ms(50);
+ ergodox_board_led_off();
+ //ergodox_led_all_on();
+ //wait_ms(333);
+ ergodox_led_all_off();
+} \ No newline at end of file
diff --git a/keyboards/ktec/ergodone/expander.c b/keyboards/ktec/ergodone/expander.c
deleted file mode 100644
index a4d48e9edb..0000000000
--- a/keyboards/ktec/ergodone/expander.c
+++ /dev/null
@@ -1,104 +0,0 @@
-#include <stdbool.h>
-#include "action.h"
-#include "i2c_master.h"
-#include "expander.h"
-#include "debug.h"
-
-#define I2C_TIMEOUT 100
-
-static uint8_t expander_status = 0;
-static uint8_t expander_input = 0;
-
-void expander_config(void);
-uint8_t expander_write(uint8_t reg, uint8_t data);
-uint8_t expander_read(uint8_t reg, uint8_t *data);
-
-void expander_init(void)
-{
- i2c_init();
- expander_scan();
-}
-
-void expander_scan(void)
-{
- dprintf("expander status: %d ... ", expander_status);
- uint8_t ret = i2c_start(EXPANDER_ADDR | I2C_WRITE, I2C_TIMEOUT);
- if (ret == 0) {
- i2c_stop();
- if (expander_status == 0) {
- dprintf("attached\n");
- expander_status = 1;
- expander_config();
- clear_keyboard();
- }
- }
- else {
- if (expander_status == 1) {
- dprintf("detached\n");
- expander_status = 0;
- clear_keyboard();
- }
- }
- dprintf("%d\n", expander_status);
-}
-
-void expander_read_cols(void)
-{
- expander_read(EXPANDER_REG_GPIOA, &expander_input);
-}
-
-uint8_t expander_get_col(uint8_t col)
-{
- if (col > 4) {
- col++;
- }
- return expander_input & (1<<col) ? 1 : 0;
-}
-
-matrix_row_t expander_read_row(void)
-{
- expander_read_cols();
-
- /* make cols */
- matrix_row_t cols = 0;
- for (uint8_t col = 0; col < MATRIX_COLS; col++) {
- if (expander_get_col(col)) {
- cols |= (1UL << (MATRIX_COLS - 1 - col));
- }
- }
-
- return cols;
-}
-
-void expander_unselect_rows(void)
-{
- expander_write(EXPANDER_REG_IODIRB, 0xFF);
-}
-
-void expander_select_row(uint8_t row)
-{
- expander_write(EXPANDER_REG_IODIRB, ~(1<<(row+1)));
-}
-
-void expander_config(void)
-{
- expander_write(EXPANDER_REG_IPOLA, 0xFF);
- expander_write(EXPANDER_REG_GPPUA, 0xFF);
- expander_write(EXPANDER_REG_IODIRB, 0xFF);
-}
-
-uint8_t expander_write(uint8_t reg, uint8_t data)
-{
- if (expander_status == 0) {
- return 0;
- }
- return i2c_writeReg(EXPANDER_ADDR, reg, &data, 1, I2C_TIMEOUT);
-}
-
-uint8_t expander_read(uint8_t reg, uint8_t *data)
-{
- if (expander_status == 0) {
- return 0;
- }
- return i2c_readReg(EXPANDER_ADDR, reg, data, 1, I2C_TIMEOUT);
-}
diff --git a/keyboards/ktec/ergodone/expander.h b/keyboards/ktec/ergodone/expander.h
deleted file mode 100644
index 071570c408..0000000000
--- a/keyboards/ktec/ergodone/expander.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#pragma once
-
-#include <stdint.h>
-#include "matrix.h"
-
-#define MCP23017
-#define MCP23017_A0 0
-#define MCP23017_A1 0
-#define MCP23017_A2 0
-
-#ifdef MCP23017
-#define EXPANDER_ADDR ((0x20|(MCP23017_A0<<0)|(MCP23017_A1<<1)|(MCP23017_A2<<2)) << 1)
-enum EXPANDER_REG_BANK0 {
- EXPANDER_REG_IODIRA = 0,
- EXPANDER_REG_IODIRB,
- EXPANDER_REG_IPOLA,
- EXPANDER_REG_IPOLB,
- EXPANDER_REG_GPINTENA,
- EXPANDER_REG_GPINTENB,
- EXPANDER_REG_DEFVALA,
- EXPANDER_REG_DEFVALB,
- EXPANDER_REG_INTCONA,
- EXPANDER_REG_INTCONB,
- EXPANDER_REG_IOCONA,
- EXPANDER_REG_IOCONB,
- EXPANDER_REG_GPPUA,
- EXPANDER_REG_GPPUB,
- EXPANDER_REG_INTFA,
- EXPANDER_REG_INTFB,
- EXPANDER_REG_INTCAPA,
- EXPANDER_REG_INTCAPB,
- EXPANDER_REG_GPIOA,
- EXPANDER_REG_GPIOB,
- EXPANDER_REG_OLATA,
- EXPANDER_REG_OLATB
-};
-#endif
-
-void expander_init(void);
-void expander_scan(void);
-void expander_read_cols(void);
-uint8_t expander_get_col(uint8_t col);
-matrix_row_t expander_read_row(void);
-void expander_unselect_rows(void);
-void expander_select_row(uint8_t row);
diff --git a/keyboards/ktec/ergodone/info.json b/keyboards/ktec/ergodone/info.json
index e8f8b2bc89..e2b2d4305a 100644
--- a/keyboards/ktec/ergodone/info.json
+++ b/keyboards/ktec/ergodone/info.json
@@ -1,104 +1,354 @@
{
"keyboard_name": "Ergodone",
+ "manufacturer": "K.T.E.C.",
"maintainer": "Yu He",
+ "processor": "atmega32u4",
+ "bootloader": "caterina",
+ "usb": {
+ "vid": "0x1209",
+ "pid": "0x2328",
+ "device_version": "0.0.1"
+ },
+ "features": {
+ "bootmagic": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true
+ },
+ "indicators": {
+ "num_lock": "B5",
+ "caps_lock": "B6",
+ "scroll_lock": "B3"
+ },
+ "community_layouts": ["ergodox"],
"layouts": {
"LAYOUT_ergodox": {
-
"layout": [
- {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
- {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
- {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
- {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
- {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
-
- {"x":6, "y":5}, {"x":7, "y":5},
- {"x":7, "y":6},
- {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7},
-
-
- {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
- {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
- {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
- {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
- {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
-
-
- {"x":9, "y":5}, {"x":10, "y":5},
- {"x":9, "y":6},
- {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
+ { "label": "k00", "matrix": [0, 0], "w": 1.5, "x": 0, "y": 0.375 },
+ { "label": "k01", "matrix": [0, 1], "w": 1, "x": 1.5, "y": 0.375 },
+ { "label": "k02", "matrix": [0, 2], "w": 1, "x": 2.5, "y": 0.125 },
+ { "label": "k03", "matrix": [0, 3], "w": 1, "x": 3.5, "y": 0 },
+ { "label": "k04", "matrix": [0, 4], "w": 1, "x": 4.5, "y": 0.125 },
+ { "label": "k05", "matrix": [0, 5], "w": 1, "x": 5.5, "y": 0.25 },
+ { "label": "k06", "matrix": [0, 6], "w": 1, "x": 6.5, "y": 0.25 },
+ { "label": "k10", "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1.375 },
+ { "label": "k11", "matrix": [1, 1], "w": 1, "x": 1.5, "y": 1.375 },
+ { "label": "k12", "matrix": [1, 2], "w": 1, "x": 2.5, "y": 1.125 },
+ { "label": "k13", "matrix": [1, 3], "w": 1, "x": 3.5, "y": 1 },
+ { "label": "k14", "matrix": [1, 4], "w": 1, "x": 4.5, "y": 1.125 },
+ { "label": "k15", "matrix": [1, 5], "w": 1, "x": 5.5, "y": 1.25 },
+ { "label": "k16", "matrix": [1, 6], "w": 1, "x": 6.5, "y": 1.25, "h": 1.5 },
+ { "label": "k20", "matrix": [2, 0], "w": 1.5, "x": 0, "y": 2.375 },
+ { "label": "k21", "matrix": [2, 1], "w": 1, "x": 1.5, "y": 2.375 },
+ { "label": "k22", "matrix": [2, 2], "w": 1, "x": 2.5, "y": 2.125 },
+ { "label": "k23", "matrix": [2, 3], "w": 1, "x": 3.5, "y": 2 },
+ { "label": "k24", "matrix": [2, 4], "w": 1, "x": 4.5, "y": 2.125 },
+ { "label": "k25", "matrix": [2, 5], "w": 1, "x": 5.5, "y": 2.25 },
+ { "label": "k30", "matrix": [3, 0], "w": 1.5, "x": 0, "y": 3.375 },
+ { "label": "k31", "matrix": [3, 1], "w": 1, "x": 1.5, "y": 3.375 },
+ { "label": "k32", "matrix": [3, 2], "w": 1, "x": 2.5, "y": 3.125 },
+ { "label": "k33", "matrix": [3, 3], "w": 1, "x": 3.5, "y": 3 },
+ { "label": "k34", "matrix": [3, 4], "w": 1, "x": 4.5, "y": 3.125 },
+ { "label": "k35", "matrix": [3, 5], "w": 1, "x": 5.5, "y": 3.25 },
+ { "label": "k36", "matrix": [3, 6], "w": 1, "x": 6.5, "y": 2.75, "h": 1.5 },
+ { "label": "k40", "matrix": [4, 0], "w": 1, "x": 0.5, "y": 4.375 },
+ { "label": "k41", "matrix": [4, 1], "w": 1, "x": 1.5, "y": 4.375 },
+ { "label": "k42", "matrix": [4, 2], "w": 1, "x": 2.5, "y": 4.125 },
+ { "label": "k43", "matrix": [4, 3], "w": 1, "x": 3.5, "y": 4 },
+ { "label": "k44", "matrix": [4, 4], "w": 1, "x": 4.5, "y": 4.125 },
+ { "label": "k55", "matrix": [5, 5], "w": 1, "x": 6, "y": 5 },
+ { "label": "k56", "matrix": [5, 6], "w": 1, "x": 7, "y": 5 },
+ { "label": "k54", "matrix": [5, 4], "w": 1, "x": 7, "y": 6 },
+ { "label": "k53", "matrix": [5, 3], "w": 1, "x": 5, "y": 6, "h": 2 },
+ { "label": "k52", "matrix": [5, 2], "w": 1, "x": 6, "y": 6, "h": 2 },
+ { "label": "k51", "matrix": [5, 1], "w": 1, "x": 7, "y": 7 },
+ { "label": "k07", "matrix": [0, 7], "w": 1, "x": 9.5, "y": 0.25 },
+ { "label": "k08", "matrix": [0, 8], "w": 1, "x": 10.5, "y": 0.25 },
+ { "label": "k09", "matrix": [0, 9], "w": 1, "x": 11.5, "y": 0.125 },
+ { "label": "k0A", "matrix": [0, 10], "w": 1, "x": 12.5, "y": 0 },
+ { "label": "k0B", "matrix": [0, 11], "w": 1, "x": 13.5, "y": 0.125 },
+ { "label": "k0C", "matrix": [0, 12], "w": 1, "x": 14.5, "y": 0.375 },
+ { "label": "k0D", "matrix": [0, 13], "w": 1.5, "x": 15.5, "y": 0.375 },
+ { "label": "k17", "matrix": [1, 7], "w": 1, "x": 9.5, "y": 1.25, "h": 1.5 },
+ { "label": "k18", "matrix": [1, 8], "w": 1, "x": 10.5, "y": 1.25 },
+ { "label": "k19", "matrix": [1, 9], "w": 1, "x": 11.5, "y": 1.125 },
+ { "label": "k1A", "matrix": [1, 10], "w": 1, "x": 12.5, "y": 1 },
+ { "label": "k1B", "matrix": [1, 11], "w": 1, "x": 13.5, "y": 1.125 },
+ { "label": "k1C", "matrix": [1, 12], "w": 1, "x": 14.5, "y": 1.375 },
+ { "label": "k1D", "matrix": [1, 13], "w": 1.5, "x": 15.5, "y": 1.375 },
+ { "label": "k28", "matrix": [2, 8], "w": 1, "x": 10.5, "y": 2.25 },
+ { "label": "k29", "matrix": [2, 9], "w": 1, "x": 11.5, "y": 2.125 },
+ { "label": "k2A", "matrix": [2, 10], "w": 1, "x": 12.5, "y": 2 },
+ { "label": "k2B", "matrix": [2, 11], "w": 1, "x": 13.5, "y": 2.125 },
+ { "label": "k2C", "matrix": [2, 12], "w": 1, "x": 14.5, "y": 2.375 },
+ { "label": "k2D", "matrix": [2, 13], "w": 1.5, "x": 15.5, "y": 2.375 },
+ { "label": "k37", "matrix": [3, 7], "w": 1, "x": 9.5, "y": 2.75, "h": 1.5 },
+ { "label": "k38", "matrix": [3, 8], "w": 1, "x": 10.5, "y": 3.25 },
+ { "label": "k39", "matrix": [3, 9], "w": 1, "x": 11.5, "y": 3.125 },
+ { "label": "k3A", "matrix": [3, 10], "w": 1, "x": 12.5, "y": 3 },
+ { "label": "k3B", "matrix": [3, 11], "w": 1, "x": 13.5, "y": 3.125 },
+ { "label": "k3C", "matrix": [3, 12], "w": 1, "x": 14.5, "y": 3.375 },
+ { "label": "k3D", "matrix": [3, 13], "w": 1.5, "x": 15.5, "y": 3.375 },
+ { "label": "k49", "matrix": [4, 9], "w": 1, "x": 11.5, "y": 4.125 },
+ { "label": "k4A", "matrix": [4, 10], "w": 1, "x": 12.5, "y": 4 },
+ { "label": "k4B", "matrix": [4, 11], "w": 1, "x": 13.5, "y": 4.125 },
+ { "label": "k4C", "matrix": [4, 12], "w": 1, "x": 14.5, "y": 4.375 },
+ { "label": "k4D", "matrix": [4, 13], "w": 1, "x": 15.5, "y": 4.375 },
+ { "label": "k57", "matrix": [5, 7], "w": 1, "x": 9, "y": 5 },
+ { "label": "k58", "matrix": [5, 8], "w": 1, "x": 10, "y": 5 },
+ { "label": "k59", "matrix": [5, 9], "w": 1, "x": 9, "y": 6 },
+ { "label": "k5C", "matrix": [5, 12], "w": 1, "x": 9, "y": 7 },
+ { "label": "k5B", "matrix": [5, 11], "w": 1, "x": 10, "y": 6, "h": 2 },
+ { "label": "k5A", "matrix": [5, 10], "w": 1, "x": 11, "y": 6, "h": 2 }
+ ]
+ },
+ "LAYOUT_ergodox_80": {
+ "layout": [
+ { "label": "k00", "matrix": [0, 0], "w": 1.5, "x": 0, "y": 0.375 },
+ { "label": "k01", "matrix": [0, 1], "w": 1, "x": 1.5, "y": 0.375 },
+ { "label": "k02", "matrix": [0, 2], "w": 1, "x": 2.5, "y": 0.125 },
+ { "label": "k03", "matrix": [0, 3], "w": 1, "x": 3.5, "y": 0 },
+ { "label": "k04", "matrix": [0, 4], "w": 1, "x": 4.5, "y": 0.125 },
+ { "label": "k05", "matrix": [0, 5], "w": 1, "x": 5.5, "y": 0.25 },
+ { "label": "k06", "matrix": [0, 6], "w": 1, "x": 6.5, "y": 0.25 },
+ { "label": "k10", "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1.375 },
+ { "label": "k11", "matrix": [1, 1], "w": 1, "x": 1.5, "y": 1.375 },
+ { "label": "k12", "matrix": [1, 2], "w": 1, "x": 2.5, "y": 1.125 },
+ { "label": "k13", "matrix": [1, 3], "w": 1, "x": 3.5, "y": 1 },
+ { "label": "k14", "matrix": [1, 4], "w": 1, "x": 4.5, "y": 1.125 },
+ { "label": "k15", "matrix": [1, 5], "w": 1, "x": 5.5, "y": 1.25 },
+ { "label": "k16", "matrix": [1, 6], "w": 1, "x": 6.5, "y": 1.25, "h": 1.5 },
+ { "label": "k20", "matrix": [2, 0], "w": 1.5, "x": 0, "y": 2.375 },
+ { "label": "k21", "matrix": [2, 1], "w": 1, "x": 1.5, "y": 2.375 },
+ { "label": "k22", "matrix": [2, 2], "w": 1, "x": 2.5, "y": 2.125 },
+ { "label": "k23", "matrix": [2, 3], "w": 1, "x": 3.5, "y": 2 },
+ { "label": "k24", "matrix": [2, 4], "w": 1, "x": 4.5, "y": 2.125 },
+ { "label": "k25", "matrix": [2, 5], "w": 1, "x": 5.5, "y": 2.25 },
+ { "label": "k30", "matrix": [3, 0], "w": 1.5, "x": 0, "y": 3.375 },
+ { "label": "k31", "matrix": [3, 1], "w": 1, "x": 1.5, "y": 3.375 },
+ { "label": "k32", "matrix": [3, 2], "w": 1, "x": 2.5, "y": 3.125 },
+ { "label": "k33", "matrix": [3, 3], "w": 1, "x": 3.5, "y": 3 },
+ { "label": "k34", "matrix": [3, 4], "w": 1, "x": 4.5, "y": 3.125 },
+ { "label": "k35", "matrix": [3, 5], "w": 1, "x": 5.5, "y": 3.25 },
+ { "label": "k36", "matrix": [3, 6], "w": 1, "x": 6.5, "y": 2.75, "h": 1.5 },
+ { "label": "k40", "matrix": [4, 0], "w": 1, "x": 0.5, "y": 4.375 },
+ { "label": "k41", "matrix": [4, 1], "w": 1, "x": 1.5, "y": 4.375 },
+ { "label": "k42", "matrix": [4, 2], "w": 1, "x": 2.5, "y": 4.125 },
+ { "label": "k43", "matrix": [4, 3], "w": 1, "x": 3.5, "y": 4 },
+ { "label": "k44", "matrix": [4, 4], "w": 1, "x": 4.5, "y": 4.125 },
+ { "label": "k55", "matrix": [5, 5], "w": 1, "x": 6, "y": 5 },
+ { "label": "k56", "matrix": [5, 6], "w": 1, "x": 7, "y": 5 },
+ { "label": "k45", "matrix": [4, 5], "w": 1, "x": 5, "y": 6 },
+ { "label": "k46", "matrix": [4, 6], "w": 1, "x": 6, "y": 6 },
+ { "label": "k54", "matrix": [5, 4], "w": 1, "x": 7, "y": 6 },
+ { "label": "k53", "matrix": [5, 3], "w": 1, "x": 5, "y": 7 },
+ { "label": "k52", "matrix": [5, 2], "w": 1, "x": 6, "y": 7 },
+ { "label": "k51", "matrix": [5, 1], "w": 1, "x": 7, "y": 7 },
+ { "label": "k07", "matrix": [0, 7], "w": 1, "x": 9.5, "y": 0.25 },
+ { "label": "k08", "matrix": [0, 8], "w": 1, "x": 10.5, "y": 0.25 },
+ { "label": "k09", "matrix": [0, 9], "w": 1, "x": 11.5, "y": 0.125 },
+ { "label": "k0A", "matrix": [0, 10], "w": 1, "x": 12.5, "y": 0 },
+ { "label": "k0B", "matrix": [0, 11], "w": 1, "x": 13.5, "y": 0.125 },
+ { "label": "k0C", "matrix": [0, 12], "w": 1, "x": 14.5, "y": 0.375 },
+ { "label": "k0D", "matrix": [0, 13], "w": 1.5, "x": 15.5, "y": 0.375 },
+ { "label": "k17", "matrix": [1, 7], "w": 1, "x": 9.5, "y": 1.25, "h": 1.5 },
+ { "label": "k18", "matrix": [1, 8], "w": 1, "x": 10.5, "y": 1.25 },
+ { "label": "k19", "matrix": [1, 9], "w": 1, "x": 11.5, "y": 1.125 },
+ { "label": "k1A", "matrix": [1, 10], "w": 1, "x": 12.5, "y": 1 },
+ { "label": "k1B", "matrix": [1, 11], "w": 1, "x": 13.5, "y": 1.125 },
+ { "label": "k1C", "matrix": [1, 12], "w": 1, "x": 14.5, "y": 1.375 },
+ { "label": "k1D", "matrix": [1, 13], "w": 1.5, "x": 15.5, "y": 1.375 },
+ { "label": "k28", "matrix": [2, 8], "w": 1, "x": 10.5, "y": 2.25 },
+ { "label": "k29", "matrix": [2, 9], "w": 1, "x": 11.5, "y": 2.125 },
+ { "label": "k2A", "matrix": [2, 10], "w": 1, "x": 12.5, "y": 2 },
+ { "label": "k2B", "matrix": [2, 11], "w": 1, "x": 13.5, "y": 2.125 },
+ { "label": "k2C", "matrix": [2, 12], "w": 1, "x": 14.5, "y": 2.375 },
+ { "label": "k2D", "matrix": [2, 13], "w": 1.5, "x": 15.5, "y": 2.375 },
+ { "label": "k37", "matrix": [3, 7], "w": 1, "x": 9.5, "y": 2.75, "h": 1.5 },
+ { "label": "k38", "matrix": [3, 8], "w": 1, "x": 10.5, "y": 3.25 },
+ { "label": "k39", "matrix": [3, 9], "w": 1, "x": 11.5, "y": 3.125 },
+ { "label": "k3A", "matrix": [3, 10], "w": 1, "x": 12.5, "y": 3 },
+ { "label": "k3B", "matrix": [3, 11], "w": 1, "x": 13.5, "y": 3.125 },
+ { "label": "k3C", "matrix": [3, 12], "w": 1, "x": 14.5, "y": 3.375 },
+ { "label": "k3D", "matrix": [3, 13], "w": 1.5, "x": 15.5, "y": 3.375 },
+ { "label": "k49", "matrix": [4, 9], "w": 1, "x": 11.5, "y": 4.125 },
+ { "label": "k4A", "matrix": [4, 10], "w": 1, "x": 12.5, "y": 4 },
+ { "label": "k4B", "matrix": [4, 11], "w": 1, "x": 13.5, "y": 4.125 },
+ { "label": "k4C", "matrix": [4, 12], "w": 1, "x": 14.5, "y": 4.375 },
+ { "label": "k4D", "matrix": [4, 13], "w": 1, "x": 15.5, "y": 4.375 },
+ { "label": "k57", "matrix": [5, 7], "w": 1, "x": 9, "y": 5 },
+ { "label": "k58", "matrix": [5, 8], "w": 1, "x": 10, "y": 5 },
+ { "label": "k59", "matrix": [5, 9], "w": 1, "x": 9, "y": 6 },
+ { "label": "k47", "matrix": [4, 7], "w": 1, "x": 10, "y": 6 },
+ { "label": "k48", "matrix": [4, 8], "w": 1, "x": 11, "y": 6 },
+ { "label": "k5C", "matrix": [5, 12], "w": 1, "x": 9, "y": 7 },
+ { "label": "k5B", "matrix": [5, 11], "w": 1, "x": 10, "y": 7 },
+ { "label": "k5A", "matrix": [5, 10], "w": 1, "x": 11, "y": 7 }
]
},
"LAYOUT_ergodox_pretty": {
"layout": [
- {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25},
- {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5},
-
- {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5},
- {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5},
-
- {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25},
- {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5},
-
- {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5},
- {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5},
-
- {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125},
- {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375},
-
- {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5},
- {"x":7, "y":6}, {"x":9, "y":6},
- {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}
+ { "label": "L00", "matrix": [0, 0], "w": 1.5, "x": 0, "y": 0.375 },
+ { "label": "L01", "matrix": [0, 1]