aboutsummaryrefslogtreecommitdiff
path: root/keyboards/zsa
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/zsa')
-rw-r--r--keyboards/zsa/moonlander/config.h45
-rw-r--r--keyboards/zsa/moonlander/keyboard.json84
-rw-r--r--keyboards/zsa/moonlander/keymaps/via/keymap.c126
-rw-r--r--keyboards/zsa/moonlander/keymaps/via/readme.md7
-rw-r--r--keyboards/zsa/moonlander/keymaps/via/rules.mk1
-rw-r--r--keyboards/zsa/moonlander/ld/STM32F303xB.ld85
-rw-r--r--keyboards/zsa/moonlander/matrix.c222
-rw-r--r--keyboards/zsa/moonlander/mcuconf.h8
-rw-r--r--keyboards/zsa/moonlander/moonlander.c240
-rw-r--r--keyboards/zsa/moonlander/rules.mk6
-rw-r--r--keyboards/zsa/planck_ez/base/keyboard.json6
-rw-r--r--keyboards/zsa/planck_ez/config.h26
-rw-r--r--keyboards/zsa/planck_ez/glow/glow.c75
-rw-r--r--keyboards/zsa/planck_ez/glow/keyboard.json109
-rw-r--r--keyboards/zsa/planck_ez/halconf.h23
-rw-r--r--keyboards/zsa/planck_ez/info.json157
-rw-r--r--keyboards/zsa/planck_ez/keymaps/default/keymap.json17
-rw-r--r--keyboards/zsa/planck_ez/mcuconf.h37
-rw-r--r--keyboards/zsa/planck_ez/planck_ez.c286
-rw-r--r--keyboards/zsa/planck_ez/planck_ez.h47
-rw-r--r--keyboards/zsa/planck_ez/readme.md64
-rw-r--r--keyboards/zsa/planck_ez/rules.mk4
-rw-r--r--keyboards/zsa/voyager/voyager.c12
23 files changed, 1228 insertions, 459 deletions
diff --git a/keyboards/zsa/moonlander/config.h b/keyboards/zsa/moonlander/config.h
index 08870fba9d..b846d89f45 100644
--- a/keyboards/zsa/moonlander/config.h
+++ b/keyboards/zsa/moonlander/config.h
@@ -18,60 +18,15 @@
#pragma once
-
-#define WEBUSB_LANDING_PAGE_URL u8"configure.ergodox-ez.com"
-
/* key matrix size */
#define MATRIX_ROWS 12
#define MATRIX_COLS 7
-/* PCB default pin-out */
-// #define MATRIX_ROW_PINS { B10, B11, B12, B13, B14, B15 }
-// #define MATRIX_COL_PINS { A0, A1, A2, A3, A6, A7, B0 }
-
-// #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 }
-// #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 }
-
-// #define MCP23_LED_R GPB7
-// #define MCP23_LED_G GPB6
-// #define MCP23_LED_B GPA7
-
#define EEPROM_I2C_24LC128
-// Not needed, is default address:
-// #define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
-/*
- * 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 IS31FL3731_I2C_ADDRESS_1 IS31FL3731_I2C_ADDRESS_GND
#define IS31FL3731_I2C_ADDRESS_2 IS31FL3731_I2C_ADDRESS_VCC
-#define MOUSEKEY_INTERVAL 20
-#define MOUSEKEY_DELAY 0
-#define MOUSEKEY_TIME_TO_MAX 60
-#define MOUSEKEY_MAX_SPEED 7
-#define MOUSEKEY_WHEEL_DELAY 400
-#define MOUSEKEY_WHEEL_INTERVAL MOUSEKEY_INTERVAL
-#define MOUSEKEY_WHEEL_MAX_SPEED MOUSEKEY_MAX_SPEED
-#define MOUSEKEY_WHEEL_TIME_TO_MAX MOUSEKEY_TIME_TO_MAX
-
#define MUSIC_MAP
#define FIRMWARE_VERSION_SIZE 17
diff --git a/keyboards/zsa/moonlander/keyboard.json b/keyboards/zsa/moonlander/keyboard.json
index 571674fe1c..2ef6657e91 100644
--- a/keyboards/zsa/moonlander/keyboard.json
+++ b/keyboards/zsa/moonlander/keyboard.json
@@ -16,6 +16,7 @@
"bootmagic": true,
"command": true,
"console": true,
+ "deferred_exec": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
@@ -37,6 +38,13 @@
"eeprom": {
"driver": "i2c"
},
+ "mousekey": {
+ "delay": 0,
+ "interval": 20,
+ "max_speed": 7,
+ "time_to_max": 60,
+ "wheel_delay": 400
+ },
"rgb_matrix": {
"animations": {
"alphas_mods": true,
@@ -85,6 +93,82 @@
},
"center_point": [120, 36],
"driver": "is31fl3731",
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 4, "flags": 1},
+ {"matrix": [1, 0], "x": 0, "y": 20, "flags": 1},
+ {"matrix": [2, 0], "x": 0, "y": 36, "flags": 1},
+ {"matrix": [3, 0], "x": 0, "y": 52, "flags": 1},
+ {"matrix": [4, 0], "x": 0, "y": 68, "flags": 1},
+ {"matrix": [0, 1], "x": 16, "y": 3, "flags": 4},
+ {"matrix": [1, 1], "x": 16, "y": 19, "flags": 4},
+ {"matrix": [2, 1], "x": 16, "y": 35, "flags": 4},
+ {"matrix": [3, 1], "x": 16, "y": 51, "flags": 4},
+ {"matrix": [4, 1], "x": 16, "y": 67, "flags": 1},
+ {"matrix": [0, 2], "x": 32, "y": 1, "flags": 4},
+ {"matrix": [1, 2], "x": 32, "y": 17, "flags": 4},
+ {"matrix": [2, 2], "x": 32, "y": 33, "flags": 4},
+ {"matrix": [3, 2], "x": 32, "y": 49, "flags": 4},
+ {"matrix": [4, 2], "x": 32, "y": 65, "flags": 1},
+ {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4},
+ {"matrix": [1, 3], "x": 48, "y": 16, "flags": 4},
+ {"matrix": [2, 3], "x": 48, "y": 32, "flags": 4},
+ {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4},
+ {"matrix": [4, 3], "x": 48, "y": 64, "flags": 1},
+ {"matrix": [0, 4], "x": 64, "y": 1, "flags": 4},
+ {"matrix": [1, 4], "x": 64, "y": 17, "flags": 4},
+ {"matrix": [2, 4], "x": 64, "y": 33, "flags": 4},
+ {"matrix": [3, 4], "x": 64, "y": 49, "flags": 4},
+ {"matrix": [4, 4], "x": 64, "y": 65, "flags": 1},
+ {"matrix": [0, 5], "x": 80, "y": 3, "flags": 4},
+ {"matrix": [1, 5], "x": 80, "y": 19, "flags": 4},
+ {"matrix": [2, 5], "x": 80, "y": 35, "flags": 4},
+ {"matrix": [3, 5], "x": 80, "y": 51, "flags": 4},
+ {"matrix": [0, 6], "x": 96, "y": 4, "flags": 1},
+ {"matrix": [1, 6], "x": 96, "y": 20, "flags": 1},
+ {"matrix": [2, 6], "x": 96, "y": 36, "flags": 1},
+ {"matrix": [5, 0], "x": 88, "y": 69, "flags": 1},
+ {"matrix": [5, 1], "x": 100, "y": 80, "flags": 1},
+ {"matrix": [5, 2], "x": 112, "y": 91, "flags": 1},
+ {"matrix": [5, 3], "x": 108, "y": 69, "flags": 1},
+ {"matrix": [6, 6], "x": 240, "y": 4, "flags": 1},
+ {"matrix": [7, 6], "x": 240, "y": 20, "flags": 1},
+ {"matrix": [8, 6], "x": 240, "y": 36, "flags": 1},
+ {"matrix": [9, 6], "x": 240, "y": 52, "flags": 1},
+ {"matrix": [10, 6], "x": 240, "y": 68, "flags": 1},
+ {"matrix": [6, 5], "x": 224, "y": 3, "flags": 4},
+ {"matrix": [7, 5], "x": 224, "y": 19, "flags": 4},
+ {"matrix": [8, 5], "x": 224, "y": 35, "flags": 4},
+ {"matrix": [9, 5], "x": 224, "y": 51, "flags": 4},
+ {"matrix": [10, 5], "x": 224, "y": 67, "flags": 1},
+ {"matrix": [6, 4], "x": 208, "y": 1, "flags": 4},
+ {"matrix": [7, 4], "x": 208, "y": 17, "flags": 4},
+ {"matrix": [8, 4], "x": 208, "y": 33, "flags": 4},
+ {"matrix": [9, 4], "x": 208, "y": 49, "flags": 4},
+ {"matrix": [10, 4], "x": 208, "y": 65, "flags": 1},
+ {"matrix": [6, 3], "x": 192, "y": 0, "flags": 4},
+ {"matrix": [7, 3], "x": 192, "y": 16, "flags": 4},
+ {"matrix": [8, 3], "x": 192, "y": 32, "flags": 4},
+ {"matrix": [9, 3], "x": 192, "y": 48, "flags": 4},
+ {"matrix": [10, 3], "x": 192, "y": 64, "flags": 1},
+ {"matrix": [6, 2], "x": 176, "y": 1, "flags": 4},
+ {"matrix": [7, 2], "x": 176, "y": 17, "flags": 4},
+ {"matrix": [8, 2], "x": 176, "y": 33, "flags": 4},
+ {"matrix": [9, 2], "x": 176, "y": 49, "flags": 4},
+ {"matrix": [10, 2], "x": 176, "y": 65, "flags": 1},
+ {"matrix": [6, 1], "x": 160, "y": 3, "flags": 4},
+ {"matrix": [7, 1], "x": 160, "y": 19, "flags": 4},
+ {"matrix": [8, 1], "x": 160, "y": 35, "flags": 4},
+ {"matrix": [9, 1], "x": 160, "y": 51, "flags": 4},
+ {"matrix": [6, 0], "x": 144, "y": 4, "flags": 1},
+ {"matrix": [7, 0], "x": 144, "y": 20, "flags": 1},
+ {"matrix": [8, 0], "x": 144, "y": 36, "flags": 1},
+ {"matrix": [11, 6], "x": 152, "y": 69, "flags": 1},
+ {"matrix": [11, 5], "x": 140, "y": 80, "flags": 1},
+ {"matrix": [11, 4], "x": 128, "y": 91, "flags": 1},
+ {"matrix": [11, 3], "x": 132, "y": 69, "flags": 1}
+ ],
+ "led_flush_limit": 26,
+ "led_process_limit": 5,
"max_brightness": 175,
"sleep": true
},
diff --git a/keyboards/zsa/moonlander/keymaps/via/keymap.c b/keyboards/zsa/moonlander/keymaps/via/keymap.c
deleted file mode 100644
index 4b1e4c83e7..0000000000
--- a/keyboards/zsa/moonlander/keymaps/via/keymap.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Copyright 2020 ZSA Technology Labs, Inc <@zsa>
- * Copyright 2020 Jack Humbert <jack.humb@gmail.com>
- * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-
-#include QMK_KEYBOARD_H
-#include "version.h"
-
-enum layers {
- BASE, // default layer
- SYMB, // symbols
- MDIA, // media keys
-};
-
-// clang-format off
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [BASE] = LAYOUT(
- KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
- KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
- KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HYPR, KC_MEH, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), LGUI_T(KC_QUOT),
- KC_LSFT, LCTL_T(KC_Z),KC_X,KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), KC_RSFT,
- LT(SYMB,KC_GRV),WEBUSB_PAIR,A(KC_LSFT),KC_LEFT, KC_RGHT, LALT_T(KC_APP), RCTL_T(KC_ESC), KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, MO(SYMB),
- KC_SPC, KC_BSPC, KC_LGUI, KC_LALT, KC_TAB, KC_ENT
- ),
-
- [SYMB] = LAYOUT(
- QK_KB_0, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
- _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
- _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, _______, _______, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______,
- _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______,
- _______, _______, _______, _______, _______, RGB_VAI, RGB_TOG, _______, KC_DOT, KC_0, KC_EQL, _______,
- RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______
- ),
-
- [MDIA] = LAYOUT(
- QK_KB_1, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT,
- _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, EE_CLR,
- _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY,
- _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______,
- _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______,
- _______, _______, _______, _______, _______, _______
- ),
- [3] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______
- ),
- [4] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______
- ),
- [5] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______
- ),
- [6] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______
- ),
- [7] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______
- ),
-};
-// clang-format on
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case QK_KB_0:
- if (record->event.pressed) {
- SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
- }
- return false;
- case QK_KB_1:
- if (record->event.pressed) {
- keyboard_config.led_level ^= 1;
- eeconfig_update_kb(keyboard_config.raw);
- if (keyboard_config.led_level) {
- layer_state_set_kb(layer_state);
- } else {
- ML_LED_1(false);
- ML_LED_2(false);
- ML_LED_3(false);
- ML_LED_4(false);
- ML_LED_5(false);
- ML_LED_6(false);
- }
- }
- break;
- }
- return true;
-}
diff --git a/keyboards/zsa/moonlander/keymaps/via/readme.md b/keyboards/zsa/moonlander/keymaps/via/readme.md
deleted file mode 100644
index 8bede7bee3..0000000000
--- a/keyboards/zsa/moonlander/keymaps/via/readme.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# VIA Keymap for the Moonlander
-
-This is based on the default layout for the Moonlander keyboard from ZSA Techonology Labs.
-
-ZSA does not provide any support for VIA (the app or firmware feature). Any and all issues should be directed to [VIA](https://github.com/the-via).
-
-Initial flash and reflash may make the keyboard look like it has locked up. This is because it can take a while to load the EEPROM data (the keymap), and is halted by that process until it's finished.
diff --git a/keyboards/zsa/moonlander/keymaps/via/rules.mk b/keyboards/zsa/moonlander/keymaps/via/rules.mk
deleted file mode 100644
index 1e5b99807c..0000000000
--- a/keyboards/zsa/moonlander/keymaps/via/rules.mk
+++ /dev/null
@@ -1 +0,0 @@
-VIA_ENABLE = yes
diff --git a/keyboards/zsa/moonlander/ld/STM32F303xB.ld b/keyboards/zsa/moonlander/ld/STM32F303xB.ld
new file mode 100644
index 0000000000..c3a81461f9
--- /dev/null
+++ b/keyboards/zsa/moonlander/ld/STM32F303xB.ld
@@ -0,0 +1,85 @@
+/*
+ ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/*
+ * STM32F303xB memory setup.
+ */
+MEMORY
+{
+ flash0 (rx) : org = 0x08000000, len = 128k
+ flash1 (rx) : org = 0x00000000, len = 0
+ flash2 (rx) : org = 0x00000000, len = 0
+ flash3 (rx) : org = 0x00000000, len = 0
+ flash4 (rx) : org = 0x00000000, len = 0
+ flash5 (rx) : org = 0x00000000, len = 0
+ flash6 (rx) : org = 0x00000000, len = 0
+ flash7 (rx) : org = 0x00000000, len = 0
+ ram0 (wx) : org = 0x20000000, len = 32k
+ ram1 (wx) : org = 0x00000000, len = 0
+ ram2 (wx) : org = 0x00000000, len = 0
+ ram3 (wx) : org = 0x00000000, len = 0
+ ram4 (wx) : org = 0x10000000, len = 8k
+ ram5 (wx) : org = 0x00000000, len = 0
+ ram6 (wx) : org = 0x00000000, len = 0
+ ram7 (wx) : org = 0x00000000, len = 0
+}
+
+/* For each data/text section two region are defined, a virtual region
+ and a load region (_LMA suffix).*/
+
+/* Flash region to be used for exception vectors.*/
+REGION_ALIAS("VECTORS_FLASH", flash0);
+REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for constructors and destructors.*/
+REGION_ALIAS("XTORS_FLASH", flash0);
+REGION_ALIAS("XTORS_FLASH_LMA", flash0);
+
+/* Flash region to be used for code text.*/
+REGION_ALIAS("TEXT_FLASH", flash0);
+REGION_ALIAS("TEXT_FLASH_LMA", flash0);
+
+/* Flash region to be used for read only data.*/
+REGION_ALIAS("RODATA_FLASH", flash0);
+REGION_ALIAS("RODATA_FLASH_LMA", flash0);
+
+/* Flash region to be used for various.*/
+REGION_ALIAS("VARIOUS_FLASH", flash0);
+REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
+
+/* Flash region to be used for RAM(n) initialization data.*/
+REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
+
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts.*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+REGION_ALIAS("DATA_RAM_LMA", flash0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
+/* RAM region to be used for the default heap.*/
+REGION_ALIAS("HEAP_RAM", ram0);
+
+/* Generic rules inclusion.*/
+INCLUDE rules.ld
diff --git a/keyboards/zsa/moonlander/matrix.c b/keyboards/zsa/moonlander/matrix.c
index 2c9edd417c..867fa85a66 100644
--- a/keyboards/zsa/moonlander/matrix.c
+++ b/keyboards/zsa/moonlander/matrix.c
@@ -14,62 +14,39 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+ */
#include "moonlander.h"
-#include "i2c_master.h"
+#include "mcp23018.h"
+#pragma GCC push_options
+#pragma GCC optimize("-O3")
/*
#define MATRIX_ROW_PINS { B10, B11, B12, B13, B14, B15 } outputs
#define MATRIX_COL_PINS { A0, A1, A2, A3, A6, A7, B0 } inputs
+#define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } outputs
+#define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } inputs
+
*/
/* matrix state(1:on, 0:off) */
-extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
-extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
-static matrix_row_t raw_matrix_right[MATRIX_COLS];
+extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
+extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
+static matrix_row_t raw_matrix_right[MATRIX_ROWS];
-#define ROWS_PER_HAND (MATRIX_ROWS / 2)
-#ifndef MOONLANDER_I2C_TIMEOUT
-# define MOONLANDER_I2C_TIMEOUT 100
-#endif
+#define MCP_ROWS_PER_HAND (MATRIX_ROWS / 2)
extern bool mcp23018_leds[3];
extern bool is_launching;
-bool mcp23018_initd = false;
-static uint8_t mcp23018_reset_loop;
-
-uint8_t mcp23018_tx[3];
-uint8_t mcp23018_rx[1];
-
-void mcp23018_init(void) {
- i2c_init();
-
- // #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } outputs
- // #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } inputs
+static uint16_t mcp23018_reset_loop;
+uint8_t mcp23018_errors;
- mcp23018_tx[0] = 0x00; // IODIRA
- mcp23018_tx[1] = 0b00000000; // A is output
- mcp23018_tx[2] = 0b00111111; // B is inputs
-
- if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, MOONLANDER_I2C_TIMEOUT)) {
- dprintf("error hori\n");
- } else {
- mcp23018_tx[0] = 0x0C; // GPPUA
- mcp23018_tx[1] = 0b10000000; // A is not pulled-up
- mcp23018_tx[2] = 0b11111111; // B is pulled-up
-
- if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, MOONLANDER_I2C_TIMEOUT)) {
- dprintf("error hori\n");
- } else {
- mcp23018_initd = is_launching = true;
- }
- }
+bool io_expander_ready(void) {
+ uint8_t tx;
+ return mcp23018_read_pins(MCP23018_DEFAULT_ADDRESS, mcp23018_PORTA, &tx);
}
void matrix_init_custom(void) {
- dprintf("matrix init\n");
- // debug_matrix = true;
// outputs
gpio_set_pin_output(B10);
gpio_set_pin_output(B11);
@@ -87,115 +64,116 @@ void matrix_init_custom(void) {
gpio_set_pin_input_low(A7);
gpio_set_pin_input_low(B0);
- mcp23018_init();
+ mcp23018_init(MCP23018_DEFAULT_ADDRESS);
+ mcp23018_errors += !mcp23018_set_config(MCP23018_DEFAULT_ADDRESS, mcp23018_PORTA, 0b00000000);
+ mcp23018_errors += !mcp23018_set_config(MCP23018_DEFAULT_ADDRESS, mcp23018_PORTB, 0b00111111);
+
+ if (!mcp23018_errors) {
+ is_launching = true;
+ }
}
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
bool changed = false;
-
- // Try to re-init right side
- if (!mcp23018_initd) {
- if (++mcp23018_reset_loop == 0) {
- // if (++mcp23018_reset_loop >= 1300) {
- // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
- // this will be approx bit more frequent than once per second
- print("trying to reset mcp23018\n");
- mcp23018_init();
- if (!mcp23018_initd) {
- print("right side not responding\n");
- } else {
- print("right side attached\n");
-#ifdef RGB_MATRIX_ENABLE
- rgb_matrix_init();
-#endif
+ // Attempt to reset the mcp23018 if it's not initialized
+ if (mcp23018_errors) {
+ if (++mcp23018_reset_loop > 0x1FFF) {
+ if (io_expander_ready()) {
+ // If we managed to initialize the mcp23018 - we need to reinitialize the matrix / layer state. During an electric discharge the i2c peripherals might be in a weird state. Giving a delay and resetting the MCU allows to recover from this.
+ wait_ms(200);
+ mcu_reset();
}
}
}
matrix_row_t data = 0;
// actual matrix
- for (uint8_t row = 0; row <= ROWS_PER_HAND; row++) {
+ for (uint8_t row = 0; row <= MCP_ROWS_PER_HAND; row++) {
// strobe row
switch (row) {
- case 0: gpio_write_pin_high(B10); break;
- case 1: gpio_write_pin_high(B11); break;
- case 2: gpio_write_pin_high(B12); break;
- case 3: gpio_write_pin_high(B13); break;
- case 4: gpio_write_pin_high(B14); break;
- case 5: gpio_write_pin_high(B15); break;
- case 6: break; // Left hand has 6 rows
+ case 0:
+ gpio_write_pin_high(B10);
+ break;
+ case 1:
+ gpio_write_pin_high(B11);
+ break;
+ case 2:
+ gpio_write_pin_high(B12);
+ break;
+ case 3:
+ gpio_write_pin_high(B13);
+ break;
+ case 4:
+ gpio_write_pin_high(B14);
+ break;
+ case 5:
+ gpio_write_pin_high(B15);
+ break;
+ case 6:
+ break; // Left hand has 6 rows
}
- // right side
- if (mcp23018_initd) {
- // #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } outputs
- // #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } inputs
-
+ // Selecting the row on the right side of the keyboard.
+ if (!mcp23018_errors) {
// select row
- mcp23018_tx[0] = 0x12; // GPIOA
- mcp23018_tx[1] = (0b01111111 & ~(1 << (row))) | ((uint8_t)!mcp23018_leds[2] << 7); // activate row
- mcp23018_tx[2] = ((uint8_t)!mcp23018_leds[1] << 6) | ((uint8_t)!mcp23018_leds[0] << 7); // activate row
-
- if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, MOONLANDER_I2C_TIMEOUT)) {
- dprintf("error hori\n");
- mcp23018_initd = false;
- }
-
- // read col
-
- mcp23018_tx[0] = 0x13; // GPIOB
- if (MSG_OK != i2c_read_register(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx[0], &mcp23018_rx[0], 1, MOONLANDER_I2C_TIMEOUT)) {
- dprintf("error vert\n");
- mcp23018_initd = false;
- }
-
- data = ~(mcp23018_rx[0] & 0b00111111);
- // data = 0x01;
- } else {
- data = 0;
- }
-
- if (raw_matrix_right[row] != data) {
- raw_matrix_right[row] = data;
- changed = true;
+ mcp23018_errors += !mcp23018_set_output_all(MCP23018_DEFAULT_ADDRESS, (0b01111111 & ~(1 << (row))) | ((uint8_t)!mcp23018_leds[2] << 7), ((uint8_t)!mcp23018_leds[1] << 6) | ((uint8_t)!mcp23018_leds[0] << 7));
}
-
- // left side
- if (row < ROWS_PER_HAND) {
+ // Reading the left side of the keyboard.
+ if (row < MCP_ROWS_PER_HAND) {
// i2c comm incur enough wait time
- if (!mcp23018_initd) {
+ if (mcp23018_errors) {
// need wait to settle pin state
matrix_io_delay();
}
// read col data
- data = (
- (gpio_read_pin(A0) << 0 ) |
- (gpio_read_pin(A1) << 1 ) |
- (gpio_read_pin(A2) << 2 ) |
- (gpio_read_pin(A3) << 3 ) |
- (gpio_read_pin(A6) << 4 ) |
- (gpio_read_pin(A7) << 5 ) |
- (gpio_read_pin(B0) << 6 )
- );
+ data = ((readPin(A0) << 0) | (readPin(A1) << 1) | (readPin(A2) << 2) | (readPin(A3) << 3) | (readPin(A6) << 4) | (readPin(A7) << 5) | (readPin(B0) << 6));
// unstrobe row
switch (row) {
- case 0: gpio_write_pin_low(B10); break;
- case 1: gpio_write_pin_low(B11); break;
- case 2: gpio_write_pin_low(B12); break;
- case 3: gpio_write_pin_low(B13); break;
- case 4: gpio_write_pin_low(B14); break;
- case 5: gpio_write_pin_low(B15); break;
- case 6: break;
+ case 0:
+ gpio_write_pin_low(B10);
+ break;
+ case 1:
+ gpio_write_pin_low(B11);
+ break;
+ case 2:
+ gpio_write_pin_low(B12);
+ break;
+ case 3:
+ gpio_write_pin_low(B13);
+ break;
+ case 4:
+ gpio_write_pin_low(B14);
+ break;
+ case 5:
+ gpio_write_pin_low(B15);
+ break;
+ case 6:
+ break;
}
if (current_matrix[row] != data) {
- current_matrix[row] = data;
- changed = true;
+ current_matrix[row] = data;
+ changed = true;
}
}
+
+ // Reading the right side of the keyboard.
+ if (!mcp23018_errors) {
+ uint8_t rx;
+ mcp23018_errors += !mcp23018_read_pins(MCP23018_DEFAULT_ADDRESS, mcp23018_PORTB, &rx);
+ data = ~(rx & 0b00111111);
+ } else {
+ data = 0;
+ }
+
+ if (raw_matrix_right[row] != data) {
+ raw_matrix_right[row] = data;
+ changed = true;
+ }
}
- for (uint8_t row = 0; row < ROWS_PER_HAND; row++) {
+
+ for (uint8_t row = 0; row < MCP_ROWS_PER_HAND; row++) {
current_matrix[11 - row] = 0;
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
current_matrix[11 - row] |= ((raw_matrix_right[6 - col] & (1 << row) ? 1 : 0) << col);
@@ -222,12 +200,12 @@ void matrix_power_up(void) {
}
// initialize matrix state: all keys off
- for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;
}
-
}
bool is_transport_connected(void) {
- return mcp23018_initd;
-} \ No newline at end of file
+ return (bool)(mcp23018_errors == 0);
+}
+#pragma GCC pop_options
diff --git a/keyboards/zsa/moonlander/mcuconf.h b/keyboards/zsa/moonlander/mcuconf.h
index 032c853f4e..43d777453b 100644
--- a/keyboards/zsa/moonlander/mcuconf.h
+++ b/keyboards/zsa/moonlander/mcuconf.h
@@ -22,10 +22,6 @@
#undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE
-// for future hardwar
-#undef STM32_I2C_USE_I2C2
-#define STM32_I2C_USE_I2C2 TRUE
-
// for audio
#undef STM32_DAC_USE_DAC1_CH1
#define STM32_DAC_USE_DAC1_CH1 TRUE
@@ -33,7 +29,3 @@
#define STM32_DAC_USE_DAC1_CH2 TRUE
#undef STM32_GPT_USE_TIM6
#define STM32_GPT_USE_TIM6 TRUE
-#undef STM32_GPT_USE_TIM7
-#define STM32_GPT_USE_TIM7 TRUE
-#undef STM32_GPT_USE_TIM8
-#define STM32_GPT_USE_TIM8 TRUE
diff --git a/keyboards/zsa/moonlander/moonlander.c b/keyboards/zsa/moonlander/moonlander.c
index 02c64f4b96..14405fc412 100644
--- a/keyboards/zsa/moonlander/moonlander.c
+++ b/keyboards/zsa/moonlander/moonlander.c
@@ -23,76 +23,95 @@ keyboard_config_t keyboard_config;
bool mcp23018_leds[3] = {0, 0, 0};
bool is_launching = false;
-#ifdef DYNAMIC_MACRO_ENABLE
-static bool is_dynamic_recording = false;
-
-void dynamic_macro_record_start_user(int8_t direction) { is_dynamic_recording = true; }
-
-void dynamic_macro_record_end_user(int8_t direction) {
- is_dynamic_recording = false;
- ML_LED_3(false);
+#if defined(DEFERRED_EXEC_ENABLE)
+# if defined(DYNAMIC_MACRO_ENABLE)
+deferred_token dynamic_macro_token = INVALID_DEFERRED_TOKEN;
+
+static uint32_t dynamic_macro_led(uint32_t trigger_time, void *cb_arg) {
+ static bool led_state = true;
+ if (!is_launching) {
+ led_state = !led_state;
+ ML_LED_3(led_state);
+ }
+ return 100;
}
-#endif
-void moonlander_led_task(void) {
- if (is_launching) {
- ML_LED_1(false);
- ML_LED_2(false);
- ML_LED_3(false);
- ML_LED_4(false);
- ML_LED_5(false);
- ML_LED_6(false);
-
- ML_LED_1(true);
- wait_ms(250);
- ML_LED_2(true);
- wait_ms(250);
- ML_LED_3(true);
- wait_ms(250);
- ML_LED_4(true);
- wait_ms(250);
- ML_LED_5(true);
- wait_ms(250);
- ML_LED_6(true);
- wait_ms(250);
- ML_LED_1(false);
- wait_ms(250);
- ML_LED_2(false);
- wait_ms(250);
- ML_LED_3(false);
- wait_ms(250);
- ML_LED_4(false);
- wait_ms(250);
- ML_LED_5(false);
- wait_ms(250);
- ML_LED_6(false);
- wait_ms(250);
- is_launching = false;
- layer_state_set_kb(layer_state);
+bool dynamic_macro_record_start_kb(int8_t direction) {
+ if (!dynamic_macro_record_start_user(direction)) {
+ return false;
}
-#ifdef DYNAMIC_MACRO_ENABLE
- else if (is_dynamic_recording) {
+ if (dynamic_macro_token == INVALID_DEFERRED_TOKEN) {
ML_LED_3(true);
- wait_ms(100);
- ML_LED_3(false);
- wait_ms(155);
- }
-#endif
-#if !defined(MOONLANDER_USER_LEDS)
- else {
- layer_state_set_kb(layer_state);
+ dynamic_macro_token = defer_exec(100, dynamic_macro_led, NULL);
}
-#endif
+ return true;
}
-static THD_WORKING_AREA(waLEDThread, 128);
-static THD_FUNCTION(LEDThread, arg) {
- (void)arg;
- chRegSetThreadName("LEDThread");
- while (true) {
- moonlander_led_task();
+bool dynamic_macro_record_end_kb(int8_t direction) {
+ if (!dynamic_macro_record_end_user(direction)) {
+ return false;
}
+ if (cancel_deferred_exec(dynamic_macro_token)) {
+ dynamic_macro_token = INVALID_DEFERRED_TOKEN;
+ ML_LED_3(false);
+ }
+ return false;
}
+# endif
+
+static uint32_t startup_exec(uint32_t trigger_time, void *cb_arg) {
+ static uint8_t startup_loop = 0;
+
+ switch (startup_loop++) {
+ case 0:
+ ML_LED_1(true);
+ ML_LED_2(false);
+ ML_LED_3(false);
+ ML_LED_4(false);
+ ML_LED_5(false);
+ ML_LED_6(false);
+ break;
+ case 1:
+ ML_LED_2(true);
+ break;
+ case 2:
+ ML_LED_3(true);
+ break;
+ case 3:
+ ML_LED_4(true);
+ break;
+ case 4:
+ ML_LED_5(true);
+ break;
+ case 5:
+ ML_LED_6(true);
+ break;
+ case 6:
+ ML_LED_1(false);
+ break;
+ case 7:
+ ML_LED_2(false);
+ break;
+ case 8:
+ ML_LED_3(false);
+ break;
+ case 9:
+ ML_LED_4(false);
+ break;
+ case 10:
+ ML_LED_5(false);
+ break;
+ case 11:
+ ML_LED_6(false);
+ break;
+ case 12:
+ is_launching = false;
+ layer_state_set_kb(layer_state);
+ return 0;
+ }
+ return 250;
+}
+#endif
void keyboard_pre_init_kb(void) {
gpio_set_pin_output(B5);
@@ -103,13 +122,6 @@ void keyboard_pre_init_kb(void) {
gpio_write_pin_low(B4);
gpio_write_pin_low(B3);
- chThdCreateStatic(waLEDThread, sizeof(waLEDThread), NORMALPRIO - 16, LEDThread, NULL);
-
- /* the array is initialized to 0, no need to re-set it here */
- // mcp23018_leds[0] = 0; // blue
- // mcp23018_leds[1] = 0; // green
- // mcp23018_leds[2] = 0; // red
-
keyboard_pre_init_user();
}
@@ -173,13 +185,7 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
#ifdef RGB_MATRIX_ENABLE
// clang-format off
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
-/* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, C3_2, C1_1, C4_2}, // 1
+ {0, C3_2, C1_1, C4_2},
{0, C2_2, C1_2, C4_3},
{0, C2_3, C1_3, C3_3},
{0, C2_4, C1_4, C3_4},
@@ -189,7 +195,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
{0, C2_8, C1_8, C3_8},
{0, C3_1, C2_1, C4_1},
- {0, C7_8, C6_8, C8_8}, // 10
+ {0, C7_8, C6_8, C8_8},
{0, C7_7, C6_7, C9_8},
{0, C8_7, C6_6, C9_7},
{0, C8_6, C7_6, C9_6},
@@ -199,7 +205,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
{0, C8_2, C7_2, C9_2},
{0, C8_1, C7_1, C9_1},
- {0, C3_10, C1_9, C4_10}, // 19
+ {0, C3_10, C1_9, C4_10},
{0, C2_10, C1_10, C4_11},
{0, C2_11, C1_11, C3_11},
{0, C2_12, C1_12, C3_12},
@@ -209,7 +215,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
{0, C2_16, C1_16, C3_16},
{0, C3_9, C2_9, C4_9},
- {0, C7_16, C6_16, C8_16}, // 28
+ {0, C7_16, C6_16, C8_16},
{0, C7_15, C6_15, C9_16},
{0, C8_15, C6_14, C9_15},
{0, C8_10, C7_10, C9_10},
@@ -219,7 +225,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
{0, C8_13, C7_13, C9_13},
{0, C8_14, C7_14, C9_14},
- {1, C3_2, C1_1, C4_2}, // 1
+ {1, C3_2, C1_1, C4_2},
{1, C2_2, C1_2, C4_3},
{1, C2_3, C1_3, C3_3},
{1, C2_4, C1_4, C3_4},
@@ -229,7 +235,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
{1, C2_8, C1_8, C3_8},
{1, C3_1, C2_1, C4_1},
- {1, C7_8, C6_8, C8_8}, // 10
+ {1, C7_8, C6_8, C8_8},
{1, C7_7, C6_7, C9_8},
{1, C8_7, C6_6, C9_7},
{1, C8_6, C7_6, C9_6},
@@ -239,7 +245,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
{1, C8_2, C7_2, C9_2},
{1, C8_1, C7_1, C9_1},
- {1, C3_10, C1_9, C4_10}, // 19
+ {1, C3_10, C1_9, C4_10},
{1, C2_10, C1_10, C4_11},
{1, C2_11, C1_11, C3_11},
{1, C2_12, C1_12, C3_12},
@@ -249,7 +255,7 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
{1, C2_16, C1_16, C3_16},
{1, C3_9, C2_9, C4_9},
- {1, C7_16, C6_16, C8_16}, // 28
+ {1, C7_16, C6_16, C8_16},
{1, C7_15, C6_15, C9_16},
{1, C8_15, C6_14, C9_15},
{1, C8_10, C7_10, C9_10},
@@ -258,61 +264,8 @@ const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
{1, C8_12, C7_12, C9_12},
{1, C8_13, C7_13, C9_13},
{1, C8_14, C7_14, C9_14},
-
};
-
-led_config_t g_led_config = { {
- { 0, 5, 10, 15, 20, 25, 29 },
- { 1, 6, 11, 16, 21, 26, 30 },
- { 2, 7, 12, 17, 22, 27, 31 },
- { 3, 8, 13, 18, 23, 28, NO_LED },
- { 4, 9, 14, 19, 24, NO_LED, NO_LED },
- { 32, 33, 34, 35, NO_LED, NO_LED, NO_LED },
- { 65, 61, 56, 51, 46, 41, 36 },
- { 66, 62, 57, 52, 47, 42, 37 },
- { 67, 63, 58, 53, 48, 43, 38 },
- { NO_LED, 64, 59, 54, 49, 44, 39 },
- { NO_LED, NO_LED, 60, 55, 50, 45, 40 },
- { NO_LED, NO_LED, NO_LED, 71, 70, 69, 68 }
-}, {
- { 0, 4}, { 0, 20}, { 0, 36}, { 0, 52}, { 0, 68},
- { 16, 3}, { 16, 19}, { 16, 35}, { 16, 51}, { 16, 67},
- { 32, 1}, { 32, 17}, { 32, 33}, { 32, 49}, { 32, 65},
- { 48, 0}, { 48, 16}, { 48, 32}, { 48, 48}, { 48, 64},
- { 64, 1}, { 64, 17}, { 64, 33}, { 64, 49}, { 64, 65},
- { 80, 3}, { 80, 19}, { 80, 35}, { 80, 51},
- { 96, 4}, { 96, 20}, { 96, 36},
- { 88, 69}, {100, 80}, {112, 91}, {108, 69},
-
- {240, 4}, {240, 20}, {240, 36}, {240, 52}, {240, 68},
- {224, 3}, {224, 19}, {224, 35}, {224, 51}, {224, 67},
- {208, 1}, {208, 17}, {208, 33}, {208, 49}, {208, 65},
- {192, 0}, {192, 16}, {192, 32}, {192, 48}, {192, 64},
- {176, 1}, {176, 17}, {176, 33}, {176, 49}, {176, 65},
- {160, 3}, {160, 19}, {160, 35}, {160, 51},
- {144, 4}, {144, 20}, {144, 36},
- {152, 69}, {140, 80}, {128, 91}, {132, 69}
-}, {
- 1, 1, 1, 1, 1,
- 4, 4, 4, 4, 1,
- 4, 4, 4, 4, 1,
- 4, 4, 4, 4, 1,
- 4, 4, 4, 4, 1,
- 4, 4, 4, 4,
- 1, 1, 1,
- 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1,
- 4, 4, 4, 4, 1,
- 4, 4, 4, 4, 1,
- 4, 4, 4, 4, 1,
- 4, 4, 4, 4, 1,
- 4, 4, 4, 4,
- 1, 1, 1,
- 1, 1, 1, 1
-} };
// clang-format on
-
#endif
#ifdef AUDIO_ENABLE
@@ -358,11 +311,6 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{6,5}, {5,5}, {4,5}, {3,5}, {2,5}, {1,5},{0,5}},
};
// clang-format on
-
-void keyboard_post_init_kb(void) {
- rgb_matrix_enable_noeeprom();
- keyboard_post_init_user();
-}
#endif
#if defined(AUDIO_ENABLE) && defined(MUSIC_MAP)
@@ -441,7 +389,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void matrix_init_kb(void) {
+void keyboard_post_init_kb(void) {
keyboard_config.raw = eeconfig_read_kb();
if (!keyboard_config.led_level && !keyboard_config.led_level_res) {
@@ -450,11 +398,11 @@ void matrix_init_kb(void) {
eeconfig_update_kb(keyboard_config.raw);
}
#ifdef RGB_MATRIX_ENABLE
- if (keyboard_config.rgb_matrix_enable) {
- rgb_matrix_set_flags(LED_FLAG_ALL);
- } else {
- rgb_matrix_set_flags(LED_FLAG_NONE);
- }
+ rgb_matrix_enable_noeeprom();
+#endif
+#if defined(DEFERRED_EXEC_ENABLE)
+ is_launching = true;
+ defer_exec(500, startup_exec, NULL);
#endif
matrix_init_user();
}
diff --git a/keyboards/zsa/moonlander/rules.mk b/keyboards/zsa/moonlander/rules.mk
index 10928ea061..d2018cfff0 100644
--- a/keyboards/zsa/moonlander/rules.mk
+++ b/keyboards/zsa/moonlander/rules.mk
@@ -1,5 +1,7 @@
CUSTOM_MATRIX = lite
-# project specific files
-SRC += matrix.c
+VPATH += drivers/gpio
+SRC += matrix.c mcp23018.c
I2C_DRIVER_REQUIRED = yes
+
+MCU_LDSCRIPT = STM32F303xB
diff --git a/keyboards/zsa/planck_ez/base/keyboard.json b/keyboards/zsa/planck_ez/base/keyboard.json
new file mode 100644
index 0000000000..07167a8c2a
--- /dev/null
+++ b/keyboards/zsa/planck_ez/base/keyboard.json
@@ -0,0 +1,6 @@
+{
+ "keyboard_name": "Planck EZ",
+ "usb": {
+ "pid": "0xC6CE"
+ }
+}
diff --git a/keyboards/zsa/planck_ez/config.h b/keyboards/zsa/planck_ez/config.h
new file mode 100644
index 0000000000..1145df9ef9
--- /dev/null
+++ b/keyboards/zsa/planck_ez/config.h
@@ -0,0 +1,26 @@
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ * Copyright 2015 ZSA Technology Labs Inc (@zsa)
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#define MUSIC_MAP
+#define AUDIO_PIN A5
+#define AUDIO_PIN_ALT A4
+#define AUDIO_PIN_ALT_AS_NEGATIVE
+
+#define IS31FL3737_I2C_ADDRESS_1 IS31FL3737_I2C_ADDRESS_GND
diff --git a/keyboards/zsa/planck_ez/glow/glow.c b/keyboards/zsa/planck_ez/glow/glow.c
new file mode 100644
index 0000000000..2c11c2351e
--- /dev/null
+++ b/keyboards/zsa/planck_ez/glow/glow.c
@@ -0,0 +1,75 @@
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ * Copyright 2015 ZSA Technology Labs Inc (@zsa)
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "planck_ez.h"
+
+const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = {
+ {0, SW2_CS12, SW1_CS12, SW3_CS12},
+ {0, SW2_CS11, SW1_CS11, SW3_CS11},
+ {0, SW2_CS10, SW1_CS10, SW3_CS10},
+ {0, SW2_CS9, SW1_CS9, SW3_CS9},
+ {0, SW2_CS8, SW1_CS8, SW3_CS8},
+ {0, SW2_CS7, SW1_CS7, SW3_CS7},
+
+ {0, SW8_CS12, SW7_CS12, SW9_CS12},
+ {0, SW8_CS11, SW7_CS11, SW9_CS11},
+ {0, SW8_CS10, SW7_CS10, SW9_CS10},
+ {0, SW8_CS9, SW7_CS9, SW9_CS9},
+ {0, SW8_CS8, SW7_CS8, SW9_CS8},
+ {0, SW8_CS7, SW7_CS7, SW9_CS7},
+
+ {0, SW2_CS6, SW1_CS6, SW3_CS6},
+ {0, SW2_CS5, SW1_CS5, SW3_CS5},
+ {0, SW2_CS4, SW1_CS4, SW3_CS4},
+ {0, SW2_CS3, SW1_CS3, SW3_CS3},
+ {0, SW2_CS2, SW1_CS2, SW3_CS2},
+ {0, SW2_CS1, SW1_CS1, SW3_CS1},
+
+ {0, SW8_CS6, SW7_CS6, SW9_CS6},
+ {0, SW8_CS5, SW7_CS5, SW9_CS5},
+ {0, SW8_CS4, SW7_CS4, SW9_CS4},
+ {0, SW8_CS3, SW7_CS3, SW9_CS3},
+ {0, SW8_CS2, SW7_CS2, SW9_CS2},
+ {0, SW8_CS1, SW7_CS1, SW9_CS1},
+
+ {0, SW5_CS12, SW4_CS12, SW6_CS12},
+ {0, SW5_CS11, SW4_CS11, SW6_CS11},
+ {0, SW5_CS10, SW4_CS10, SW6_CS10},
+ {0, SW5_CS9, SW4_CS9, SW6_CS9},
+ {0, SW5_CS8, SW4_CS8, SW6_CS8},
+ {0, SW5_CS7, SW4_CS7, SW6_CS7},
+
+ {0, SW11_CS12, SW10_CS12, SW12_CS12},
+ {0, SW11_CS11, SW10_CS11, SW12_CS11},
+ {0, SW11_CS10, SW10_CS10, SW12_CS10},
+ {0, SW11_CS9, SW10_CS9, SW12_CS9},
+ {0, SW11_CS8, SW10_CS8, SW12_CS8},
+ {0, SW11_CS7, SW10_CS7, SW12_CS7},
+
+ {0, SW5_CS6, SW4_CS6, SW6_CS6},
+ {0, SW5_CS5, SW4_CS5, SW6_CS5},
+ {0, SW5_CS4, SW4_CS4, SW6_CS4},
+ {0, SW5_CS3, SW4_CS3, SW6_CS3},
+ {0, SW5_CS2, SW4_CS2, SW6_CS2},
+ {0, SW5_CS1, SW4_CS1, SW6_CS1},
+
+ {0, SW11_CS6, SW10_CS6, SW12_CS6},
+ {0, SW11_CS5, SW10_CS5, SW12_CS5},
+ {0, SW11_CS4, SW10_CS4, SW12_CS4},
+ {0, SW11_CS3, SW10_CS3, SW12_CS3},
+ {0, SW11_CS2, SW10_CS2, SW12_CS2},
+};
diff --git a/keyboards/zsa/planck_ez/glow/keyboard.json b/keyboards/zsa/planck_ez/glow/keyboard.json
new file mode 100644
index 0000000000..fa83190a79
--- /dev/null
+++ b/keyboards/zsa/planck_ez/glow/keyboard.json
@@ -0,0 +1,109 @@
+{
+ "keyboard_name": "Planck EZ Glow",
+ "usb": {
+ "pid": "0xC6CF"
+ },
+ "features": {
+ "rgb_matrix": true
+ },
+ "rgb_matrix": {
+ "animations": {
+ "alphas_mods": true,
+ "gradient_up_down": true,
+ "gradient_left_right": true,
+ "breathing": true,
+ "band_sat": true,
+ "band_val": true,
+ "band_pinwheel_sat": true,
+ "band_pinwheel_val": true,
+ "band_spiral_sat": true,
+ "band_spiral_val": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_up_down": true,
+ "rainbow_moving_chevron": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "dual_beacon": true,
+ "rainbow_beacon": true,
+ "rainbow_pinwheels": true,
+ "raindrops": true,
+ "jellybean_raindrops": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "pixel_rain": true,
+ "pixel_flow": true,
+ "pixel_fractal": true,
+ "typing_heatmap": true,
+ "digital_rain": true,
+ "solid_reactive_simple": true,
+ "solid_reactive": true,
+ "solid_reactive_wide": true,
+ "solid_reactive_multiwide": true,
+ "solid_reactive_cross": true,
+ "solid_reactive_multicross": true,
+ "solid_reactive_nexus": true,
+ "solid_reactive_multinexus": true,
+ "splash": true,
+ "multisplash": true,
+ "solid_splash": true,
+ "solid_multisplash": true
+ },
+ "driver": "is31fl3737",
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
+ {"matrix": [0, 1], "x": 20, "y": 0, "flags": 4},
+ {"matrix": [0, 2], "x": 40, "y": 0, "flags": 4},
+ {"matrix": [0, 3], "x": 61, "y": 0, "flags": 4},
+ {"matrix": [0, 4], "x": 81, "y": 0, "flags": 4},
+ {"matrix": [0, 5], "x": 101, "y": 0, "flags": 4},
+ {"matrix": [4, 0], "x": 122, "y": 0, "flags": 4},
+ {"matrix": [4, 1], "x": 142, "y": 0, "flags": 4},
+ {"matrix": [4, 2], "x": 162, "y": 0, "flags": 4},
+ {"matrix": [4, 3], "x": 183, "y": 0, "flags": 4},
+ {"matrix": [4, 4], "x": 203, "y": 0, "flags": 4},
+ {"matrix": [4, 5], "x": 223, "y": 0, "flags": 1},
+ {"matrix": [1, 0], "x": 0, "y": 21, "flags": 1},
+ {"matrix": [1, 1], "x": 20, "y": 21, "flags": 4},
+ {"matrix": [1, 2], "x": 40, "y": 21, "flags": 4},
+ {"matrix": [1, 3], "x": 61, "y": 21, "flags": 4},
+ {"matrix": [1, 4], "x": 81, "y": 21, "flags": 4},
+ {"matrix": [1, 5], "x": 101, "y": 21, "flags": 4},
+ {"matrix": [5, 0], "x": 122, "y": 21, "flags": 4},
+ {"matrix": [5, 1], "x": 142, "y": 21, "flags": 4},
+ {"matrix": [5, 2], "x": 162, "y": 21, "flags": 4},
+ {"matrix": [5, 3], "x": 183, "y": 21, "flags": 4},
+ {"matrix": [5, 4], "x": 203, "y": 21, "flags": 4},
+ {"matrix": [5, 5], "x": 223, "y": 21, "flags": 1},
+ {"matrix": [2, 0], "x": 0, "y": 42, "flags": 1},
+ {"matrix": [2, 1], "x": 20, "y": 42, "flags": 4},
+ {"matrix": [2, 2], "x": 40, "y": 42, "flags": 4},
+ {"matrix": [2, 3], "x": 61, "y": 42, "flags": 4},
+ {"matrix": [2, 4], "x": 81, "y": 42, "flags": 4},
+ {"matrix": [2, 5], "x": 101, "y": 42, "flags": 4},
+ {"matrix": [6, 0], "x": 122, "y": 42, "flags": 4},
+ {"matrix": [6, 1], "x": 142, "y": 42, "flags": 4},
+ {"matrix": [6, 2], "x": 162, "y": 42, "flags": 4},
+ {"matrix": [6, 3], "x": 183, "y": 42, "flags": 4},
+ {"matrix": [6, 4], "x": 203, "y": 42, "flags": 4},
+ {"matrix": [6, 5], "x": 223, "y": 42, "flags": 1},
+ {"matrix": [3, 0], "x": 0, "y": 63, "flags": 1},
+ {"matrix": [3, 1], "x": 20, "y": 63, "flags": 1},
+ {"matrix": [3, 2], "x": 40, "y": 63, "flags": 1},
+ {"matrix": [7, 3], "x": 61, "y": 63, "flags": 1},
+ {"matrix": [7, 4], "x": 81, "y": 63, "flags": 1},
+ {"matrix": [7, 5], "x": 111, "y": 63, "flags": 4},
+ {"matrix": [7, 0], "x": 142, "y": 63, "flags": 1},
+ {"matrix": [7, 1], "x": 162, "y": 63, "flags": 1},
+ {"matrix": [7, 2], "x": 183, "y": 63, "flags": 1},
+ {"matrix": [3, 3], "x": 203, "y": 63, "flags": 1},
+ {"matrix": [3, 4], "x": 223, "y": 63, "flags": 1}
+ ],
+ "led_flush_limit": 26,
+ "led_process_limit": 5,
+ "sleep": true
+ }
+}
diff --git a/keyboards/zsa/planck_ez/halconf.h b/keyboards/zsa/planck_ez/halconf.h
new file mode 100644
index 0000000000..f1044867f7
--- /dev/null
+++ b/keyboards/zsa/planck_ez/halconf.h
@@ -0,0 +1,23 @@
+/* Copyright 2021 QMK
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#define HAL_USE_I2C TRUE
+#define HAL_USE_GPT TRUE
+#define HAL_USE_DAC TRUE
+#define HAL_USE_PWM TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/zsa/planck_ez/info.json b/keyboards/zsa/planck_ez/info.json
new file mode 100644
index 0000000000..eda13449b5
--- /dev/null
+++ b/keyboards/zsa/planck_ez/info.json
@@ -0,0 +1,157 @@
+{
+ "manufacturer": "ZSA Technology Labs",
+ "maintainer": "drashna",
+ "audio": {
+ "driver": "dac_additive"
+ },
+ "bootloader": "stm32-dfu",
+ "diode_direction": "COL2ROW",
+ "encoder": {
+ "rotary": [
+ {"pin_a": "B12", "pin_b": "B13"}
+ ]
+ },
+ "features": {
+ "audio": true,
+ "bootmagic": true,
+ "command": true,
+ "console": true,
+ "encoder": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true
+ },
+ "matrix_pins": {
+ "cols": ["B11", "B10", "B2", "B1", "A7", "B0"],
+ "rows": ["A10", "A9", "A8", "B15", "C13", "C14", "C15", "A2"]
+ },
+ "mousekey": {
+ "delay": 0,
+ "interval": 20,
+ "max_speed": 7,
+ "time_to_max": 60,
+ "wheel_delay": 400
+ },
+ "processor": "STM32F303",
+ "tapping": {
+ "toggle": 1
+ },
+ "url": "https://blog.zsa.io/2307-goodbye-planck-ez/",
+ "usb": {
+ "device_version": "0.0.1",
+ "shared_endpoint": {
+ "mouse": false
+ },
+ "vid": "0x3297"
+ },
+ "community_layouts": ["ortho_4x12", "planck_mit"],
+ "layout_aliases": {
+ "LAYOUT_planck_grid": "LAYOUT_ortho_4x12",
+ "LAYOUT_planck_mit": "LAYOUT_planck_1x2uC"
+ },
+ "layouts": {
+ "LAYOUT_ortho_4x12": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [4, 0], "x": 6, "y": 0},
+ {"matrix": [4, 1], "x": 7, "y": 0},
+ {"matrix": [4, 2], "x": 8, "y": 0},
+ {"matrix": [4, 3], "x": 9, "y": 0},
+ {"matrix": [4, 4], "x": 10, "y": 0},
+ {"matrix": [4, 5], "x": 11, "y": 0},
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1},
+ {"matrix": [1, 5], "x": 5, "y": 1},
+ {"matrix": [5, 0], "x": 6, "y": 1},
+ {"matrix": [5, 1], "x": 7, "y": 1},
+ {"matrix": [5, 2], "x": 8, "y": 1},
+ {"matrix": [5, 3], "x": 9, "y": 1},
+ {"matrix": [5, 4], "x": 10, "y": 1},
+ {"matrix": [5, 5], "x": 11, "y": 1},
+ {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1, "y": 2},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+ {"matrix": [2, 4], "x": 4, "y": 2},
+ {"matrix": [2, 5], "x": 5, "y": 2},
+ {"matrix": [6, 0], "x": 6, "y": 2},
+ {"matrix": [6, 1], "x": 7, "y": 2},
+ {"matrix": [6, 2], "x": 8, "y": 2},
+ {"matrix": [6, 3], "x": 9, "y": 2},
+ {"matrix": [6, 4], "x": 10, "y": 2},
+ {"matrix": [6, 5], "x": 11, "y": 2},
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+ {"matrix": [7, 3], "x": 3, "y": 3},
+ {"matrix": [7, 4], "x": 4, "y": 3},
+ {"matrix": [7, 5], "x": 5, "y": 3},
+ {"matrix": [3, 5], "x": 6, "y": 3},
+ {"matrix": [7, 0], "x": 7, "y": 3},
+ {"matrix": [7, 1], "x": 8, "y": 3},
+ {"matrix": [7, 2], "x": 9, "y": 3},
+ {"matrix": [3, 3], "x": 10, "y": 3},
+ {"matrix": [3, 4], "x": 11, "y": 3}
+ ]
+ },
+ "LAYOUT_planck_1x2uC": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [4, 0], "x": 6, "y": 0},
+ {"matrix": [4, 1], "x": 7, "y": 0},
+ {"matrix": [4, 2], "x": 8, "y": 0},
+ {"matrix": [4, 3], "x": 9, "y": 0},
+ {"matrix": [4, 4], "x": 10, "y": 0},
+ {"matrix": [4, 5], "x": 11, "y": 0},
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1},
+ {"matrix": [1, 5], "x": 5, "y": 1},
+ {"matrix": [5, 0], "x": 6, "y": 1},
+ {"matrix": [5, 1], "x": 7, "y": 1},
+ {"matrix": [5, 2], "x": 8, "y": 1},
+ {"matrix": [5, 3], "x": 9, "y": 1},
+ {"matrix": [5, 4], "x": 10, "y": 1},
+ {"matrix": [5, 5], "x": 11, "y": 1},
+ {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1, "y": 2},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+ {"matrix": [2, 4], "x": 4, "y": 2},
+ {"matrix": [2, 5], "x": 5, "y": 2},
+ {"matrix": [6, 0], "x": 6, "y": 2},
+ {"matrix": [6, 1], "x": 7, "y": 2},
+ {"matrix": [6, 2], "x": 8, "y": 2},
+ {"matrix": [6, 3], "x": 9, "y": 2},
+ {"matrix": [6, 4], "x": 10, "y": 2},
+ {"matrix": [6, 5], "x": 11, "y": 2},
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+ {"matrix": [7, 3], "x": 3, "y": 3},
+ {"matrix": [7, 4], "x": 4, "y": 3},
+ {"matrix": [7, 5], "x": 5, "y": 3, "w": 2},
+ {"matrix": [7, 0], "x": 7, "y": 3},
+ {"matrix": [7, 1], "x": 8, "y": 3},
+ {"matrix": [7, 2], "x": 9, "y": 3},
+ {"matrix": [3, 3], "x": 10, "y": 3},
+ {"matrix": [3, 4], "x": 11, "y": 3}
+ ]
+ }
+ }
+}
diff --git a/keyboards/zsa/planck_ez/keymaps/default/keymap.json b/keyboards/zsa/planck_ez/keymaps/default/keymap.json
new file mode 100644
index 0000000000..4b27cc2970
--- /dev/null
+++ b/keyboards/zsa/planck_ez/keymaps/default/keymap.json
@@ -0,0 +1,17 @@
+{
+ "keyboard": "zsa/planck_ez/base",
+ "keymap": "default",
+ "layers": [
+ ["KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPC", "KC_ESC", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_ENT", "CW_TOGG", "KC_LCTL", "KC_LALT", "KC_LGUI", "TL_LOWR", "KC_SPC", "TL_UPPR", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RGHT"],
+ ["KC_TILD", "KC_EXLM", "KC_AT", "KC_HASH", "KC_DLR", "KC_PERC", "KC_CIRC", "KC_AMPR", "KC_ASTR", "KC_LPRN", "KC_RPRN", "KC_BSPC", "KC_DEL", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_UNDS", "KC_PLUS", "KC_LCBR", "KC_RCBR", "KC_PIPE", "KC_TRNS", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "S(KC_NUHS)", "S(KC_NUBS)", "KC_HOME", "KC_END", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_MPLY"],
+ ["KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_BSPC", "KC_DEL", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_MINS", "KC_EQL", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_TRNS", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_NUHS", "KC_NUBS", "KC_PGUP", "KC_PGDN", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_MPLY"],
+ ["KC_TRNS", "QK_BOOT", "DB_TOGG", "RGB_TOG", "RGB_MOD", "RGB_HUI", "RGB_HUD", "RGB_SAI", "RGB_SAD", "RGB_VAI", "RGB_VAD", "KC_DEL", "KC_TRNS", "KC_TRNS", "MU_NEXT", "AU_ON", "AU_OFF", "AG_NORM", "AG_SWAP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "AU_PREV", "AU_NEXT", "MU_ON", "MU_OFF", "MI_ON", "MI_OFF", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"]
+ ],
+ "layout": "LAYOUT_planck_1x2uC",
+ "config": {
+ "features": {
+ "tri_layer": true,
+ "caps_word": true
+ }
+ }
+}
diff --git a/keyboards/zsa/planck_ez/mcuconf.h b/keyboards/zsa/planck_ez/mcuconf.h
new file mode 100644
index 0000000000..e29f64dd72
--- /dev/null
+++ b/keyboards/zsa/planck_ez/mcuconf.h
@@ -0,0 +1,37 @@
+/* Copyright 2021 QMK
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include_next <mcuconf.h>
+
+// for i2c expander, and ISSI
+#undef STM32_I2C_USE_I2C1
+#define STM32_I2C_USE_I2C1 TRUE
+
+// for indicator LEDs
+#undef STM32_PWM_USE_TIM3
+#define STM32_PWM_USE_TIM3 TRUE
+#undef STM32_PWM_USE_TIM4
+#define STM32_PWM_USE_TIM4 TRUE
+
+// for audio
+#undef STM32_DAC_USE_DAC1_CH1
+#define STM32_DAC_USE_DAC1_CH1 TRUE
+#undef STM32_DAC_USE_DAC1_CH2
+#define STM32_DAC_USE_DAC1_CH2 TRUE
+#undef STM32_GPT_USE_TIM6
+#define STM32_GPT_USE_TIM6 TRUE
diff --git a/keyboards/zsa/planck_ez/planck_ez.c b/keyboards/zsa/planck_ez/planck_ez.c
new file mode 100644
index 0000000000..9c0e911654
--- /dev/null
+++ b/keyboards/zsa/planck_ez/planck_ez.c
@@ -0,0 +1,286 @@
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ * Copyright 2015 ZSA Technology Labs Inc (@zsa)
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "planck_ez.h"
+#include <ch.h>
+#include <hal.h>
+#include "keycodes.h"
+
+keyboard_config_t keyboard_config;
+
+
+/* Left B9 Right B8 */
+
+// See http://jared.geek.nz/2013/feb/linear-led-pwm
+static uint16_t cie_lightness(uint16_t v) {
+ if (v <= 5243) // if below 8% of max
+ return v / 9; // same as dividing by 900%
+ else {
+ uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare
+ // to get a useful result with integer division, we shift left in the expression above
+ // and revert what we've done again after squaring.
+ y = y * y * y >> 8;
+ if (y > 0xFFFFUL) // prevent overflow
+ return 0xFFFFU;
+ else
+ return (uint16_t) y;
+ }
+}
+
+static PWMConfig pwmCFG = {
+ 0xFFFF,/* PWM clock frequency */
+ 256,/* initial PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */
+ NULL,
+ {
+ {PWM_OUTPUT_DISABLED, NULL}, /* channel 0 -> TIM1-CH1 = PA8 */
+ {PWM_OUTPUT_DISABLED, NULL}, /* channel 1 -> TIM1-CH2 = PA9 */
+ {PWM_OUTPUT_ACTIVE_HIGH, NULL},
+ {PWM_OUTPUT_ACTIVE_HIGH, NULL}
+ },
+ 0, /* HW dependent part.*/
+ 0
+};
+
+static uint32_t planck_ez_right_led_duty;
+static uint32_t planck_ez_left_led_duty;
+
+void planck_ez_right_led_level(uint8_t level) {
+ planck_ez_right_led_duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / 255));
+ if (level == 0) {
+ // Turn backlight off
+ pwmDisableChannel(&PWMD4, 2);
+ } else {
+ // Turn backlight on
+ pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,planck_ez_right_led_duty));
+ }
+}
+
+
+void planck_ez_right_led_on(void){
+ pwmEnableChannel(&PWMD4, 2, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,planck_ez_right_led_duty));
+}
+
+void planck_ez_right_led_off(void){
+ pwmDisableChannel(&PWMD4, 2);
+}
+
+void planck_ez_left_led_level(uint8_t level) {
+ planck_ez_left_led_duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / 255));
+ if (level == 0) {
+ // Turn backlight off
+ pwmDisableChannel(&PWMD4, 3);
+ } else {
+ // Turn backlight on
+ pwmEnableChannel(&PWMD4, 3, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,planck_ez_left_led_duty));
+ }
+}
+
+void planck_ez_left_led_on(void){
+ pwmEnableChannel(&PWMD4, 3, PWM_FRACTION_TO_WIDTH(&PWMD4,0xFFFF,planck_ez_left_led_duty));
+}
+
+void planck_ez_left_led_off(void){
+ pwmDisableChannel(&PWMD4, 3);
+}
+
+
+void led_initialize_hardware(void) {
+ pwmStart(&PWMD4, &pwmCFG);
+
+ // set up defaults
+ planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4 );
+ palSetPadMode(GPIOB, 8, PAL_MODE_ALTERNATE(2));
+ planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4 );
+ palSetPadMode(GPIOB, 9, PAL_MODE_ALTERNATE(2));
+
+
+ // turn LEDs off by default
+ planck_ez_left_led_off();
+ planck_ez_right_led_off();
+}
+
+void keyboard_pre_init_kb(void) {
+ if (!eeconfig_is_enabled()) {
+ eeconfig_init();
+ }
+ // read kb settings from eeprom
+ keyboard_config.raw = eeconfig_read_kb();
+#if defined(RGB_MATRIX_ENABLE) && defined(ORYX_CONFIGURATOR)
+ if (keyboard_config.rgb_matrix_enable) {
+ rgb_matrix_set_flags(LED_FLAG_ALL);
+ } else {
+ rgb_matrix_set_flags(LED_FLAG_NONE);
+ }
+#endif
+ led_initialize_hardware();
+ keyboard_pre_init_user();
+}
+
+#if defined(RGB_MATRIX_ENABLE) && defined(ORYX_CONFIGURATOR)
+void keyboard_post_init_kb(void) {
+ rgb_matrix_enable_noeeprom();
+ keyboard_post_init_user();
+}
+#endif
+
+void eeconfig_init_kb(void) { // EEPROM is getting reset!
+ keyboard_config.raw = 0;
+ keyboard_config.rgb_matrix_enable = true;
+ keyboard_config.led_level = 4;
+ eeconfig_update_kb(keyboard_config.raw);
+ eeconfig_init_user();
+}
+
+
+#ifdef ORYX_CONFIGURATOR
+
+#ifndef PLANCK_EZ_USER_LEDS
+
+#ifndef PLANCK_EZ_LED_LOWER
+# define PLANCK_EZ_LED_LOWER 1
+#endif
+#ifndef PLANCK_EZ_LED_RAISE
+# define PLANCK_EZ_LED_RAISE 2
+#endif
+#ifndef PLANCK_EZ_LED_ADJUST
+# define PLANCK_EZ_LED_ADJUST 3
+#endif
+
+layer_state_t layer_state_set_kb(layer_state_t state) {
+ planck_ez_left_led_off();
+ planck_ez_right_led_off();
+ state = layer_state_set_user(state);
+ uint8_t layer = get_highest_layer(state);
+ switch (layer) {
+ case PLANCK_EZ_LED_LOWER:
+ planck_ez_left_led_on();
+ break;
+ case PLANCK_EZ_LED_RAISE:
+ planck_ez_right_led_on();
+ break;
+ case PLANCK_EZ_LED_ADJUST:
+ planck_ez_right_led_on();
+ planck_ez_left_led_on();
+ break;
+ default:
+ break;
+ }
+ return state;
+}
+#endif
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case LED_LEVEL:
+ if (record->event.pressed) {
+ keyboard_config.led_level++;
+ if (keyboard_config.led_level > 4) {
+ keyboard_config.led_level = 0;
+ }
+ planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4 );
+ planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4 );
+ eeconfig_update_kb(keyboard_config.raw);
+ layer_state_set_kb(layer_state);
+ }
+ break;
+#ifdef RGB_MATRIX_ENABLE
+ case TOGGLE_LAYER_COLOR:
+ if (record->event.pressed) {
+ keyboard_config.disable_layer_led ^= 1;
+ if (keyboard_config.disable_layer_led)
+ rgb_matrix_set_color_all(0, 0, 0);
+ eeconfig_update_kb(keyboard_config.raw);
+ }
+ break;
+ case RGB_TOG:
+ if (record->event.pressed) {
+ switch (rgb_matrix_get_flags()) {
+ case LED_FLAG_ALL: {
+ rgb_matrix_set_flags(LED_FLAG_NONE);
+ keyboard_config.rgb_matrix_enable = false;
+ rgb_matrix_set_color_all(0, 0, 0);
+ }
+ break;
+ default: {
+ rgb_matrix_set_flags(LED_FLAG_ALL);
+ keyboard_config.rgb_matrix_enable = true;
+ }
+ break;
+ }
+ eeconfig_update_kb(keyboard_config.raw);
+ }
+ return false;
+#endif
+ }
+ return process_record_user(keycode, record);
+}
+#endif
+
+#ifdef AUDIO_ENABLE
+bool music_mask_kb(uint16_t keycode) {
+ switch (keycode) {
+ case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
+ case QK_TO ... QK_TO_MAX:
+ case QK_MOMENTARY ... QK_MOMENTARY_MAX:
+ case QK_DEF_LAYER ... QK_DEF_LAYER_MAX:
+ case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER_MAX:
+ case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX:
+ case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX:
+ case QK_LAYER_MOD ... QK_LAYER_MOD_MAX:
+ case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX:
+ case QK_MOD_TAP ... QK_MOD_TAP_MAX:
+ case AU_ON ... AU_PREV:
+ case QK_BOOT:
+ case QK_CLEAR_EEPROM:
+ case QK_TRI_LAYER_LOWER:
+ case QK_TRI_LAYER_UPPER:
+ return false;
+ default:
+ return music_mask_user(keycode);
+ }
+}
+#endif
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
+ {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}},
+ {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}},
+ {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
+
+ {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
+ {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
+ {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
+ {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}},
+};
+
+# ifdef ENCODER_MAP_ENABLE
+const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {0};
+# endif
+#endif
+
+const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = {
+ {36, 37, 38, 39, 40, 41},
+ {24, 25, 26, 27, 28, 29},
+ {12, 13, 14, 15, 16, 17},
+ { 0, 1, 2, 10, 11, 6},
+ {42, 43, 44, 45, 46, 47},
+ {30, 31, 32, 33, 34, 35},
+ {18, 19, 20, 21, 22, 23},
+ { 7, 8, 9, 3, 4, 5}
+};
diff --git a/keyboards/zsa/planck_ez/planck_ez.h b/keyboards/zsa/planck_ez/planck_ez.h
new file mode 100644
index 0000000000..695b14d9ad
--- /dev/null
+++ b/keyboards/zsa/planck_ez/planck_ez.h
@@ -0,0 +1,47 @@
+/* Copyright 2018 Jack Humbert <jack.humb@gmail.com>
+ * Copyright 2015 ZSA Technology Labs Inc (@zsa)
+ * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#pragma once
+
+#include "quantum.h"
+
+void planck_ez_right_led_on(void);
+void planck_ez_right_led_off(void);
+void planck_ez_right_led_level(uint8_t level);
+void planck_ez_left_led_on(void);
+void planck_ez_left_led_off(void);
+void planck_ez_left_led_level(uint8_t level);
+
+enum planck_ez_keycodes {
+ LED_LEVEL = QK_KB_0,
+ TOGGLE_LAYER_COLOR,
+};
+
+#ifndef WEBUSB_ENABLE
+# define WEBUSB_PAIR KC_NO
+#endif
+
+typedef union {
+ uint32_t raw;
+ struct {
+ uint8_t led_level :3;
+ bool disable_layer_led :1;
+ bool rgb_matrix_enable :1;
+ };
+} keyboard_config_t;
+
+extern keyboard_config_t keyboard_config;
diff --git a/keyboards/zsa/planck_ez/readme.md b/keyboards/zsa/planck_ez/readme.md
new file mode 100644
index 0000000000..d76a01cb25
--- /dev/null
+++ b/keyboards/zsa/planck_ez/readme.md
@@ -0,0 +1,64 @@
+# Planck EZ
+
+![Planck EZ](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/planck/ez/neat-planck-banner.png)
+
+A variant of the Planck featuring a 2u spacebar and per-key RGB backlighting.
+
+Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert), [Drashna Jael're](https://github.com/drashna)
+Hardware Supported: Planck EZ
+Hardware Availability: [ZSA](https://www.zsa.io/planck/) (discontinued)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make zsa/planck_ez/base:default
+
+For the per key RGB version of this keyboard, you want to use the "glow" subdirectory. For example:
+
+ make zsa/planck_ez/glow:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+## Planck EZ Configuration (from Oryx)
+
+To enable the features from Oryx (ZSA's Configurator), either compile the the `oryx` keymap, or add `#define ORYX_CONFIGURATOR` to your `config.h` file.
+
+This enables the front Indicator LEDs, and the `TOGGLE_LAYER_COLOR`, and `LED_LEVEL` keycodes. The `TOGGLE_LAYER_COLOR` keycode toggles the customized LED map configured on Oryx. The `LED_LEVEL` cycles through the brightness levels for the front "teeth" LEDs.
+
+### Indicator LEDs
+
+The two front "teeth" LED indicators are PWM controlled. If you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h`, you can use the `LED_LEVEL` to cycle through preset vales (0, 25%, 50%, 75%, 100%), and will be saved to EEPROM (persistent storage)
+
+Alternatively, you can set the brightness by calling the following functions:
+
+```c
+void planck_ez_right_led_level(uint8_t level);
+void planck_ez_left_led_level(uint8_t level);
+```
+
+These settings are not persistent, so you'd need to reset it every time the board starts.
+
+These are on a 0-255 scale
+
+#### Layer indication
+
+By default, the indicator lights are used for layer indication, expecting the specific layers used in the default keymap. However, this may not work for you. And if that is the case, you can add `#define PLANCK_EZ_USER_LEDS` to your `config.h` file.
+
+This will remove the default behavior for changing the LEDs based on layer, and allow you to control them manually.
+
+Alternatively, you can use the following defines in your keymap's `config.h` to control which layers are used, as long as you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h` file, as well.
+
+```c
+#define PLANCK_EZ_LED_LOWER 3
+#define PLANCK_EZ_LED_RAISE 4
+#define PLANCK_EZ_LED_ADJUST 6
+```
+
+This will allow you to change the layers that are used, without having to add anything code to your `keymap.c`
+
+### RGB Matrix Features
+
+If you're using the Smart LED (layer indication) feature from the Oryx Configurator, you want to make sure that you enable these options by adding `#define ORYX_CONFIGURATOR` to your keymap's `config.h`.
+
+This changes the `RGB_TOG` keycode so that it will toggle the lights on and off, in a way that will allow the Smart LEDs to continue to work, even with the rest of the LEDs turned off.
+
+Additionally, a new keycode has been added to toggle the Smart LEDs. Use `TOGGLE_LAYER_COLOR`, if you aren't already.
diff --git a/keyboards/zsa/planck_ez/rules.mk b/keyboards/zsa/planck_ez/rules.mk
new file mode 100644
index 0000000000..67921c96ed
--- /dev/null
+++ b/keyboards/zsa/planck_ez/rules.mk
@@ -0,0 +1,4 @@
+RGBLIGHT_SUPPORTED = no
+BAKCLIGHT_SUPPORTED = no
+
+DEFAULT_FOLDER = zsa/planck_ez/base
diff --git a/keyboards/zsa/voyager/voyager.c b/keyboards/zsa/voyager/voyager.c
index 3255f25a97..69d42bba1a 100644
--- a/keyboards/zsa/voyager/voyager.c
+++ b/keyboards/zsa/voyager/voyager.c
@@ -21,18 +21,26 @@ static uint32_t dynamic_macro_led(uint32_t trigger_time, void *cb_arg) {
return 100;
}
-void dynamic_macro_record_start_user(int8_t direction) {
+bool dynamic_macro_record_start_kb(int8_t direction) {
+ if (!dynamic_macro_record_start_user(direction)) {
+ return false;
+ }
if (dynamic_macro_token == INVALID_DEFERRED_TOKEN) {
STATUS_LED_3(true);
dynamic_macro_token = defer_exec(100, dynamic_macro_led, NULL);
}
+ return true;
}
-void dynamic_macro_record_end_user(int8_t direction) {
+bool dynamic_macro_record_end_kb(int8_t direction) {
+ if (!dynamic_macro_record_end_user(direction)) {
+ return false;
+ }
if (cancel_deferred_exec(dynamic_macro_token)) {
dynamic_macro_token = INVALID_DEFERRED_TOKEN;
STATUS_LED_3(false);
}
+ return true;
}
# endif