diff options
| author | Alin Marin Elena <alin@elena.space> | 2022-02-07 21:31:51 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-07 13:31:51 -0800 |
| commit | 837205b08faeb5ec4b8bb5a3a380b6459cdef834 (patch) | |
| tree | 4e556fcb2e5450f2a385b26491800ddd33712dab /keyboards | |
| parent | 67d10cbc7e074d441103363658845f4430c51fdd (diff) | |
| download | qmk_firmware-837205b08faeb5ec4b8bb5a3a380b6459cdef834.tar.gz qmk_firmware-837205b08faeb5ec4b8bb5a3a380b6459cdef834.zip | |
[Keyboard] M60 split 5x12 lego pcb (#14383)
* add m60 lego case in split, with stm32f401 and 411
* Update keyboards/mlego/m60_split/m60_split.h
* Update keyboards/mlego/m60_split/rev1/config.h
* Update keyboards/mlego/m60_split/rev2/config.h
* address the moving of enum in keymaps
Diffstat (limited to 'keyboards')
| -rw-r--r-- | keyboards/mlego/m60_split/config.h | 37 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/info.json | 11 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/keymaps/default/config.h | 21 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/keymaps/default/keymap.c | 193 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/keymaps/via/config.h | 20 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/keymaps/via/keymap.c | 185 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/keymaps/via/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/m60_split.c | 17 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/m60_split.h | 57 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/readme.md | 67 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/rev1/config.h | 86 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/rev1/halconf.h | 30 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/rev1/mcuconf.h | 30 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/rev1/rules.mk | 24 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/rev2/config.h | 82 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/rev2/halconf.h | 30 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/rev2/mcuconf.h | 30 | ||||
| -rw-r--r-- | keyboards/mlego/m60_split/rev2/rules.mk | 23 |
18 files changed, 944 insertions, 0 deletions
diff --git a/keyboards/mlego/m60_split/config.h b/keyboards/mlego/m60_split/config.h new file mode 100644 index 000000000..6750d4d40 --- /dev/null +++ b/keyboards/mlego/m60_split/config.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* Copyright 2021-2022 alin m elena <alinm.elena@gmail.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #include "config_common.h" | ||
| 19 | |||
| 20 | /* USB Device descriptor parameter */ | ||
| 21 | #define VENDOR_ID 0xBABA | ||
| 22 | #define MANUFACTURER alin elena | ||
| 23 | #define PRODUCT m60_split | ||
| 24 | |||
| 25 | #define MATRIX_ROWS 10 // Rows are doubled-up | ||
| 26 | #define MATRIX_COLS 6 | ||
| 27 | |||
| 28 | #define DEBOUNCE 5 | ||
| 29 | |||
| 30 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 31 | #define LOCKING_SUPPORT_ENABLE | ||
| 32 | /* Locking resynchronize hack */ | ||
| 33 | #define LOCKING_RESYNC_ENABLE | ||
| 34 | |||
| 35 | /* disable these deprecated features by default */ | ||
| 36 | #define NO_ACTION_MACRO | ||
| 37 | #define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/mlego/m60_split/info.json b/keyboards/mlego/m60_split/info.json new file mode 100644 index 000000000..ad1f8f4bc --- /dev/null +++ b/keyboards/mlego/m60_split/info.json | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "mlego/m60_split", | ||
| 3 | "keyboard_folder": "mlego/m60_split", | ||
| 4 | "url": "https://gitlab.com/m-lego/m65", | ||
| 5 | "maintainer": "alin elena", | ||
| 6 | "layouts": { | ||
| 7 | "LAYOUT_ortho_5x12": { | ||
| 8 | "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}] | ||
| 9 | } | ||
| 10 | } | ||
| 11 | } | ||
diff --git a/keyboards/mlego/m60_split/keymaps/default/config.h b/keyboards/mlego/m60_split/keymaps/default/config.h new file mode 100644 index 000000000..b1aed18a1 --- /dev/null +++ b/keyboards/mlego/m60_split/keymaps/default/config.h | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #define TAPPING_TOGGLE 2 | ||
| 21 | #define UNICODE_SELECTED_MODES UC_LNX, UC_MAC, UC_WINC | ||
diff --git a/keyboards/mlego/m60_split/keymaps/default/keymap.c b/keyboards/mlego/m60_split/keymaps/default/keymap.c new file mode 100644 index 000000000..5e3912b0b --- /dev/null +++ b/keyboards/mlego/m60_split/keymaps/default/keymap.c | |||
| @@ -0,0 +1,193 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | enum layer_names { | ||
| 21 | _QW = 0, | ||
| 22 | _LWR, | ||
| 23 | _RSE, | ||
| 24 | _ADJ | ||
| 25 | }; | ||
| 26 | |||
| 27 | #define LOWER TT(_LWR) | ||
| 28 | #define RAISE TT(_RSE) | ||
| 29 | |||
| 30 | #ifdef RGBLIGHT_ENABLE | ||
| 31 | |||
| 32 | const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_PURPLE}); | ||
| 33 | const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_CYAN}); | ||
| 34 | const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_RED}); | ||
| 35 | const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_GREEN}); | ||
| 36 | |||
| 37 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_qwerty_layer, my_lwr_layer, my_rse_layer, my_adj_layer); | ||
| 38 | #endif | ||
| 39 | |||
| 40 | // clang-format off | ||
| 41 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 42 | [_QW] = LAYOUT_ortho_5x12( | ||
| 43 | |||
| 44 | KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPC, | ||
| 45 | KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_DEL , | ||
| 46 | KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, | ||
| 47 | KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_ENT , | ||
| 48 | KC_LCTL, KC_LGUI, KC_LALT, KC_APP, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT | ||
| 49 | |||
| 50 | ), | ||
| 51 | |||
| 52 | [_LWR] = LAYOUT_ortho_5x12( | ||
| 53 | |||
| 54 | KC_TILD, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR , KC_ASTR , KC_LPRN, KC_RPRN, KC_DEL , | ||
| 55 | KC_DEL , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_UNDS , KC_PLUS , KC_LCBR, KC_RCBR, KC_PIPE, | ||
| 56 | _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , S(KC_NUHS), S(KC_NUBS), _______, _______, _______, | ||
| 57 | _______, _______, _______, _______, _______, _______, _______, _______ , KC_MNXT , KC_VOLD, KC_VOLU, KC_MPLY, | ||
| 58 | _______, _______, _______, _______, _______, _______, _______, _______ , _______ , _______, _______, _______ | ||
| 59 | |||
| 60 | ), | ||
| 61 | |||
| 62 | [_RSE] = LAYOUT_ortho_5x12( | ||
| 63 | |||
| 64 | KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL , | ||
| 65 | KC_DEL , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, KC_BSLS, | ||
| 66 | _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_NUHS, KC_NUBS, _______, _______, _______, | ||
| 67 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, | ||
| 68 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 69 | |||
| 70 | ), | ||
| 71 | |||
| 72 | [_ADJ] = LAYOUT_ortho_5x12( | ||
| 73 | |||
| 74 | _______, RESET , _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_RMOD, RGB_M_G, RESET , _______, | ||
| 75 | _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI , _______, _______, _______, | ||
| 76 | _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD , _______, _______, _______, | ||
| 77 | _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______, | ||
| 78 | _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, _______ | ||
| 79 | |||
| 80 | ) | ||
| 81 | |||
| 82 | }; | ||
| 83 | // clang-format on | ||
| 84 | |||
| 85 | // let us assume we start with both layers off | ||
| 86 | bool toggle_lwr = false; | ||
| 87 | bool toggle_rse = false; | ||
| 88 | |||
| 89 | bool led_update_user(led_t led_state) { | ||
| 90 | // Disable the default LED update code, so that lock LEDs could be reused to show layer status. | ||
| 91 | return false; | ||
| 92 | } | ||
| 93 | |||
| 94 | void matrix_scan_user(void) { | ||
| 95 | led_lwr(toggle_lwr); | ||
| 96 | led_rse(toggle_rse); | ||
| 97 | led_t led_state = host_keyboard_led_state(); | ||
| 98 | led_caps(led_state.caps_lock); | ||
| 99 | if (layer_state_is(_ADJ)) { | ||
| 100 | led_lwr(true); | ||
| 101 | led_rse(true); | ||
| 102 | } | ||
| 103 | } | ||
| 104 | |||
| 105 | void matrix_slave_scan_user(void) { | ||
| 106 | matrix_scan_user(); | ||
| 107 | if (IS_LAYER_ON(_LWR)) { | ||
| 108 | led_lwr(layer_state_is(_LWR)); | ||
| 109 | } | ||
| 110 | if (IS_LAYER_ON(_RSE)) { | ||
| 111 | led_rse(layer_state_is(_RSE)); | ||
| 112 | } | ||
| 113 | } | ||
| 114 | |||
| 115 | bool process_record_user(uint16_t keycode, keyrecord_t* record) { | ||
| 116 | switch (keycode) { | ||
| 117 | case (TT(_LWR)): | ||
| 118 | if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) { | ||
| 119 | // This runs before the TT() handler toggles the layer state, so the current layer state is the opposite of the final one after toggle. | ||
| 120 | toggle_lwr = !layer_state_is(_LWR); | ||
| 121 | } | ||
| 122 | return true; | ||
| 123 | break; | ||
| 124 | case (TT(_RSE)): | ||
| 125 | if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { | ||
| 126 | toggle_rse = !layer_state_is(_RSE); | ||
| 127 | } | ||
| 128 | return true; | ||
| 129 | break; | ||
| 130 | default: | ||
| 131 | return true; | ||
| 132 | } | ||
| 133 | } | ||
| 134 | |||
| 135 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 136 | #ifdef RGBLIGHT_ENABLE | ||
| 137 | |||
| 138 | rgblight_set_layer_state(0, layer_state_cmp(state, _QW)); | ||
| 139 | rgblight_set_layer_state(1, layer_state_cmp(state, _LWR)); | ||
| 140 | rgblight_set_layer_state(2, layer_state_cmp(state, _RSE)); | ||
| 141 | rgblight_set_layer_state(3, layer_state_cmp(state, _ADJ)); | ||
| 142 | |||
| 143 | #endif | ||
| 144 | return update_tri_layer_state(state, _LWR, _RSE, _ADJ); | ||
| 145 | } | ||
| 146 | |||
| 147 | #ifdef RGBLIGHT_ENABLE | ||
| 148 | |||
| 149 | layer_state_t default_layer_state_set_user(layer_state_t state) { | ||
| 150 | rgblight_set_layer_state(0, layer_state_cmp(state, _QW)); | ||
| 151 | return state; | ||
| 152 | } | ||
| 153 | |||
| 154 | void keyboard_post_init_user(void) { | ||
| 155 | // Enable the LED layers | ||
| 156 | rgblight_layers = my_rgb_layers; | ||
| 157 | } | ||
| 158 | #endif | ||
| 159 | |||
| 160 | #ifdef ENCODER_ENABLE | ||
| 161 | |||
| 162 | # define MEDIA_KEY_DELAY 10 | ||
| 163 | |||
| 164 | static inline void my_encoders(const uint8_t index, const bool clockwise) { | ||
| 165 | if (index == 0 || (index == 1)) { /* First encoder on each side*/ | ||
| 166 | if (IS_LAYER_ON(_LWR)) { | ||
| 167 | if (clockwise) { | ||
| 168 | rgblight_decrease_val_noeeprom(); | ||
| 169 | } else { | ||
| 170 | rgblight_increase_val_noeeprom(); | ||
| 171 | } | ||
| 172 | } else if (IS_LAYER_ON(_RSE)) { | ||
| 173 | if (clockwise) { | ||
| 174 | rgblight_decrease_hue_noeeprom(); | ||
| 175 | } else { | ||
| 176 | rgblight_increase_hue_noeeprom(); | ||
| 177 | } | ||
| 178 | |||
| 179 | } else { | ||
| 180 | if (clockwise) { | ||
| 181 | tap_code_delay(KC_VOLD, MEDIA_KEY_DELAY); | ||
| 182 | } else { | ||
| 183 | tap_code_delay(KC_VOLU, MEDIA_KEY_DELAY); | ||
| 184 | } | ||
| 185 | } | ||
| 186 | } | ||
| 187 | } | ||
| 188 | |||
| 189 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 190 | my_encoders(index, clockwise); | ||
| 191 | return true; | ||
| 192 | } | ||
| 193 | #endif | ||
diff --git a/keyboards/mlego/m60_split/keymaps/via/config.h b/keyboards/mlego/m60_split/keymaps/via/config.h new file mode 100644 index 000000000..637c0a8fa --- /dev/null +++ b/keyboards/mlego/m60_split/keymaps/via/config.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #define TAPPING_TOGGLE 2 | ||
diff --git a/keyboards/mlego/m60_split/keymaps/via/keymap.c b/keyboards/mlego/m60_split/keymaps/via/keymap.c new file mode 100644 index 000000000..ccb010474 --- /dev/null +++ b/keyboards/mlego/m60_split/keymaps/via/keymap.c | |||
| @@ -0,0 +1,185 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021-2022 Alin M Elena <alinm.elena@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | enum layer_names { | ||
| 21 | _QW = 0, | ||
| 22 | _LWR, | ||
| 23 | _RSE, | ||
| 24 | _ADJ | ||
| 25 | }; | ||
| 26 | |||
| 27 | #define LOWER TT(_LWR) | ||
| 28 | #define RAISE TT(_RSE) | ||
| 29 | |||
| 30 | #ifdef RGBLIGHT_ENABLE | ||
| 31 | |||
| 32 | const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_PURPLE}); | ||
| 33 | const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_CYAN}); | ||
| 34 | const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_RED}); | ||
| 35 | const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_GREEN}); | ||
| 36 | |||
| 37 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_qwerty_layer, my_lwr_layer, my_rse_layer, my_adj_layer); | ||
| 38 | #endif | ||
| 39 | |||
| 40 | // clang-format off | ||
| 41 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 42 | [_QW] = LAYOUT_ortho_5x12( | ||
| 43 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
| 44 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, | ||
| 45 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
| 46 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , | ||
| 47 | KC_LCTL, KC_LGUI, KC_LALT, KC_APP, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
| 48 | ), | ||
| 49 | |||
| 50 | [_LWR] = LAYOUT_ortho_5x12( | ||
| 51 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, | ||
| 52 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, | ||
| 53 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, | ||
| 54 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, | ||
| 55 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 56 | ), | ||
| 57 | |||
| 58 | [_RSE] = LAYOUT_ortho_5x12( | ||
| 59 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, | ||
| 60 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | ||
| 61 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, | ||
| 62 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, | ||
| 63 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 64 | ), | ||
| 65 | |||
| 66 | [_ADJ] = LAYOUT_ortho_5x12( | ||
| 67 | _______, RESET, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_M_G, RESET, _______, | ||
| 68 | _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, | ||
| 69 | _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, | ||
| 70 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 71 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 72 | ) | ||
| 73 | |||
| 74 | }; | ||
| 75 | // clang-format on | ||
| 76 | |||
| 77 | // let us assume we start with both layers off | ||
| 78 | bool toggle_lwr = false; | ||
| 79 | bool toggle_rse = false; | ||
| 80 | |||
| 81 | bool led_update_user(led_t led_state) { | ||
| 82 | // Disable the default LED update code, so that lock LEDs could be reused to show layer status. | ||
| 83 | return false; | ||
| 84 | } | ||
| 85 | |||
| 86 | void matrix_scan_user(void) { | ||
| 87 | led_lwr(toggle_lwr); | ||
| 88 | led_rse(toggle_rse); | ||
| 89 | led_t led_state = host_keyboard_led_state(); | ||
| 90 | led_caps(led_state.caps_lock); | ||
| 91 | if (layer_state_is(_ADJ)) { | ||
| 92 | led_lwr(true); | ||
| 93 | led_rse(true); | ||
| 94 | } | ||
| 95 | } | ||
| 96 | |||
| 97 | void matrix_slave_scan_user(void) { | ||
| 98 | matrix_scan_user(); | ||
| 99 | if (IS_LAYER_ON(_LWR)) { | ||
| 100 | led_lwr(layer_state_is(_LWR)); | ||
| 101 | } | ||
| 102 | if (IS_LAYER_ON(_RSE)) { | ||
| 103 | led_rse(layer_state_is(_RSE)); | ||
| 104 | } | ||
| 105 | } | ||
| 106 | |||
| 107 | bool process_record_user(uint16_t keycode, keyrecord_t* record) { | ||
| 108 | switch (keycode) { | ||
| 109 | case (TT(_LWR)): | ||
| 110 | if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) { | ||
| 111 | // This runs before the TT() handler toggles the layer state, so the current layer state is the opposite of the final one after toggle. | ||
| 112 | toggle_lwr = !layer_state_is(_LWR); | ||
| 113 | } | ||
| 114 | return true; | ||
| 115 | break; | ||
| 116 | case (TT(_RSE)): | ||
| 117 | if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { | ||
| 118 | toggle_rse = !layer_state_is(_RSE); | ||
| 119 | } | ||
| 120 | return true; | ||
| 121 | break; | ||
| 122 | default: | ||
| 123 | return true; | ||
| 124 | } | ||
| 125 | } | ||
| 126 | |||
| 127 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 128 | #ifdef RGBLIGHT_ENABLE | ||
| 129 | |||
| 130 | rgblight_set_layer_state(0, layer_state_cmp(state, _QW)); | ||
| 131 | rgblight_set_layer_state(1, layer_state_cmp(state, _LWR)); | ||
| 132 | rgblight_set_layer_state(2, layer_state_cmp(state, _RSE)); | ||
| 133 | rgblight_set_layer_state(3, layer_state_cmp(state, _ADJ)); | ||
| 134 | |||
| 135 | #endif | ||
| 136 | return update_tri_layer_state(state, _LWR, _RSE, _ADJ); | ||
| 137 | } | ||
| 138 | |||
| 139 | #ifdef RGBLIGHT_ENABLE | ||
| 140 | |||
| 141 | layer_state_t default_layer_state_set_user(layer_state_t state) { | ||
| 142 | rgblight_set_layer_state(0, layer_state_cmp(state, _QW)); | ||
| 143 | return state; | ||
| 144 | } | ||
| 145 | |||
| 146 | void keyboard_post_init_user(void) { | ||
| 147 | // Enable the LED layers | ||
| 148 | rgblight_layers = my_rgb_layers; | ||
| 149 | } | ||
| 150 | #endif | ||
| 151 | |||
| 152 | #ifdef ENCODER_ENABLE | ||
| 153 | |||
| 154 | # define MEDIA_KEY_DELAY 10 | ||
| 155 | |||
| 156 | static inline void my_encoders(const uint8_t index, const bool clockwise) { | ||
| 157 | if (index == 0 || (index == 1)) { /* First encoder on each side*/ | ||
| 158 | if (IS_LAYER_ON(_LWR)) { | ||
| 159 | if (clockwise) { | ||
| 160 | rgblight_decrease_val_noeeprom(); | ||
| 161 | } else { | ||
| 162 | rgblight_increase_val_noeeprom(); | ||
| 163 | } | ||
| 164 | } else if (IS_LAYER_ON(_RSE)) { | ||
| 165 | if (clockwise) { | ||
| 166 | rgblight_decrease_hue_noeeprom(); | ||
| 167 | } else { | ||
| 168 | rgblight_increase_hue_noeeprom(); | ||
| 169 | } | ||
| 170 | |||
| 171 | } else { | ||
| 172 | if (clockwise) { | ||
| 173 | tap_code_delay(KC_VOLD, MEDIA_KEY_DELAY); | ||
| 174 | } else { | ||
| 175 | tap_code_delay(KC_VOLU, MEDIA_KEY_DELAY); | ||
| 176 | } | ||
| 177 | } | ||
| 178 | } | ||
| 179 | } | ||
| 180 | |||
| 181 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 182 | my_encoders(index, clockwise); | ||
| 183 | return true; | ||
| 184 | } | ||
| 185 | #endif | ||
diff --git a/keyboards/mlego/m60_split/keymaps/via/rules.mk b/keyboards/mlego/m60_split/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/mlego/m60_split/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
diff --git a/keyboards/mlego/m60_split/m60_split.c b/keyboards/mlego/m60_split/m60_split.c new file mode 100644 index 000000000..49fa10457 --- /dev/null +++ b/keyboards/mlego/m60_split/m60_split.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright 2021-2022 alin elena <alin@elena.space> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include "m60_split.h" | ||
| 17 | |||
diff --git a/keyboards/mlego/m60_split/m60_split.h b/keyboards/mlego/m60_split/m60_split.h new file mode 100644 index 000000000..11cbd5be6 --- /dev/null +++ b/keyboards/mlego/m60_split/m60_split.h | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* Copyright 2021-2022 alin elena <alin@elena.space> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | #define LAYOUT_ortho_5x12( \ | ||
| 21 | L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ | ||
| 22 | L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ | ||
| 23 | L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ | ||
| 24 | L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ | ||
| 25 | L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ | ||
| 26 | ) { \ | ||
| 27 | { L00, L01, L02, L03, L04, L05 }, \ | ||
| 28 | { L10, L11, L12, L13, L14, L15 }, \ | ||
| 29 | { L20, L21, L22, L23, L24, L25 }, \ | ||
| 30 | { L30, L31, L32, L33, L34, L35 }, \ | ||
| 31 | { L40, L41, L42, L43, L44, L45 }, \ | ||
| 32 | { R05, R04, R03, R02, R01, R00 }, \ | ||
| 33 | { R15, R14, R13, R12, R11, R10 }, \ | ||
| 34 | { R25, R24, R23, R22, R21, R20 }, \ | ||
| 35 | { R35, R34, R33, R32, R31, R30 }, \ | ||
| 36 | { R45, R44, R43, R42, R41, R40 } \ | ||
| 37 | } | ||
| 38 | |||
| 39 | |||
| 40 | static inline void led_lwr(const bool on) { | ||
| 41 | #ifdef LED_NUM_LOCK_PIN | ||
| 42 | writePin(LED_NUM_LOCK_PIN, on); | ||
| 43 | #endif | ||
| 44 | } | ||
| 45 | |||
| 46 | static inline void led_rse(const bool on) { | ||
| 47 | #ifdef LED_SCROLL_LOCK_PIN | ||
| 48 | writePin(LED_SCROLL_LOCK_PIN, on); | ||
| 49 | #endif | ||
| 50 | } | ||
| 51 | |||
| 52 | static inline void led_caps(const bool on) { | ||
| 53 | #ifdef LED_CAPS_LOCK_PIN | ||
| 54 | writePin(LED_CAPS_LOCK_PIN, !on); | ||
| 55 | #endif | ||
| 56 | } | ||
| 57 | |||
diff --git a/keyboards/mlego/m60_split/readme.md b/keyboards/mlego/m60_split/readme.md new file mode 100644 index 000000000..cb0214876 --- /dev/null +++ b/keyboards/mlego/m60_split/readme.md | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | # M60 split | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A (12x5) ortholinear split keyboard that can be hand wired or using a pcb. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [Alin Elena](https://github.com/alinelena) ([@drFaustroll on GitLab](https://gitlab.com/drFaustroll)) | ||
| 8 | * Hardware Supported: custom pcb [see](https://gitlab.com/m-lego/m60_split) STM32F401 from we act (rev1) | ||
| 9 | * Hardware Availability: [custom how to](https://gitlab.com/m-lego/m60_split) | ||
| 10 | |||
| 11 | |||
| 12 | Make example for this keyboard (after setting up your uild environment): | ||
| 13 | |||
| 14 | make mlego/m60_split/rev1:default | ||
| 15 | |||
| 16 | Flashing example for this keyboard: | ||
| 17 | |||
| 18 | make mlego/m60_split/rev1:default | ||
| 19 | |||
| 20 | To enter flashing mode, press Lower+Raise+1 or Lower+Raise+0 also on microcontroller keep pressed BOOT0 and then NRST, release NRST and then after 0.5s or so release BOOT0. | ||
| 21 | |||
| 22 | 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). | ||
| 23 | |||
| 24 | ## pins and leds rev1 and rev2 | ||
| 25 | |||
| 26 | ### left | ||
| 27 | |||
| 28 | | Rows | C0 | C1 | C2 | C3 | C4 | C5 | Pins | | ||
| 29 | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | ||
| 30 | | R0 | ` | 1 | 2 | 3 | 4 | 5 | B0 | | ||
| 31 | | R1 | Tab | q | w | e | r | t | A6 | | ||
| 32 | | R2 | Esc | a | s | d | f | g | A7 | | ||
| 33 | | R3 | Shift | z | x | c | v | b | B1 | | ||
| 34 | | R4 | Ctrl | Menu | Alt | Fn | Lower | Space | A5 | | ||
| 35 | | Pins | B14 | A10 | A15 | B3 | B4 | B5 | | | ||
| 36 | |||
| 37 | ### right | ||
| 38 | |||
| 39 | | Rows | C6 | C7 | C8 | C9 | C10 | C11 | Pins | | ||
| 40 | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | ||
| 41 | | R0 | 6 | 7 | 8 | 9 | 0 | BSpace| B1 | | ||
| 42 | | R1 | y | u | i | o | p | Del | A4 | | ||
| 43 | | R2 | h | j | k | l | ; | ' | A5 | | ||
| 44 | | R3 | n | m | , | . | / | Enter | A6 | | ||
| 45 | | R4 | Space | Raise | Left | Down | Up | Right | A7 | | ||
| 46 | | Pins | B5 | A7 | A1 | A2 | A3 | B0 | | | ||
| 47 | |||
| 48 | ### Encoders: | ||
| 49 | |||
| 50 | - Pad_A: A0 | ||
| 51 | - Pad_B: B8 | ||
| 52 | |||
| 53 | ### Leds | ||
| 54 | |||
| 55 | | Leds | Pin | | ||
| 56 | | ----------- | --- | | ||
| 57 | | NUM_LOCK | B12 | | ||
| 58 | | CAPS_LOCK | C13 | | ||
| 59 | | SCROLL_LOCK | B13 | | ||
| 60 | | RBG_DI | B15 | | ||
| 61 | |||
| 62 | ### split pins | ||
| 63 | |||
| 64 | | | Pin | | ||
| 65 | | ------------------- | ---- | | ||
| 66 | | SPLIT_HAND_PIN | B9 | | ||
| 67 | | SERIAL_USART_TX_PIN | B6 | | ||
diff --git a/keyboards/mlego/m60_split/rev1/config.h b/keyboards/mlego/m60_split/rev1/config.h new file mode 100644 index 000000000..6b7923ac1 --- /dev/null +++ b/keyboards/mlego/m60_split/rev1/config.h | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | /* Copyright 2021-2022 alin m elena <alinm.elena@gmail.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #include "config_common.h" | ||
| 19 | |||
| 20 | /* USB Device descriptor parameter */ | ||
| 21 | #define PRODUCT_ID 0x0001 | ||
| 22 | #define DEVICE_VER 0x0001 | ||
| 23 | |||
| 24 | #define MATRIX_ROW_PINS \ | ||
| 25 | { B0, A6, A7, B1, A5 } | ||
| 26 | #define MATRIX_COL_PINS \ | ||
| 27 | { B14, A10, A15, B3, B4, B5 } | ||
| 28 | |||
| 29 | #define MATRIX_ROW_PINS_RIGHT \ | ||
| 30 | { B1, A4, A5, A6, A7 } | ||
| 31 | |||
| 32 | #define MATRIX_COL_PINS_RIGHT \ | ||
| 33 | { B0, A3, A2, A1, B7, B5 } // cols are from right to left to match the layout | ||
| 34 | |||
| 35 | #define ENCODERS_PAD_A \ | ||
| 36 | { A0 } | ||
| 37 | #define ENCODERS_PAD_B \ | ||
| 38 | { B8 } | ||
| 39 | #define ENCODER_RESOLUTIONS \ | ||
| 40 | { 4 } | ||
| 41 | |||
| 42 | #define LED_NUM_LOCK_PIN B12 | ||
| 43 | #define LED_SCROLL_LOCK_PIN B13 | ||
| 44 | #define LED_CAPS_LOCK_PIN C13 | ||
| 45 | |||
| 46 | #define SPLIT_LAYER_STATE_ENABLE | ||
| 47 | #define SPLIT_LED_STATE_ENABLE | ||
| 48 | |||
| 49 | #define RGB_DI_PIN B15 | ||
| 50 | |||
| 51 | #define SPLIT_HAND_PIN B9 | ||
| 52 | #define SERIAL_USART_TX_PIN B6 | ||
| 53 | #define RGBLIGHT_SPLIT | ||
| 54 | #define RGBLIGHT_LAYERS | ||
| 55 | |||
| 56 | #define UNUSED_PINS | ||
| 57 | #define SERIAL_USART_SPEED 921600 | ||
| 58 | |||
| 59 | /* COL2ROW, ROW2COL*/ | ||
| 60 | #define DIODE_DIRECTION COL2ROW | ||
| 61 | |||
| 62 | #define MATRIX_IO_DELAY 5 | ||
| 63 | |||
| 64 | #define RGBLIGHT_LIMIT_VAL 128 | ||
| 65 | #define RGBLIGHT_DEFAULT_HUE 213 | ||
| 66 | |||
| 67 | #define RGBLED_NUM 16 | ||
| 68 | #define RGBLED_SPLIT \ | ||
| 69 | { 8, 8 } | ||
| 70 | |||
| 71 | #define RGBLIGHT_EFFECT_BREATHING | ||
| 72 | #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 73 | #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 74 | #define RGBLIGHT_EFFECT_SNAKE | ||
| 75 | #define RGBLIGHT_EFFECT_KNIGHT | ||
| 76 | #define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 77 | #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 78 | #define RGBLIGHT_EFFECT_RGB_TEST | ||
| 79 | #define RGBLIGHT_EFFECT_ALTERNATING | ||
| 80 | #define RGBLIGHT_EFFECT_TWINKLE | ||
| 81 | |||
| 82 | /* Bootmagic Lite key configuration */ | ||
| 83 | #define BOOTMAGIC_LITE_ROW 0 | ||
| 84 | #define BOOTMAGIC_LITE_COLUMN 0 | ||
| 85 | #define BOOTMAGIC_LITE_ROW_RIGHT 5 | ||
| 86 | #define BOOTMAGIC_LITE_COLUMN_RIGHT 0 | ||
diff --git a/keyboards/mlego/m60_split/rev1/halconf.h b/keyboards/mlego/m60_split/rev1/halconf.h new file mode 100644 index 000000000..89815e23b --- /dev/null +++ b/keyboards/mlego/m60_split/rev1/halconf.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* Copyright 2020 QMK | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | /* | ||
| 18 | * This file was auto-generated by: | ||
| 19 | * `qmk chibios-confmigrate -i keyboards/zvecr/zv48/f401/halconf.h -r platforms/chibios/common/configs/halconf.h` | ||
| 20 | */ | ||
| 21 | |||
| 22 | #pragma once | ||
| 23 | |||
| 24 | #define HAL_USE_PWM TRUE | ||
| 25 | |||
| 26 | #define HAL_USE_SERIAL TRUE | ||
| 27 | |||
| 28 | #define SERIAL_USB_BUFFERS_SIZE 256 | ||
| 29 | |||
| 30 | #include_next <halconf.h> | ||
diff --git a/keyboards/mlego/m60_split/rev1/mcuconf.h b/keyboards/mlego/m60_split/rev1/mcuconf.h new file mode 100644 index 000000000..4d90ec07e --- /dev/null +++ b/keyboards/mlego/m60_split/rev1/mcuconf.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* Copyright 2020 QMK | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | /* | ||
| 18 | * This file was auto-generated by: | ||
| 19 | * `qmk chibios-confmigrate -i keyboards/zvecr/zv48/f401/mcuconf.h -r platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h` | ||
| 20 | */ | ||
| 21 | |||
| 22 | #pragma once | ||
| 23 | |||
| 24 | #include_next <mcuconf.h> | ||
| 25 | |||
| 26 | #undef STM32_PWM_USE_TIM3 | ||
| 27 | #define STM32_PWM_USE_TIM3 TRUE | ||
| 28 | |||
| 29 | #undef STM32_SERIAL_USE_USART1 | ||
| 30 | #define STM32_SERIAL_USE_USART1 TRUE | ||
diff --git a/keyboards/mlego/m60_split/rev1/rules.mk b/keyboards/mlego/m60_split/rev1/rules.mk new file mode 100644 index 000000000..9e2c8d657 --- /dev/null +++ b/keyboards/mlego/m60_split/rev1/rules.mk | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = STM32F401 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = stm32-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | NKRO_ENABLE = yes # Enable N-Key Rollover | ||
| 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 18 | AUDIO_ENABLE = no # Audio output | ||
| 19 | SPLIT_KEYBOARD = yes | ||
| 20 | SERIAL_DRIVER = usart | ||
| 21 | ENCODER_ENABLE = yes # Enable encoder | ||
| 22 | |||
| 23 | LAYOUTS = ortho_5x12 | ||
| 24 | |||
diff --git a/keyboards/mlego/m60_split/rev2/config.h b/keyboards/mlego/m60_split/rev2/config.h new file mode 100644 index 000000000..1e45e86d0 --- /dev/null +++ b/keyboards/mlego/m60_split/rev2/config.h | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | /* Copyright 2021-2022 alin m elena <alinm.elena@gmail.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #include "config_common.h" | ||
| 19 | |||
| 20 | /* USB Device descriptor parameter */ | ||
| 21 | #define PRODUCT_ID 0x0001 | ||
| 22 | #define DEVICE_VER 0x0001 | ||
| 23 | |||
| 24 | #define MATRIX_ROW_PINS \ | ||
| 25 | { B0, A6, A7, B1, A5 } | ||
| 26 | #define MATRIX_COL_PINS \ | ||
| 27 | { B14, A10, A15, B3, B4, B5 } | ||
| 28 | |||
| 29 | #define MATRIX_ROW_PINS_RIGHT \ | ||
| 30 | { B1, A4, A5, A6, A7 } | ||
| 31 | |||
| 32 | #define MATRIX_COL_PINS_RIGHT \ | ||
| 33 | { B0, A3, A2, A1, B7, B5 } // cols are from right to left to match the layout | ||
| 34 | |||
| 35 | #define ENCODERS_PAD_A \ | ||
| 36 | { A0 } | ||
| 37 | #define ENCODERS_PAD_B \ | ||
| 38 | { B8 } | ||
| 39 | #define ENCODER_RESOLUTIONS \ | ||
| 40 | { 4 } | ||
| 41 | |||
| 42 | #define LED_NUM_LOCK_PIN B12 | ||
| 43 | #define LED_SCROLL_LOCK_PIN B13 | ||
| 44 | #define LED_CAPS_LOCK_PIN C13 | ||
| 45 | #define SPLIT_LAYER_STATE_ENABLE | ||
| 46 | #define SPLIT_LED_STATE_ENABLE | ||
| 47 | |||
| 48 | #define RGB_DI_PIN B15 | ||
| 49 | |||
| 50 | #define SPLIT_HAND_PIN B9 | ||
| 51 | #define SERIAL_USART_TX_PIN B6 | ||
| 52 | #define RGBLIGHT_SPLIT | ||
| 53 | |||
| 54 | #define UNUSED_PINS | ||
| 55 | #define SERIAL_USART_SPEED 921600 | ||
| 56 | |||
| 57 | /* COL2ROW, ROW2COL*/ | ||
| 58 | #define DIODE_DIRECTION COL2ROW | ||
| 59 | |||
| 60 | #define MATRIX_IO_DELAY 5 | ||
| 61 | |||
| 62 | #define RGBLIGHT_LAYERS | ||
| 63 | |||
| 64 | #define RGBLED_NUM 16 | ||
| 65 | #define RGBLED_SPLIT \ | ||
| 66 | { 8, 8 } | ||
| 67 | #define RGBLIGHT_EFFECT_BREATHING | ||
| 68 | #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 69 | #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 70 | #define RGBLIGHT_EFFECT_SNAKE | ||
| 71 | #define RGBLIGHT_EFFECT_KNIGHT | ||
| 72 | #define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 73 | #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 74 | #define RGBLIGHT_EFFECT_RGB_TEST | ||
| 75 | #define RGBLIGHT_EFFECT_ALTERNATING | ||
| 76 | #define RGBLIGHT_EFFECT_TWINKLE | ||
| 77 | |||
| 78 | /* Bootmagic Lite key configuration */ | ||
| 79 | #define BOOTMAGIC_LITE_ROW 0 | ||
| 80 | #define BOOTMAGIC_LITE_COLUMN 0 | ||
| 81 | #define BOOTMAGIC_LITE_ROW_RIGHT 5 | ||
| 82 | #define BOOTMAGIC_LITE_COLUMN_RIGHT 0 | ||
diff --git a/keyboards/mlego/m60_split/rev2/halconf.h b/keyboards/mlego/m60_split/rev2/halconf.h new file mode 100644 index 000000000..89815e23b --- /dev/null +++ b/keyboards/mlego/m60_split/rev2/halconf.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* Copyright 2020 QMK | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | /* | ||
| 18 | * This file was auto-generated by: | ||
| 19 | * `qmk chibios-confmigrate -i keyboards/zvecr/zv48/f401/halconf.h -r platforms/chibios/common/configs/halconf.h` | ||
| 20 | */ | ||
| 21 | |||
| 22 | #pragma once | ||
| 23 | |||
| 24 | #define HAL_USE_PWM TRUE | ||
| 25 | |||
| 26 | #define HAL_USE_SERIAL TRUE | ||
| 27 | |||
| 28 | #define SERIAL_USB_BUFFERS_SIZE 256 | ||
| 29 | |||
| 30 | #include_next <halconf.h> | ||
diff --git a/keyboards/mlego/m60_split/rev2/mcuconf.h b/keyboards/mlego/m60_split/rev2/mcuconf.h new file mode 100644 index 000000000..4d90ec07e --- /dev/null +++ b/keyboards/mlego/m60_split/rev2/mcuconf.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* Copyright 2020 QMK | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | /* | ||
| 18 | * This file was auto-generated by: | ||
| 19 | * `qmk chibios-confmigrate -i keyboards/zvecr/zv48/f401/mcuconf.h -r platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h` | ||
| 20 | */ | ||
| 21 | |||
| 22 | #pragma once | ||
| 23 | |||
| 24 | #include_next <mcuconf.h> | ||
| 25 | |||
| 26 | #undef STM32_PWM_USE_TIM3 | ||
| 27 | #define STM32_PWM_USE_TIM3 TRUE | ||
| 28 | |||
| 29 | #undef STM32_SERIAL_USE_USART1 | ||
| 30 | #define STM32_SERIAL_USE_USART1 TRUE | ||
diff --git a/keyboards/mlego/m60_split/rev2/rules.mk b/keyboards/mlego/m60_split/rev2/rules.mk new file mode 100644 index 000000000..cb8f4bd95 --- /dev/null +++ b/keyboards/mlego/m60_split/rev2/rules.mk | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = STM32F411 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = stm32-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | NKRO_ENABLE = yes # Enable N-Key Rollover | ||
| 16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 18 | AUDIO_ENABLE = no # Audio output | ||
| 19 | SPLIT_KEYBOARD = yes | ||
| 20 | SERIAL_DRIVER = usart | ||
| 21 | ENCODER_ENABLE = yes # Enable encoder | ||
| 22 | |||
| 23 | LAYOUTS = ortho_5x12 | ||
