diff options
| author | Joel Challis <git@zvecr.com> | 2023-09-27 00:48:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-27 00:48:42 +0100 |
| commit | 351b5cd2cd625e031ba88c95ef7c4dfec7a04d80 (patch) | |
| tree | 9502eb118afafb159bb86e73d895529a1075357d | |
| parent | ca9664b1accaa8e1c0b9040eddbd49f2ef4e6f97 (diff) | |
Initial support for CSTM80 (#22137)
| -rw-r--r-- | keyboards/drop/cstm80/board.h | 8 | ||||
| -rw-r--r-- | keyboards/drop/cstm80/config.h | 22 | ||||
| -rw-r--r-- | keyboards/drop/cstm80/cstm80.c | 96 | ||||
| -rw-r--r-- | keyboards/drop/cstm80/halconf.h | 7 | ||||
| -rw-r--r-- | keyboards/drop/cstm80/info.json | 272 | ||||
| -rw-r--r-- | keyboards/drop/cstm80/keymaps/default/keymap.c | 38 | ||||
| -rw-r--r-- | keyboards/drop/cstm80/keymaps/via/config.h | 5 | ||||
| -rw-r--r-- | keyboards/drop/cstm80/keymaps/via/keymap.c | 38 | ||||
| -rw-r--r-- | keyboards/drop/cstm80/keymaps/via/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/drop/cstm80/mcuconf.h | 14 | ||||
| -rw-r--r-- | keyboards/drop/cstm80/readme.md | 24 | ||||
| -rw-r--r-- | keyboards/drop/cstm80/rules.mk | 4 | ||||
| -rw-r--r-- | keyboards/drop/lib/common.c | 10 |
13 files changed, 533 insertions, 6 deletions
diff --git a/keyboards/drop/cstm80/board.h b/keyboards/drop/cstm80/board.h new file mode 100644 index 0000000000..ed3ea4b1f7 --- /dev/null +++ b/keyboards/drop/cstm80/board.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | // Copyright 2023 Massdrop, Inc. | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | #pragma once | ||
| 4 | |||
| 5 | #include_next <board.h> | ||
| 6 | |||
| 7 | #undef STM32_HSECLK | ||
| 8 | #define STM32_HSECLK 16000000U | ||
diff --git a/keyboards/drop/cstm80/config.h b/keyboards/drop/cstm80/config.h new file mode 100644 index 0000000000..2aefadfe30 --- /dev/null +++ b/keyboards/drop/cstm80/config.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | // Copyright 2023 Massdrop, Inc. | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | #pragma once | ||
| 4 | |||
| 5 | #define I2C1_SCL_PIN B8 | ||
| 6 | #define I2C1_SDA_PIN B9 | ||
| 7 | |||
| 8 | #define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10101000 | ||
| 9 | #define EXTERNAL_EEPROM_WP_PIN B7 | ||
| 10 | #define EEPROM_I2C_24LC256 | ||
| 11 | |||
| 12 | #define DRIVER_ADDR_1 0b1010000 | ||
| 13 | #define DRIVER_ADDR_2 0b1011111 | ||
| 14 | #define DRIVER_COUNT 2 | ||
| 15 | #define RGB_MATRIX_LED_COUNT 88 | ||
| 16 | #define ISSI_PWM_FREQUENCY 0b010 // 26k | ||
| 17 | |||
| 18 | #define RGB_DISABLE_WHEN_USB_SUSPENDED | ||
| 19 | #define RGB_MATRIX_KEYPRESSES | ||
| 20 | #define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
| 21 | |||
| 22 | #define RGB_MATRIX_CAPS_LOCK_INDEX 48 | ||
diff --git a/keyboards/drop/cstm80/cstm80.c b/keyboards/drop/cstm80/cstm80.c new file mode 100644 index 0000000000..c60f347cb9 --- /dev/null +++ b/keyboards/drop/cstm80/cstm80.c | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | // Copyright 2023 Massdrop, Inc. | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | #ifdef RGB_MATRIX_ENABLE | ||
| 4 | # include "rgb_matrix.h" | ||
| 5 | |||
| 6 | const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { | ||
| 7 | { 0, E_1, D_1, F_1 }, | ||
| 8 | { 0, E_2, D_2, F_2 }, | ||
| 9 | { 0, E_3, D_3, F_3 }, | ||
| 10 | { 0, E_4, D_4, F_4 }, | ||
| 11 | { 0, E_5, D_5, F_5 }, | ||
| 12 | { 0, E_6, D_6, F_6 }, | ||
| 13 | { 0, E_7, D_7, F_7 }, | ||
| 14 | { 0, E_8, D_8, F_8 }, | ||
| 15 | { 0, E_9, D_9, F_9 }, | ||
| 16 | { 0, E_10, D_10, F_10 }, | ||
| 17 | { 0, E_11, D_11, F_11 }, | ||
| 18 | { 0, E_12, D_12, F_12 }, | ||
| 19 | { 0, E_13, D_13, F_13 }, | ||
| 20 | { 0, E_14, D_14, F_14 }, | ||
| 21 | { 0, E_15, D_15, F_15 }, | ||
| 22 | { 0, E_16, D_16, F_16 }, | ||
| 23 | { 0, H_1, G_1, I_1 }, | ||
| 24 | { 0, H_2, G_2, I_2 }, | ||
| 25 | { 0, H_3, G_3, I_3 }, | ||
| 26 | { 0, H_4, G_4, I_4 }, | ||
| 27 | { 0, H_5, G_5, I_5 }, | ||
| 28 | { 0, H_6, G_6, I_6 }, | ||
| 29 | { 0, H_7, G_7, I_7 }, | ||
| 30 | { 0, H_8, G_8, I_8 }, | ||
| 31 | { 0, H_9, G_9, I_9 }, | ||
| 32 | { 0, H_10, G_10, I_10 }, | ||
| 33 | { 0, H_11, G_11, I_11 }, | ||
| 34 | { 0, H_12, G_12, I_12 }, | ||
| 35 | { 0, H_13, G_13, I_13 }, | ||
| 36 | { 0, H_14, G_14, I_14 }, | ||
| 37 | { 0, H_15, G_15, I_15 }, | ||
| 38 | { 0, H_16, G_16, I_16 }, | ||
| 39 | { 0, K_1, J_1, L_1 }, | ||
| 40 | { 0, K_2, J_2, L_2 }, | ||
| 41 | { 0, K_3, J_3, L_3 }, | ||
| 42 | { 0, K_4, J_4, L_4 }, | ||
| 43 | { 0, K_5, J_5, L_5 }, | ||
| 44 | { 0, K_6, J_6, L_6 }, | ||
| 45 | { 0, K_7, J_7, L_7 }, | ||
| 46 | { 0, K_8, J_8, L_8 }, | ||
| 47 | { 0, K_9, J_9, L_9 }, | ||
| 48 | { 0, K_10, J_10, L_10 }, | ||
| 49 | { 0, K_11, J_11, L_11 }, | ||
| 50 | { 0, K_12, J_12, L_12 }, | ||
| 51 | { 0, K_13, J_13, L_13 }, | ||
| 52 | { 0, K_14, J_14, L_14 }, | ||
| 53 | { 0, K_15, J_15, L_15 }, | ||
| 54 | { 0, K_16, J_16, L_16 }, | ||
| 55 | { 1, B_1, A_1, C_1 }, | ||
| 56 | { 1, B_2, A_2, C_2 }, | ||
| 57 | { 1, B_3, A_3, C_3 }, | ||
| 58 | { 1, B_4, A_4, C_4 }, | ||
| 59 | { 1, B_5, A_5, C_5 }, | ||
| 60 | { 1, B_6, A_6, C_6 }, | ||
| 61 | { 1, B_7, A_7, C_7 }, | ||
| 62 | { 1, B_8, A_8, C_8 }, | ||
| 63 | { 1, B_9, A_9, C_9 }, | ||
| 64 | { 1, B_10, A_10, C_10 }, | ||
| 65 | { 1, B_11, A_11, C_11 }, | ||
| 66 | { 1, B_12, A_12, C_12 }, | ||
| 67 | { 1, B_13, A_13, C_13 }, | ||
| 68 | { 1, B_14, A_14, C_14 }, | ||
| 69 | { 1, B_15, A_15, C_15 }, | ||
| 70 | { 1, B_16, A_16, C_16 }, | ||
| 71 | { 1, E_1, D_1, F_1 }, | ||
| 72 | { 1, E_2, D_2, F_2 }, | ||
| 73 | { 1, E_3, D_3, F_3 }, | ||
| 74 | { 1, E_4, D_4, F_4 }, | ||
| 75 | { 1, E_5, D_5, F_5 }, | ||
| 76 | { 1, E_6, D_6, F_6 }, | ||
| 77 | { 1, E_7, D_7, F_7 }, | ||
| 78 | { 1, E_8, D_8, F_8 }, | ||
| 79 | { 1, E_9, D_9, F_9 }, | ||
| 80 | { 1, E_10, D_10, F_10 }, | ||
| 81 | { 1, E_11, D_11, F_11 }, | ||
| 82 | { 1, E_12, D_12, F_12 }, | ||
| 83 | { 1, E_13, D_13, F_13 }, | ||
| 84 | { 1, H_1, G_1, I_1 }, | ||
| 85 | { 1, H_2, G_2, I_2 }, | ||
| 86 | { 1, H_3, G_3, I_3 }, | ||
| 87 | { 1, H_4, G_4, I_4 }, | ||
| 88 | { 1, H_5, G_5, I_5 }, | ||
| 89 | { 1, H_6, G_6, I_6 }, | ||
| 90 | { 1, H_7, G_7, I_7 }, | ||
| 91 | { 1, H_8, G_8, I_8 }, | ||
| 92 | { 1, H_9, G_9, I_9 }, | ||
| 93 | { 1, H_10, G_10, I_10 }, | ||
| 94 | { 1, H_11, G_11, I_11 }, | ||
| 95 | }; | ||
| 96 | #endif | ||
diff --git a/keyboards/drop/cstm80/halconf.h b/keyboards/drop/cstm80/halconf.h new file mode 100644 index 0000000000..2677c2a654 --- /dev/null +++ b/keyboards/drop/cstm80/halconf.h | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | // Copyright 2023 Massdrop, Inc. | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | #pragma once | ||
| 4 | |||
| 5 | #define HAL_USE_I2C TRUE | ||
| 6 | |||
| 7 | #include_next <halconf.h> | ||
diff --git a/keyboards/drop/cstm80/info.json b/keyboards/drop/cstm80/info.json new file mode 100644 index 0000000000..170538027e --- /dev/null +++ b/keyboards/drop/cstm80/info.json | |||
| @@ -0,0 +1,272 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "CSTM80", | ||
| 3 | "manufacturer": "Drop Inc.", | ||
| 4 | "maintainer": "zvecr", | ||
| 5 | "processor": "STM32F303", | ||
| 6 | "bootloader": "tinyuf2", | ||
| 7 | "diode_direction": "COL2ROW", | ||
| 8 | "matrix_pins": { | ||
| 9 | "cols": ["C15", "C14", "C13", "C12", "C11", "C10", "C9", "C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0", "D2"], | ||
| 10 | "rows": ["B15", "B14", "B13", "B12", "B11", "B10"] | ||
| 11 | }, | ||
| 12 | "usb": { | ||
| 13 | "vid": "0x359B", | ||
| 14 | "pid": "0x0004", | ||
| 15 | "device_version": "1.0.0" | ||
| 16 | }, | ||
| 17 | "eeprom": { | ||
| 18 | "driver": "i2c" | ||
| 19 | }, | ||
| 20 | "features": { | ||
| 21 | "rgb_matrix": true, | ||
| 22 | "bootmagic": true, | ||
| 23 | "command": false, | ||
| 24 | "console": false, | ||
| 25 | "extrakey": true, | ||
| 26 | "mousekey": true, | ||
| 27 | "nkro": true | ||
| 28 | }, | ||
| 29 | "community_layouts": ["tkl_f13_ansi"], | ||
| 30 | "layouts": { | ||
| 31 | "LAYOUT_tkl_f13_ansi": { | ||
| 32 | "layout": [ | ||
| 33 | { "matrix": [0, 0], "label":"Esc", "x":0, "y":0}, | ||
| 34 | { "matrix": [0, 1], "label":"F1", "x":1.25, "y":0}, | ||
| 35 | { "matrix": [0, 2], "label":"F2", "x":2.25, "y":0}, | ||
| 36 | { "matrix": [0, 3], "label":"F3", "x":3.25, "y":0}, | ||
| 37 | { "matrix": [0, 4], "label":"F4", "x":4.25, "y":0}, | ||
| 38 | { "matrix": [0, 5], "label":"F5", "x":5.5, "y":0}, | ||
| 39 | { "matrix": [0, 6], "label":"F6", "x":6.5, "y":0}, | ||
| 40 | { "matrix": [0, 7], "label":"F7", "x":7.5, "y":0}, | ||
| 41 | { "matrix": [0, 8], "label":"F8", "x":8.5, "y":0}, | ||
| 42 | { "matrix": [0, 9], "label":"F9", "x":9.75, "y":0}, | ||
| 43 | { "matrix": [0, 10], "label":"F10", "x":10.75, "y":0}, | ||
| 44 | { "matrix": [0, 11], "label":"F11", "x":11.75, "y":0}, | ||
| 45 | { "matrix": [0, 12], "label":"F12", "x":12.75, "y":0}, | ||
| 46 | { "matrix": [0, 13], "label":"F13", "x":14, "y":0}, | ||
| 47 | { "matrix": [0, 14], "label":"PrtSc", "x":15.25, "y":0}, | ||
| 48 | { "matrix": [0, 15], "label":"ScrLk", "x":16.25, "y":0}, | ||
| 49 | { "matrix": [0, 16], "label":"Pause", "x":17.25, "y":0}, | ||
| 50 | |||
| 51 | { "matrix": [1, 0], "label":"~", "x":0, "y":1.25}, | ||
| 52 | { "matrix": [1, 1], "label":"!", "x":1, "y":1.25}, | ||
| 53 | { "matrix": [1, 2], "label":"@", "x":2, "y":1.25}, | ||
| 54 | { "matrix": [1, 3], "label":"#", "x":3, "y":1.25}, | ||
| 55 | { "matrix": [1, 4], "label":"$", "x":4, "y":1.25}, | ||
| 56 | { "matrix": [1, 5], "label":"%", "x":5, "y":1.25}, | ||
| 57 | { "matrix": [1, 6], "label":"^", "x":6, "y":1.25}, | ||
| 58 | { "matrix": [1, 7], "label":"&", "x":7, "y":1.25}, | ||
| 59 | { "matrix": [1, 8], "label":"*", "x":8, "y":1.25}, | ||
| 60 | { "matrix": [1, 9], "label":"(", "x":9, "y":1.25}, | ||
| 61 | { "matrix": [1, 10], "label":")", "x":10, "y":1.25}, | ||
| 62 | { "matrix": [1, 11], "label":"_", "x":11, "y":1.25}, | ||
| 63 | { "matrix": [1, 12], "label":"+", "x":12, "y":1.25}, | ||
| 64 | { "matrix": [1, 13], "label":"Bksp", "x":13, "y":1.25, "w":2}, | ||
| 65 | { "matrix": [1, 14], "label":"Insert", "x":15.25, "y":1.25}, | ||
| 66 | { "matrix": [1, 15], "label":"Home", "x":16.25, "y":1.25}, | ||
| 67 | { "matrix": [1, 16], "label":"Page Up", "x":17.25, "y":1.25}, | ||
| 68 | |||
| 69 | { "matrix": [2, 0], "label":"Tab", "x":0, "y":2.25, "w":1.5}, | ||
| 70 | { "matrix": [2, 1], "label":"Q", "x":1.5, "y":2.25}, | ||
| 71 | { "matrix": [2, 2], "label":"W", "x":2.5, "y":2.25}, | ||
| 72 | { "matrix": [2, 3], "label":"E", "x":3.5, "y":2.25}, | ||
| 73 | { "matrix": [2, 4], "label":"R", "x":4.5, "y":2.25}, | ||
| 74 | { "matrix": [2, 5], "label":"T", "x":5.5, "y":2.25}, | ||
| 75 | { "matrix": [2, 6], "label":"Y", "x":6.5, "y":2.25}, | ||
| 76 | { "matrix": [2, 7], "label":"U", "x":7.5, "y":2.25}, | ||
| 77 | { "matrix": [2, 8], "label":"I", "x":8.5, "y":2.25}, | ||
| 78 | { "matrix": [2, 9], "label":"O", "x":9.5, "y":2.25}, | ||
| 79 | { "matrix": [2, 10], "label":"P", "x":10.5, "y":2.25}, | ||
| 80 | { "matrix": [2, 11], "label":"{", "x":11.5, "y":2.25}, | ||
| 81 | { "matrix": [2, 12], "label":"}", "x":12.5, "y":2.25}, | ||
| 82 | { "matrix": [2, 13], "label":"|", "x":13.5, "y":2.25, "w":1.5}, | ||
| 83 | { "matrix": [2, 14], "label":"Delete", "x":15.25, "y":2.25}, | ||
| 84 | { "matrix": [2, 15], "label":"End", "x":16.25, "y":2.25}, | ||
| 85 | { "matrix": [2, 16], "label":"Page Dn", "x":17.25, "y":2.25}, | ||
| 86 | |||
| 87 | { "matrix": [3, 0], "label":"CapsLk", "x":0, "y":3.25, "w":1.75}, | ||
| 88 | { "matrix": [3, 1], "label":"A", "x":1.75, "y":3.25}, | ||
| 89 | { "matrix": [3, 2], "label":"S", "x":2.75, "y":3.25}, | ||
| 90 | { "matrix": [3, 3], "label":"D", "x":3.75, "y":3.25}, | ||
| 91 | { "matrix": [3, 4], "label":"F", "x":4.75, "y":3.25}, | ||
| 92 | { "matrix": [3, 5], "label":"G", "x":5.75, "y":3.25}, | ||
| 93 | { "matrix": [3, 6], "label":"H", "x":6.75, "y":3.25}, | ||
| 94 | { "matrix": [3, 7], "label":"J", "x":7.75, "y":3.25}, | ||
| 95 | { "matrix": [3, 8], "label":"K", "x":8.75, "y":3.25}, | ||
| 96 | { "matrix": [3, 9], "label":"L", "x":9.75, "y":3.25}, | ||
| 97 | { "matrix": [3, 10], "label":":", "x":10.75, "y":3.25}, | ||
| 98 | { "matrix": [3, 11], "label":"\"", "x":11.75, "y":3.25}, | ||
| 99 | { "matrix": [3, 13], "label":"Enter", "x":12.75, "y":3.25, "w":2.25}, | ||
| 100 | |||
| 101 | { "matrix": [4, 0], "label":"Shift", "x":0, "y":4.25, "w":2.25}, | ||
| 102 | { "matrix": [4, 1], "label":"Z", "x":2.25, "y":4.25}, | ||
| 103 | { "matrix": [4, 2], "label":"X", "x":3.25, "y":4.25}, | ||
| 104 | { "matrix": [4, 3], "label":"C", "x":4.25, "y":4.25}, | ||
| 105 | { "matrix": [4, 4], "label":"V", "x":5.25, "y":4.25}, | ||
| 106 | { "matrix": [4, 5], "label":"B", "x":6.25, "y":4.25}, | ||
| 107 | { "matrix": [4, 6], "label":"N", "x":7.25, "y":4.25}, | ||
| 108 | { "matrix": [4, 7], "label":"M", "x":8.25, "y":4.25}, | ||
| 109 | { "matrix": [4, 8], "label":"<", "x":9.25, "y":4.25}, | ||
| 110 | { "matrix": [4, 9], "label":">", "x":10.25, "y":4.25}, | ||
| 111 | { "matrix": [4, 10], "label":"?", "x":11.25, "y":4.25}, | ||
| 112 | { "matrix": [4, 12], "label":"Shift", "x":12.25, "y":4.25, "w":2.75}, | ||
| 113 | { "matrix": [4, 15], "label":"\u2191", "x":16.25, "y":4.25}, | ||
| 114 | |||
| 115 | { "matrix": [5, 0], "label":"Ctrl", "x":0, "y":5.25, "w":1.25}, | ||
| 116 | { "matrix": [5, 1], "label":"Win", "x":1.25, "y":5.25, "w":1.25}, | ||
| 117 | { "matrix": [5, 2], "label":"Alt", "x":2.5, "y":5.25, "w":1.25}, | ||
| 118 | { "matrix": [5, 6], "label":" ", "x":3.75, "y":5.25, "w":6.25}, | ||
| 119 | { "matrix": [5, 10], "label":"Alt", "x":10, "y":5.25, "w":1.25}, | ||
| 120 | { "matrix": [5, 11], "label":"Fn", "x":11.25, "y":5.25, "w":1.25}, | ||
| 121 | { "matrix": [5, 12], "label":"Menu", "x":12.5, "y":5.25, "w":1.25}, | ||
| 122 | { "matrix": [5, 13], "label":"Ctrl", "x":13.75, "y":5.25, "w":1.25}, | ||
| 123 | { "matrix": [5, 14], "label":"\u2190", "x":15.25, "y":5.25}, | ||
| 124 | { "matrix": [5, 15], "label":"\u2193", "x":16.25, "y":5.25}, | ||
| 125 | { "matrix": [5, 16], "label":"\u2192", "x":17.25, "y":5.25} | ||
| 126 | ] | ||
| 127 | } | ||
| 128 | }, | ||
| 129 | "rgb_matrix": { | ||
| 130 | "driver": "is31fl3733", | ||
| 131 | "animations": { | ||
| 132 | "alphas_mods": true, | ||
| 133 | "gradient_up_down": true, | ||
| 134 | "gradient_left_right": true, | ||
| 135 | "breathing": true, | ||
| 136 | "band_sat": true, | ||
| 137 | "band_val": true, | ||
| 138 | "band_pinwheel_sat": true, | ||
| 139 | "band_pinwheel_val": true, | ||
| 140 | "band_spiral_sat": true, | ||
| 141 | "band_spiral_val": true, | ||
| 142 | "cycle_all": true, | ||
| 143 | "cycle_left_right": true, | ||
| 144 | "cycle_up_down": true, | ||
| 145 | "cycle_out_in": true, | ||
| 146 | "cycle_out_in_dual": true, | ||
| 147 | "rainbow_moving_chevron": true, | ||
| 148 | "cycle_pinwheel": true, | ||
| 149 | "cycle_spiral": true, | ||
| 150 | "dual_beacon": true, | ||
| 151 | "rainbow_beacon": true, | ||
| 152 | "rainbow_pinwheels": true, | ||
| 153 | "raindrops": true, | ||
| 154 | "jellybean_raindrops": true, | ||
| 155 | "hue_breathing": true, | ||
| 156 | "hue_pendulum": true, | ||
| 157 | "hue_wave": true, | ||
| 158 | "pixel_fractal": true, | ||
| 159 | "pixel_flow": true, | ||
| 160 | "pixel_rain": true, | ||
| 161 | "typing_heatmap": true, | ||
| 162 | "digital_rain": true, | ||
| 163 | "solid_reactive_simple": true, | ||
| 164 | "solid_reactive": true, | ||
| 165 | "solid_reactive_wide": true, | ||
| 166 | "solid_reactive_multiwide": true, | ||
| 167 | "solid_reactive_cross": true, | ||
| 168 | "solid_reactive_multicross": true, | ||
| 169 | "solid_reactive_nexus": true, | ||
| 170 | "solid_reactive_multinexus": true, | ||
| 171 | "splash": true, | ||
| 172 | "multisplash": true, | ||
| 173 | "solid_splash": true, | ||
| 174 | "solid_multisplash": true | ||
| 175 | }, | ||
| 176 | "layout": [ | ||
| 177 | { "flags": 4, "matrix": [0, 0], "x": 6, "y": 8 }, | ||
| 178 | { "flags": 4, "matrix": [0, 1], "x": 21, "y": 8 }, | ||
| 179 | { "flags": 4, "matrix": [0, 2], "x": 33, "y": 8 }, | ||
| 180 | { "flags": 4, "matrix": [0, 3], "x": 45, "y": 8 }, | ||
| 181 | { "flags": 4, "matrix": [0, 4], "x": 57, "y": 8 }, | ||
| 182 | { "flags": 4, "matrix": [0, 5], "x": 74, "y": 8 }, | ||
| 183 | { "flags": 4, "matrix": [0, 6], "x": 86, "y": 8 }, | ||
| 184 | { "flags": 4, "matrix": [0, 7], "x": 98, "y": 8 }, | ||
| 185 | { "flags": 4, "matrix": [0, 8], "x": 110, "y": 8 }, | ||
| 186 | { "flags": 4, "matrix": [0, 9], "x": 125, "y": 8 }, | ||
| 187 | { "flags": 4, "matrix": [0, 10], "x": 137, "y": 8 }, | ||
| 188 | { "flags": 4, "matrix": [0, 11], "x": 150, "y": 8 }, | ||
| 189 | { "flags": 4, "matrix": [0, 12], "x": 161, "y": 8 }, | ||
| 190 | { "flags": 4, "matrix": [0, 13], "x": 176, "y": 8 }, | ||
| 191 | { "flags": 4, "matrix": [0, 14], "x": 192, "y": 8 }, | ||
| 192 | { "flags": 4, "matrix": [0, 15], "x": 204, "y": 8 }, | ||
| 193 | |||
| 194 | { "flags": 4, "matrix": [1, 0], "x": 6, "y": 21 }, | ||
| 195 | { "flags": 4, "matrix": [1, 1], "x": 18, "y": 21 }, | ||
| 196 | { "flags": 4, "matrix": [1, 2], "x": 37, "y": 21 }, | ||
| 197 | { "flags": 4, "matrix": [1, 3], "x": 43, "y": 21 }, | ||
| 198 | { "flags": 4, "matrix": [1, 4], "x": 55, "y": 21 }, | ||
| 199 | { "flags": 4, "matrix": [1, 5], "x": 67, "y": 21 }, | ||
| 200 | { "flags": 4, "matrix": [1, 6], "x": 79, "y": 21 }, | ||
| 201 | { "flags": 4, "matrix": [1, 7], "x": 92, "y": 21 }, | ||
| 202 | { "flags": 4, "matrix": [1, 8], "x": 104, "y": 21 }, | ||
| 203 | { "flags": 4, "matrix": [1, 9], "x": 116, "y": 21 }, | ||
| 204 | { "flags": 4, "matrix": [1, 10], "x": 128, "y": 21 }, | ||
| 205 | { "flags": 4, "matrix": [1, 11], "x": 141, "y": 21 }, | ||
| 206 | { "flags": 4, "matrix": [1, 12], "x": 153, "y": 21 }, | ||
| 207 | { "flags": 4, "matrix": [1, 13], "x": 171, "y": 21 }, | ||
| 208 | { "flags": 4, "matrix": [1, 14], "x": 192, "y": 21 }, | ||
| 209 | { "flags": 4, "matrix": [1, 15], "x": 204, "y": 21 }, | ||
| 210 | |||
| 211 | { "flags": 4, "matrix": [2, 0], "x": 9, "y": 31 }, | ||
| 212 | { "flags": 4, "matrix": [2, 1], "x": 24, "y": 31 }, | ||
| 213 | { "flags": 4, "matrix": [2, 2], "x": 36, "y": 31 }, | ||
| 214 | { "flags": 4, "matrix": [2, 3], "x": 48, "y": 31 }, | ||
| 215 | { "flags": 4, "matrix": [2, 4], "x": 61, "y": 31 }, | ||
| 216 | { "flags": 4, "matrix": [2, 5], "x": 73, "y": 31 }, | ||
| 217 | { "flags": 4, "matrix": [2, 6], "x": 86, "y": 31 }, | ||
| 218 | { "flags": 4, "matrix": [2, 7], "x": 98, "y": 31 }, | ||
| 219 | { "flags": 4, "matrix": [2, 8], "x": 110, "y": 31 }, | ||
| 220 | { "flags": 4, "matrix": [2, 9], "x": 122, "y": 31 }, | ||
| 221 | { "flags": 4, "matrix": [2, 10], "x": 134, "y": 31 }, | ||
| 222 | { "flags": 4, "matrix": [2, 11], "x": 146, "y": 31 }, | ||
| 223 | { "flags": 4, "matrix": [2, 12], "x": 159, "y": 31 }, | ||
| 224 | { "flags": 4, "matrix": [2, 13], "x": 174, "y": 31 }, | ||
| 225 | { "flags": 4, "matrix": [2, 14], "x": 192, "y": 31 }, | ||
| 226 | { "flags": 4, "matrix": [2, 15], "x": 204, "y": 31 }, | ||
| 227 | |||
| 228 | { "flags": 4, "matrix": [3, 0], "x": 11, "y": 41 }, | ||
| 229 | { "flags": 4, "matrix": [3, 1], "x": 27, "y": 41 }, | ||
| 230 | { "flags": 4, "matrix": [3, 2], "x": 40, "y": 41 }, | ||
| 231 | { "flags": 4, "matrix": [3, 3], "x": 52, "y": 41 }, | ||
| 232 | { "flags": 4, "matrix": [3, 4], "x": 64, "y": 41 }, | ||
| 233 | { "flags": 4, "matrix": [3, 5], "x": 76, "y": 41 }, | ||
| 234 | { "flags": 4, "matrix": [3, 6], "x": 88, "y": 41 }, | ||
| 235 | { "flags": 4, "matrix": [3, 7], "x": 100, "y": 41 }, | ||
| 236 | { "flags": 4, "matrix": [3, 8], "x": 113, "y": 41 }, | ||
| 237 | { "flags": 4, "matrix": [3, 9], "x": 124, "y": 41 }, | ||
| 238 | { "flags": 4, "matrix": [3, 10], "x": 137, "y": 41 }, | ||
| 239 | { "flags": 4, "matrix": [3, 11], "x": 150, "y": 41 }, | ||
| 240 | { "flags": 4, "matrix": [3, 12], "x": 170, "y": 41 }, | ||
| 241 | { "flags": 4, "matrix": [0, 16], "x": 217, "y": 8 }, | ||
| 242 | { "flags": 4, "matrix": [1, 16], "x": 217, "y": 21 }, | ||
| 243 | { "flags": 4, "matrix": [2, 16], "x": 217, "y": 31 }, | ||
| 244 | |||
| 245 | { "flags": 4, "matrix": [4, 0], "x": 13, "y": 51 }, | ||
| 246 | { "flags": 4, "matrix": [4, 1], "x": 34, "y": 51 }, | ||
| 247 | { "flags": 4, "matrix": [4, 2], "x": 45, "y": 51 }, | ||
| 248 | { "flags": 4, "matrix": [4, 3], "x": 58, "y": 51 }, | ||
| 249 | { "flags": 4, "matrix": [4, 4], "x": 70, "y": 51 }, | ||
| 250 | { "flags": 4, "matrix": [4, 5], "x": 82, "y": 51 }, | ||
| 251 | { "flags": 4, "matrix": [4, 6], "x": 94, "y": 51 }, | ||
| 252 | { "flags": 4, "matrix": [4, 7], "x": 107, "y": 51 }, | ||
| 253 | { "flags": 4, "matrix": [4, 8], "x": 119, "y": 51 }, | ||
| 254 | { "flags": 4, "matrix": [4, 9], "x": 131, "y": 51 }, | ||
| 255 | { "flags": 4, "matrix": [4, 10], "x": 143, "y": 51 }, | ||
| 256 | { "flags": 4, "matrix": [4, 12], "x": 166, "y": 51 }, | ||
| 257 | { "flags": 4, "matrix": [4, 15], "x": 204, "y": 51 }, | ||
| 258 | |||
| 259 | { "flags": 4, "matrix": [5, 0], "x": 8, "y": 61 }, | ||
| 260 | { "flags": 4, "matrix": [5, 1], "x": 23, "y": 61 }, | ||
| 261 | { "flags": 4, "matrix": [5, 2], "x": 38, "y": 61 }, | ||
| 262 | { "flags": 4, "matrix": [5, 6], "x": 84, "y": 61 }, | ||
| 263 | { "flags": 4, "matrix": [5, 10], "x": 129, "y": 61 }, | ||
| 264 | { "flags": 4, "matrix": [5, 11], "x": 144, "y": 61 }, | ||
| 265 | { "flags": 4, "matrix": [5, 12], "x": 160, "y": 61 }, | ||
| 266 | { "flags": 4, "matrix": [5, 13], "x": 175, "y": 61 }, | ||
| 267 | { "flags": 4, "matrix": [5, 14], "x": 192, "y": 61 }, | ||
| 268 | { "flags": 4, "matrix": [5, 15], "x": 204, "y": 61 }, | ||
| 269 | { "flags": 4, "matrix": [5, 16], "x": 217, "y": 61 } | ||
| 270 | ] | ||
| 271 | } | ||
| 272 | } | ||
diff --git a/keyboards/drop/cstm80/keymaps/default/keymap.c b/keyboards/drop/cstm80/keymaps/default/keymap.c new file mode 100644 index 0000000000..e820a0a743 --- /dev/null +++ b/keyboards/drop/cstm80/keymaps/default/keymap.c | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | // Copyright 2023 Massdrop, Inc. | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | #include QMK_KEYBOARD_H | ||
| 4 | |||
| 5 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 6 | /* | ||
| 7 | * ┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐┌───┬───┬───┐ | ||
| 8 | * │Esc││F1 │F2 │F3 │F4 ││F5 │F6 │F7 │F8 ││F9 │F10│F11│F12││F13││PSc│Scr│Pse│ | ||
| 9 | * └───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘└───┴───┴───┘ | ||
| 10 | * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ | ||
| 11 | * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp││Ins│Hom│PgU│ | ||
| 12 | * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ | ||
| 13 | * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ ││Del│End│PgD│ | ||
| 14 | * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘ | ||
| 15 | * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ | ||
| 16 | * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ | ||
| 17 | * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ | ||
| 18 | * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ | ||
| 19 | * │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl││ ← │ ↓ │ → │ | ||
| 20 | * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ | ||
| 21 | */ | ||
| 22 | [0] = LAYOUT_tkl_f13_ansi( | ||
| 23 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR, KC_SCRL, KC_PAUS, | ||
| 24 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, | ||
| 25 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, | ||
| 26 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | ||
| 27 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, | ||
| 28 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 29 | ), | ||
| 30 | [1] = LAYOUT_tkl_f13_ansi( | ||
| 31 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 32 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, | ||
| 33 | _______, RGB_TOG, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 34 | _______, RGB_MOD, RGB_VAD, RGB_SPD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, | ||
| 35 | _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,_______, NK_TOGG, _______, _______, _______, _______, _______, _______, | ||
| 36 | _______, _______, _______, EE_CLR, _______, _______, _______, _______, _______, _______, _______ | ||
| 37 | ) | ||
| 38 | }; | ||
diff --git a/keyboards/drop/cstm80/keymaps/via/config.h b/keyboards/drop/cstm80/keymaps/via/config.h new file mode 100644 index 0000000000..616f8e3291 --- /dev/null +++ b/keyboards/drop/cstm80/keymaps/via/config.h | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | // Copyright 2023 Massdrop, Inc. | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | #pragma once | ||
| 4 | |||
| 5 | #define DYNAMIC_KEYMAP_LAYER_COUNT 8 | ||
diff --git a/keyboards/drop/cstm80/keymaps/via/keymap.c b/keyboards/drop/cstm80/keymaps/via/keymap.c new file mode 100644 index 0000000000..e820a0a743 --- /dev/null +++ b/keyboards/drop/cstm80/keymaps/via/keymap.c | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | // Copyright 2023 Massdrop, Inc. | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | #include QMK_KEYBOARD_H | ||
| 4 | |||
| 5 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 6 | /* | ||
| 7 | * ┌───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┬───┬───┬───┐┌───┐┌───┬───┬───┐ | ||
| 8 | * │Esc││F1 │F2 │F3 │F4 ││F5 │F6 │F7 │F8 ││F9 │F10│F11│F12││F13││PSc│Scr│Pse│ | ||
| 9 | * └───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┴───┴───┴───┘└───┘└───┴───┴───┘ | ||
| 10 | * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐┌───┬───┬───┐ | ||
| 11 | * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp││Ins│Hom│PgU│ | ||
| 12 | * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤├───┼───┼───┤ | ||
| 13 | * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ ││Del│End│PgD│ | ||
| 14 | * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤└───┴───┴───┘ | ||
| 15 | * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ | ||
| 16 | * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ ┌───┐ | ||
| 17 | * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ | ||
| 18 | * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤┌───┼───┼───┐ | ||
| 19 | * │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl││ ← │ ↓ │ → │ | ||
| 20 | * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘└───┴───┴───┘ | ||
| 21 | */ | ||
| 22 | [0] = LAYOUT_tkl_f13_ansi( | ||
| 23 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR, KC_SCRL, KC_PAUS, | ||
| 24 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, | ||
| 25 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, | ||
| 26 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | ||
| 27 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, | ||
| 28 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 29 | ), | ||
| 30 | [1] = LAYOUT_tkl_f13_ansi( | ||
| 31 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 32 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT, _______, _______, _______, | ||
| 33 | _______, RGB_TOG, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 34 | _______, RGB_MOD, RGB_VAD, RGB_SPD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, | ||
| 35 | _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,_______, NK_TOGG, _______, _______, _______, _______, _______, _______, | ||
| 36 | _______, _______, _______, EE_CLR, _______, _______, _______, _______, _______, _______, _______ | ||
| 37 | ) | ||
| 38 | }; | ||
diff --git a/keyboards/drop/cstm80/keymaps/via/rules.mk b/keyboards/drop/cstm80/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/drop/cstm80/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
diff --git a/keyboards/drop/cstm80/mcuconf.h b/keyboards/drop/cstm80/mcuconf.h new file mode 100644 index 0000000000..819aa70bf7 --- /dev/null +++ b/keyboards/drop/cstm80/mcuconf.h | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | // Copyright 2023 Massdrop, Inc. | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | #pragma once | ||
| 4 | |||
| 5 | #include_next <mcuconf.h> | ||
| 6 | |||
| 7 | #undef STM32_PLLM_VALUE | ||
| 8 | #define STM32_PLLM_VALUE 16 | ||
| 9 | |||
| 10 | #undef STM32_PREDIV_VALUE | ||
| 11 | #define STM32_PREDIV_VALUE 2 | ||
| 12 | |||
| 13 | #undef STM32_I2C_USE_I2C1 | ||
| 14 | #define STM32_I2C_USE_I2C1 TRUE | ||
diff --git a/keyboards/drop/cstm80/readme.md b/keyboards/drop/cstm80/readme.md new file mode 100644 index 0000000000..f0851cc045 --- /dev/null +++ b/keyboards/drop/cstm80/readme.md | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | # CSTM80 | ||
| 2 | |||
| 3 | The CSTM80 is a tenkeyless keyboard with customizable switch plates and weights, as well as a magnetically attached top case. | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [zvecr](https://github.com/zvecr) | ||
| 6 | * Hardware Availability: [Drop CSTM80 Mechanical Keyboard](https://drop.com/buy/drop-cstm80-mechanical-keyboard) | ||
| 7 | |||
| 8 | Make example for this keyboard (after setting up your build environment): | ||
| 9 | |||
| 10 | make drop/cstm80:default | ||
| 11 | |||
| 12 | Flashing example for this keyboard: | ||
| 13 | |||
| 14 | make drop/cstm80:default:flash | ||
| 15 | |||
| 16 | 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). | ||
| 17 | |||
| 18 | ## Bootloader | ||
| 19 | |||
| 20 | Enter the bootloader in 3 ways: | ||
| 21 | |||
| 22 | * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard | ||
| 23 | * **Physical reset button**: Quickly double tap the button located under the spacebar | ||
| 24 | * **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available | ||
diff --git a/keyboards/drop/cstm80/rules.mk b/keyboards/drop/cstm80/rules.mk new file mode 100644 index 0000000000..21d76468cf --- /dev/null +++ b/keyboards/drop/cstm80/rules.mk | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | UF2_DEVICE_TYPE_ID = 0x8bfa7750 | ||
| 2 | UF2CONV_ARGS = --device-type $(UF2_DEVICE_TYPE_ID) | ||
| 3 | |||
| 4 | SRC += lib/common.c | ||
diff --git a/keyboards/drop/lib/common.c b/keyboards/drop/lib/common.c index b393e7650b..04845ed17a 100644 --- a/keyboards/drop/lib/common.c +++ b/keyboards/drop/lib/common.c | |||
| @@ -5,17 +5,15 @@ | |||
| 5 | # include "quantum.h" | 5 | # include "quantum.h" |
| 6 | # include "rgb_matrix.h" | 6 | # include "rgb_matrix.h" |
| 7 | 7 | ||
| 8 | # define LED_FLAG_ANY_SWITCH (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR) | ||
| 9 | |||
| 10 | # ifdef RGB_MATRIX_CAPS_LOCK_INDEX | 8 | # ifdef RGB_MATRIX_CAPS_LOCK_INDEX |
| 11 | bool rgb_matrix_indicators_kb(void) { | 9 | bool rgb_matrix_indicators_kb(void) { |
| 12 | if (!rgb_matrix_indicators_user()) { | 10 | if (!rgb_matrix_indicators_user()) { |
| 13 | return false; | 11 | return false; |
| 14 | } | 12 | } |
| 15 | 13 | ||
| 16 | if (host_keyboard_led_state().caps_lock) { | 14 | if (host_keyboard_led_state().caps_lock && (rgb_matrix_get_flags() != LED_FLAG_NONE)) { |
| 17 | rgb_matrix_set_color(RGB_MATRIX_CAPS_LOCK_INDEX, RGB_WHITE); | 15 | rgb_matrix_set_color(RGB_MATRIX_CAPS_LOCK_INDEX, RGB_WHITE); |
| 18 | } else if ((rgb_matrix_get_flags() & LED_FLAG_ANY_SWITCH) == 0) { | 16 | } else if (rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) { |
| 19 | rgb_matrix_set_color(RGB_MATRIX_CAPS_LOCK_INDEX, RGB_OFF); | 17 | rgb_matrix_set_color(RGB_MATRIX_CAPS_LOCK_INDEX, RGB_OFF); |
| 20 | } | 18 | } |
| 21 | return true; | 19 | return true; |
| @@ -33,9 +31,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
| 33 | case RGB_TOG: | 31 | case RGB_TOG: |
| 34 | switch (rgb_matrix_get_flags()) { | 32 | switch (rgb_matrix_get_flags()) { |
| 35 | case LED_FLAG_ALL: | 33 | case LED_FLAG_ALL: |
| 36 | rgb_matrix_set_flags(LED_FLAG_ANY_SWITCH); | 34 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); |
| 37 | break; | 35 | break; |
| 38 | case LED_FLAG_ANY_SWITCH: | 36 | case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): |
| 39 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | 37 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); |
| 40 | break; | 38 | break; |
| 41 | case LED_FLAG_UNDERGLOW: | 39 | case LED_FLAG_UNDERGLOW: |
