From c9fe884b26d39d30ca96a4b58249a34cb8a7b3ab Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Thu, 8 Dec 2022 17:48:58 +0100 Subject: Moonlander: Add RGB LED layout map macro (#18745) --- keyboards/moonlander/config.h | 2 +- keyboards/moonlander/moonlander.c | 88 ++++++++++++++++++++------------------- keyboards/moonlander/moonlander.h | 28 +++++++++++++ 3 files changed, 75 insertions(+), 43 deletions(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h index 7db3a184fa..9aff554ace 100644 --- a/keyboards/moonlander/config.h +++ b/keyboards/moonlander/config.h @@ -76,7 +76,7 @@ #define DRIVER_1_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 36 #define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#define RGB_MATRIX_CENTER { 125, 26 } +#define RGB_MATRIX_CENTER { 120, 36 } #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 175 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c index 2d6b1f037b..83b5997b53 100644 --- a/keyboards/moonlander/moonlander.c +++ b/keyboards/moonlander/moonlander.c @@ -264,50 +264,54 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { }; 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, 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, 0 }, { 0, 12 }, { 0, 25 }, { 0, 38 }, { 0, 51 }, - { 17, 0 }, { 17, 12 }, { 17, 25 }, { 17, 38 }, { 17, 51 }, - { 34, 0 }, { 34, 12 }, { 34, 25 }, { 34, 38 }, { 34, 51 }, - { 51, 0 }, { 51, 12 }, { 51, 25 }, { 51, 38 }, { 51, 51 }, - { 68, 0 }, { 68, 12 }, { 68, 25 }, { 68, 38 }, { 68, 51 }, - { 86, 0 }, { 86, 12 }, { 86, 25 }, { 86, 38 }, - { 105, 0 }, { 105, 12 }, { 105, 25 }, - { 90, 55 }, { 105, 68 }, { 116, 86 }, { 116, 59 }, - - { 250, 0 }, { 250, 12 }, { 250, 25 }, { 250, 38 }, { 250, 51 }, - { 233, 0 }, { 233, 12 }, { 233, 25 }, { 233, 38 }, { 233, 51 }, - { 216, 0 }, { 216, 12 }, { 216, 25 }, { 216, 38 }, { 216, 51 }, - { 198, 0 }, { 198, 12 }, { 198, 25 }, { 198, 38 }, { 198, 51 }, - { 181, 0 }, { 181, 12 }, { 181, 25 }, { 181, 38 }, { 181, 51 }, - { 163, 0 }, { 163, 12 }, { 163, 25 }, { 163, 38 }, - { 146, 0 }, { 146, 12 }, { 146, 25 }, - { 161, 55 }, { 161, 68 }, { 146, 86 }, { 131, 59 } - + { 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, 4, - 4, 4, 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, 4, - 4, 4, 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, + + 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 diff --git a/keyboards/moonlander/moonlander.h b/keyboards/moonlander/moonlander.h index 19618a9e2a..96e0b0ff14 100644 --- a/keyboards/moonlander/moonlander.h +++ b/keyboards/moonlander/moonlander.h @@ -59,6 +59,34 @@ extern bool mcp23018_leds[]; { KC_NO, KC_NO, ka2, ka3, ka4, ka5, ka6 }, \ { KC_NO, KC_NO, KC_NO, kb3, kb4, kb5, kb6 } \ } + +#define LED_LAYOUT_moonlander( \ + l00, l01, l02, l03, l04, l05, l06, l60, l61, l62, l63, l64, l65, l66, \ + l10, l11, l12, l13, l14, l15, l16, l70, l71, l72, l73, l74, l75, l76, \ + l20, l21, l22, l23, l24, l25, l26, l80, l81, l82, l83, l84, l85, l86, \ + l30, l31, l32, l33, l34, l35, l91, l92, l93, l94, l95, l96, \ + l40, l41, l42, l43, l44, l53, lb3, la2, la3, la4, la5, la6, \ + l50, l51, l52, lb4, lb5, lb6 \ +) \ +{ \ + l00, l10, l20, l30, l40, \ + l01, l11, l21, l31, l41, \ + l02, l12, l22, l32, l42, \ + l03, l13, l23, l33, l43, \ + l04, l14, l24, l34, l44, \ + l05, l15, l25, l35, \ + l06, l16, l26, \ + l50, l51, l52, l53, \ +\ + l66, l76, l86, l96, la6, \ + l65, l75, l85, l95, la5, \ + l64, l74, l84, l94, la4, \ + l63, l73, l83, l93, la3, \ + l62, l72, l82, l92, la2, \ + l61, l71, l81, l91, \ + l60, l70, l80, \ + lb6, lb5, lb4, lb3 \ +} // clang-format on enum planck_ez_keycodes { -- cgit v1.2.3 From f6dd8dea2e493dc549a60fee99de871c4088d09a Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 31 Jan 2023 06:03:30 +1100 Subject: Remove usages of config_common.h from config.h files. (#19714) --- keyboards/moonlander/config.h | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h index 9aff554ace..63613aaac3 100644 --- a/keyboards/moonlander/config.h +++ b/keyboards/moonlander/config.h @@ -18,7 +18,6 @@ #pragma once -#include "config_common.h" #define WEBUSB_LANDING_PAGE_URL u8"configure.ergodox-ez.com" -- cgit v1.2.3 From ebb512db827e84619e7151fcf76e3daf9328fe59 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 4 Feb 2023 06:19:58 +1100 Subject: Debounce defines cleanup (#19742) * Clean up `DEBOUNCE` in config.h, 0-9 * Clean up `DEBOUNCE` in config.h, A * Clean up `DEBOUNCE` in config.h, B * Clean up `DEBOUNCE` in config.h, C * Clean up `DEBOUNCE` in config.h, D * Clean up `DEBOUNCE` in config.h, E * Clean up `DEBOUNCE` in config.h, F * Clean up `DEBOUNCE` in config.h, G * Clean up `DEBOUNCE` in config.h, H * Clean up `DEBOUNCE` in config.h, handwired * Clean up `DEBOUNCE` in config.h, I * Clean up `DEBOUNCE` in config.h, J * Clean up `DEBOUNCE` in config.h, K * Clean up `DEBOUNCE` in config.h, L * Clean up `DEBOUNCE` in config.h, M * Clean up `DEBOUNCE` in config.h, N * Clean up `DEBOUNCE` in config.h, O * Clean up `DEBOUNCE` in config.h, P * Clean up `DEBOUNCE` in config.h, Q * Clean up `DEBOUNCE` in config.h, R * Clean up `DEBOUNCE` in config.h, S * Clean up `DEBOUNCE` in config.h, T * Clean up `DEBOUNCE` in config.h, U * Clean up `DEBOUNCE` in config.h, V * Clean up `DEBOUNCE` in config.h, W * Clean up `DEBOUNCE` in config.h, X * Clean up `DEBOUNCE` in config.h, Y * Clean up `DEBOUNCE` in config.h, Z * Remove default debounce from info.json * Migrate non-default debounce to info.json --- keyboards/moonlander/config.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h index 63613aaac3..389f97d696 100644 --- a/keyboards/moonlander/config.h +++ b/keyboards/moonlander/config.h @@ -44,9 +44,6 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -- cgit v1.2.3 From f9aeea64c1f85d388485503e52035b5f7533ed26 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 8 Feb 2023 18:41:46 +1100 Subject: Migrate `MCU` and `BOOTLOADER` to data-driven (#19529) --- keyboards/moonlander/info.json | 2 ++ keyboards/moonlander/rules.mk | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/info.json b/keyboards/moonlander/info.json index 6322dccd5b..3492713a6a 100644 --- a/keyboards/moonlander/info.json +++ b/keyboards/moonlander/info.json @@ -8,6 +8,8 @@ "pid": "0x1969", "device_version": "0.0.1" }, + "processor": "STM32F303", + "bootloader": "stm32-dfu", "layouts": { "LAYOUT_moonlander": { "layout": [ diff --git a/keyboards/moonlander/rules.mk b/keyboards/moonlander/rules.mk index 72682d29b1..825afb6ba1 100644 --- a/keyboards/moonlander/rules.mk +++ b/keyboards/moonlander/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = STM32F303 - -# Bootloader selection -BOOTLOADER = stm32-dfu - # Build Options # change yes to no to disable # -- cgit v1.2.3 From 7f805cc7799deb0ca75f751cebd32c6640058af9 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 23 Feb 2023 09:19:00 +1100 Subject: VIA Protocol 12 + fixes (#19916) Co-authored-by: Wilba Co-authored-by: zvecr --- keyboards/moonlander/keymaps/via/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/keymaps/via/keymap.c b/keyboards/moonlander/keymaps/via/keymap.c index 70264c240b..91ad0d1bf7 100644 --- a/keyboards/moonlander/keymaps/via/keymap.c +++ b/keyboards/moonlander/keymaps/via/keymap.c @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [SYMB] = LAYOUT_moonlander( - USER00, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + 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, _______, @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [MDIA] = LAYOUT_moonlander( - USER01, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, + 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, _______, _______, @@ -100,12 +100,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case USER00: + case QK_KB_0: if (record->event.pressed) { SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); } return false; - case USER01: + case QK_KB_1: if (record->event.pressed) { keyboard_config.led_level ^= 1; eeconfig_update_kb(keyboard_config.raw); -- cgit v1.2.3 From 961f0b7b2de54f988daf4ce7b791f91a33e55612 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Wed, 22 Feb 2023 22:49:07 +0000 Subject: Reallocate SAFE_RANGE (#19909) --- keyboards/moonlander/keymaps/default/keymap.c | 2 +- keyboards/moonlander/keymaps/shahn-neo/keymap.c | 2 +- keyboards/moonlander/moonlander.h | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/keymaps/default/keymap.c b/keyboards/moonlander/keymaps/default/keymap.c index d747e9eaf2..754227262f 100644 --- a/keyboards/moonlander/keymaps/default/keymap.c +++ b/keyboards/moonlander/keymaps/default/keymap.c @@ -28,7 +28,7 @@ enum layers { }; enum custom_keycodes { - VRSN = ML_SAFE_RANGE, + VRSN = SAFE_RANGE, }; // clang-format off diff --git a/keyboards/moonlander/keymaps/shahn-neo/keymap.c b/keyboards/moonlander/keymaps/shahn-neo/keymap.c index 27ccdbb629..fc174a62fe 100644 --- a/keyboards/moonlander/keymaps/shahn-neo/keymap.c +++ b/keyboards/moonlander/keymaps/shahn-neo/keymap.c @@ -24,7 +24,7 @@ enum layers { }; enum custom_keycodes { - a_umlaut = ML_SAFE_RANGE, + a_umlaut = SAFE_RANGE, o_umlaut, u_umlaut, eszett, diff --git a/keyboards/moonlander/moonlander.h b/keyboards/moonlander/moonlander.h index 96e0b0ff14..400c97be0d 100644 --- a/keyboards/moonlander/moonlander.h +++ b/keyboards/moonlander/moonlander.h @@ -90,9 +90,8 @@ extern bool mcp23018_leds[]; // clang-format on enum planck_ez_keycodes { - TOGGLE_LAYER_COLOR = SAFE_RANGE, + TOGGLE_LAYER_COLOR = QK_KB_0, LED_LEVEL, - ML_SAFE_RANGE, }; #ifndef WEBUSB_ENABLE -- cgit v1.2.3