From a9c7edf6b26f3574021e03b7f1c67ba755268b24 Mon Sep 17 00:00:00 2001 From: Gondolindrim Date: Tue, 16 Nov 2021 00:01:04 -0300 Subject: [PATCH 1/6] Cleanup from M65H PR --- keyboards/mode/m65ha_alpha/chconf.h | 25 ++++ keyboards/mode/m65ha_alpha/config.h | 73 ++++++++++++ keyboards/mode/m65ha_alpha/halconf.h | 21 ++++ keyboards/mode/m65ha_alpha/info.json | 82 +++++++++++++ .../mode/m65ha_alpha/keymaps/default/keymap.c | 49 ++++++++ .../mode/m65ha_alpha/keymaps/via/keymap.c | 49 ++++++++ .../mode/m65ha_alpha/keymaps/via/rules.mk | 1 + keyboards/mode/m65ha_alpha/m65ha_alpha.c | 109 ++++++++++++++++++ keyboards/mode/m65ha_alpha/m65ha_alpha.h | 37 ++++++ keyboards/mode/m65ha_alpha/mcuconf.h | 35 ++++++ keyboards/mode/m65ha_alpha/readme.md | 16 +++ keyboards/mode/m65ha_alpha/rules.mk | 24 ++++ keyboards/mode/m65ha_pre-alpha/chconf.h | 25 ++++ keyboards/mode/m65ha_pre-alpha/config.h | 73 ++++++++++++ keyboards/mode/m65ha_pre-alpha/halconf.h | 21 ++++ keyboards/mode/m65ha_pre-alpha/info.json | 82 +++++++++++++ .../m65ha_pre-alpha/keymaps/default/keymap.c | 49 ++++++++ .../mode/m65ha_pre-alpha/keymaps/via/keymap.c | 49 ++++++++ .../mode/m65ha_pre-alpha/keymaps/via/rules.mk | 1 + .../mode/m65ha_pre-alpha/m65ha_preAlpha.c | 109 ++++++++++++++++++ .../mode/m65ha_pre-alpha/m65ha_preAlpha.h | 37 ++++++ keyboards/mode/m65ha_pre-alpha/mcuconf.h | 35 ++++++ keyboards/mode/m65ha_pre-alpha/readme.md | 9 ++ keyboards/mode/m65ha_pre-alpha/rules.mk | 24 ++++ keyboards/mode/m65hi_alpha/chconf.h | 25 ++++ keyboards/mode/m65hi_alpha/config.h | 73 ++++++++++++ keyboards/mode/m65hi_alpha/halconf.h | 21 ++++ keyboards/mode/m65hi_alpha/info.json | 83 +++++++++++++ .../mode/m65hi_alpha/keymaps/default/keymap.c | 49 ++++++++ .../mode/m65hi_alpha/keymaps/via/keymap.c | 49 ++++++++ .../mode/m65hi_alpha/keymaps/via/rules.mk | 1 + keyboards/mode/m65hi_alpha/m65hi_alpha.c | 109 ++++++++++++++++++ keyboards/mode/m65hi_alpha/m65hi_alpha.h | 37 ++++++ keyboards/mode/m65hi_alpha/mcuconf.h | 40 +++++++ keyboards/mode/m65hi_alpha/readme.md | 15 +++ keyboards/mode/m65hi_alpha/rules.mk | 24 ++++ keyboards/mode/m65hi_pre-alpha/chconf.h | 25 ++++ keyboards/mode/m65hi_pre-alpha/config.h | 73 ++++++++++++ keyboards/mode/m65hi_pre-alpha/halconf.h | 21 ++++ keyboards/mode/m65hi_pre-alpha/info.json | 83 +++++++++++++ .../m65hi_pre-alpha/keymaps/default/keymap.c | 49 ++++++++ .../mode/m65hi_pre-alpha/keymaps/via/keymap.c | 49 ++++++++ .../mode/m65hi_pre-alpha/keymaps/via/rules.mk | 1 + .../mode/m65hi_pre-alpha/m65hi_preAlpha.c | 109 ++++++++++++++++++ .../mode/m65hi_pre-alpha/m65hi_preAlpha.h | 37 ++++++ keyboards/mode/m65hi_pre-alpha/mcuconf.h | 35 ++++++ keyboards/mode/m65hi_pre-alpha/readme.md | 9 ++ keyboards/mode/m65hi_pre-alpha/rules.mk | 24 ++++ 48 files changed, 2076 insertions(+) create mode 100644 keyboards/mode/m65ha_alpha/chconf.h create mode 100644 keyboards/mode/m65ha_alpha/config.h create mode 100644 keyboards/mode/m65ha_alpha/halconf.h create mode 100644 keyboards/mode/m65ha_alpha/info.json create mode 100755 keyboards/mode/m65ha_alpha/keymaps/default/keymap.c create mode 100755 keyboards/mode/m65ha_alpha/keymaps/via/keymap.c create mode 100644 keyboards/mode/m65ha_alpha/keymaps/via/rules.mk create mode 100644 keyboards/mode/m65ha_alpha/m65ha_alpha.c create mode 100644 keyboards/mode/m65ha_alpha/m65ha_alpha.h create mode 100644 keyboards/mode/m65ha_alpha/mcuconf.h create mode 100644 keyboards/mode/m65ha_alpha/readme.md create mode 100644 keyboards/mode/m65ha_alpha/rules.mk create mode 100644 keyboards/mode/m65ha_pre-alpha/chconf.h create mode 100644 keyboards/mode/m65ha_pre-alpha/config.h create mode 100644 keyboards/mode/m65ha_pre-alpha/halconf.h create mode 100644 keyboards/mode/m65ha_pre-alpha/info.json create mode 100755 keyboards/mode/m65ha_pre-alpha/keymaps/default/keymap.c create mode 100755 keyboards/mode/m65ha_pre-alpha/keymaps/via/keymap.c create mode 100644 keyboards/mode/m65ha_pre-alpha/keymaps/via/rules.mk create mode 100644 keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.c create mode 100644 keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.h create mode 100644 keyboards/mode/m65ha_pre-alpha/mcuconf.h create mode 100644 keyboards/mode/m65ha_pre-alpha/readme.md create mode 100644 keyboards/mode/m65ha_pre-alpha/rules.mk create mode 100644 keyboards/mode/m65hi_alpha/chconf.h create mode 100644 keyboards/mode/m65hi_alpha/config.h create mode 100644 keyboards/mode/m65hi_alpha/halconf.h create mode 100644 keyboards/mode/m65hi_alpha/info.json create mode 100755 keyboards/mode/m65hi_alpha/keymaps/default/keymap.c create mode 100755 keyboards/mode/m65hi_alpha/keymaps/via/keymap.c create mode 100644 keyboards/mode/m65hi_alpha/keymaps/via/rules.mk create mode 100644 keyboards/mode/m65hi_alpha/m65hi_alpha.c create mode 100644 keyboards/mode/m65hi_alpha/m65hi_alpha.h create mode 100644 keyboards/mode/m65hi_alpha/mcuconf.h create mode 100644 keyboards/mode/m65hi_alpha/readme.md create mode 100644 keyboards/mode/m65hi_alpha/rules.mk create mode 100644 keyboards/mode/m65hi_pre-alpha/chconf.h create mode 100644 keyboards/mode/m65hi_pre-alpha/config.h create mode 100644 keyboards/mode/m65hi_pre-alpha/halconf.h create mode 100644 keyboards/mode/m65hi_pre-alpha/info.json create mode 100755 keyboards/mode/m65hi_pre-alpha/keymaps/default/keymap.c create mode 100755 keyboards/mode/m65hi_pre-alpha/keymaps/via/keymap.c create mode 100644 keyboards/mode/m65hi_pre-alpha/keymaps/via/rules.mk create mode 100644 keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.c create mode 100644 keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.h create mode 100644 keyboards/mode/m65hi_pre-alpha/mcuconf.h create mode 100644 keyboards/mode/m65hi_pre-alpha/readme.md create mode 100644 keyboards/mode/m65hi_pre-alpha/rules.mk diff --git a/keyboards/mode/m65ha_alpha/chconf.h b/keyboards/mode/m65ha_alpha/chconf.h new file mode 100644 index 000000000000..cbbae31079fb --- /dev/null +++ b/keyboards/mode/m65ha_alpha/chconf.h @@ -0,0 +1,25 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define CH_CFG_ST_FREQUENCY 10000 + +#define CH_CFG_OPTIMIZE_SPEED FALSE + +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +#include_next diff --git a/keyboards/mode/m65ha_alpha/config.h b/keyboards/mode/m65ha_alpha/config.h new file mode 100644 index 000000000000..dc921fb33508 --- /dev/null +++ b/keyboards/mode/m65ha_alpha/config.h @@ -0,0 +1,73 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x00DE +#define PRODUCT_ID 0x6566 // 65A + 1 since the pre-alpha version was 6565 +#define DEVICE_VER 0x0065 // A for release Alpha +#define MANUFACTURER Mode +#define PRODUCT SixtyFive HA + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B10, B12, C8 , C4 , C5 , B0 , C10, B13, B14, B15, A15, C6 , C7 , A8 , C9} +#define MATRIX_ROW_PINS { A7 , A10, D2 , C12, B1 , C11 } +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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 */ +#define LOCKING_RESYNC_ENABLE + +#define EEPROM_I2C_24LC256 +//#define I2C1_CLOCK_SPEED 400000 +//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE + +#define STM32_HSECLK 8000000 + +#define OPENDRAIN_INDICATORS +#define LED_CAPS_LOCK_PIN A6 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/mode/m65ha_alpha/halconf.h b/keyboards/mode/m65ha_alpha/halconf.h new file mode 100644 index 000000000000..41bddcb2799b --- /dev/null +++ b/keyboards/mode/m65ha_alpha/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/mode/m65ha_alpha/info.json b/keyboards/mode/m65ha_alpha/info.json new file mode 100644 index 000000000000..a25d22714e5f --- /dev/null +++ b/keyboards/mode/m65ha_alpha/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Mode SixtyFive HA", + "url": "", + "maintainer": "Gondolindrim", + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "K00", "x": 0, "y": 0 }, + { "label": "K01", "x": 1, "y": 0 }, + { "label": "K02", "x": 2, "y": 0 }, + { "label": "K03", "x": 3, "y": 0 }, + { "label": "K04", "x": 4, "y": 0 }, + { "label": "K05", "x": 5, "y": 0 }, + { "label": "K06", "x": 6, "y": 0 }, + { "label": "K07", "x": 7, "y": 0 }, + { "label": "K08", "x": 8, "y": 0 }, + { "label": "K09", "x": 9, "y": 0 }, + { "label": "K0A", "x": 10, "y": 0 }, + { "label": "K0B", "x": 11, "y": 0 }, + { "label": "K0C", "x": 12, "y": 0 }, + { "label": "K0D", "x": 13, "y": 0, "w": 2 }, + { "label": "K0E", "x": 15, "y": 0 }, + + { "label": "K10", "x": 0, "y": 1, "w": 1.5 }, + { "label": "K11", "x": 1.5, "y": 1 }, + { "label": "K12", "x": 2.5, "y": 1 }, + { "label": "K13", "x": 3.5, "y": 1 }, + { "label": "K14", "x": 4.5, "y": 1 }, + { "label": "K15", "x": 5.5, "y": 1 }, + { "label": "K16", "x": 6.5, "y": 1 }, + { "label": "K17", "x": 7.5, "y": 1 }, + { "label": "K18", "x": 8.5, "y": 1 }, + { "label": "K19", "x": 9.5, "y": 1 }, + { "label": "K1A", "x": 10.5, "y": 1 }, + { "label": "K1B", "x": 11.5, "y": 1 }, + { "label": "K1C", "x": 12.5, "y": 1 }, + { "label": "K1D", "x": 13.5, "y": 1, "w": 1.5}, + { "label": "K1E", "x": 15, "y": 1 }, + + { "label": "K20", "x": 0, "y": 2, "w": 1.75 }, + { "label": "K21", "x": 1.75, "y": 2 }, + { "label": "K22", "x": 2.75, "y": 2 }, + { "label": "K23", "x": 3.75, "y": 2 }, + { "label": "K24", "x": 4.75, "y": 2 }, + { "label": "K25", "x": 5.75, "y": 2 }, + { "label": "K26", "x": 6.75, "y": 2 }, + { "label": "K27", "x": 7.75, "y": 2 }, + { "label": "K28", "x": 8.75, "y": 2 }, + { "label": "K29", "x": 9.75, "y": 2 }, + { "label": "K2A", "x": 10.75, "y": 2 }, + { "label": "K2B", "x": 11.75, "y": 2 }, + { "label": "K2D", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "K2E", "x": 15, "y": 2 }, + + { "label": "K30", "x": 0, "y": 3, "w": 2.25 }, + { "label": "K32", "x": 2.25, "y": 3 }, + { "label": "K33", "x": 3.25, "y": 3 }, + { "label": "K34", "x": 4.25, "y": 3 }, + { "label": "K35", "x": 5.25, "y": 3 }, + { "label": "K36", "x": 6.25, "y": 3 }, + { "label": "K37", "x": 7.25, "y": 3 }, + { "label": "K38", "x": 8.25, "y": 3 }, + { "label": "K39", "x": 9.25, "y": 3 }, + { "label": "K3A", "x": 10.25, "y": 3 }, + { "label": "K3B", "x": 11.25, "y": 3 }, + { "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "K3D", "x": 14, "y": 3 }, + { "label": "K3E", "x": 15, "y": 3 }, + + { "label": "K40", "x": 0, "y": 4, "w": 1.25 }, + { "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, + { "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, + { "label": "K5C", "x": 13, "y": 4 }, + { "label": "K5D", "x": 14, "y": 4 }, + { "label": "K5E", "x": 15, "y": 4 } + ] + } + } +} diff --git a/keyboards/mode/m65ha_alpha/keymaps/default/keymap.c b/keyboards/mode/m65ha_alpha/keymaps/default/keymap.c new file mode 100755 index 000000000000..2a2e041536e5 --- /dev/null +++ b/keyboards/mode/m65ha_alpha/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_DEL , + 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_PGUP, + 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 , KC_PGDN, + 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 , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1) , KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65ha_alpha/keymaps/via/keymap.c b/keyboards/mode/m65ha_alpha/keymaps/via/keymap.c new file mode 100755 index 000000000000..2a2e041536e5 --- /dev/null +++ b/keyboards/mode/m65ha_alpha/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_DEL , + 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_PGUP, + 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 , KC_PGDN, + 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 , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1) , KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65ha_alpha/keymaps/via/rules.mk b/keyboards/mode/m65ha_alpha/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/mode/m65ha_alpha/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mode/m65ha_alpha/m65ha_alpha.c b/keyboards/mode/m65ha_alpha/m65ha_alpha.c new file mode 100644 index 000000000000..e05de6fb0c73 --- /dev/null +++ b/keyboards/mode/m65ha_alpha/m65ha_alpha.c @@ -0,0 +1,109 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "m65ha_alpha.h" + +void board_init(void) { + setPinInput(B9); + setPinInput(B10); +} + +#define LED_PIN_ON_STATE 1 +void led_init_ports(void) { + +/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator + pins default to push-pull output. Else, they are defined as open-drain. The + pin mode configuration is done through the INDICATOR_PIN_MODE which is + attributed right at the beggining. **/ + +#ifndef OPENDRAIN_INDICATORS +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL +#else +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN +#endif + +#ifdef LED_NUM_LOCK_PIN + palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_CAPS_LOCK_PIN + palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_SCROLL_LOCK_PIN + palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_COMPOSE_PIN + palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_KANA_PIN + palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); +#endif +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + } + return res; +} + +uint8_t prng(void) { + static uint8_t s = 0xAA, a = 0; + s ^= s << 3; + s ^= s >> 5; + s ^= a++ >> 2; + return s; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + // debug_enable = true; + // debug_matrix = true; + // debug_keyboard=true; + // debug_mouse=true; +} + +void matrix_scan_user(void) { + static uint32_t last_eeprom_access = 0; + uint32_t now = timer_read32(); + if (now - last_eeprom_access > 5000) { + dprint("reading eeprom\n"); + last_eeprom_access = now; + + union { + uint8_t bytes[4]; + uint32_t raw; + } tmp; + tmp.bytes[0] = prng(); + tmp.bytes[1] = prng(); + tmp.bytes[2] = prng(); + tmp.bytes[3] = prng(); + + eeconfig_update_user(tmp.raw); + uint32_t value = eeconfig_read_user(); + if (value != tmp.raw) { + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + dprint("!! EEPROM readback mismatch!\n"); + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + } + } +} diff --git a/keyboards/mode/m65ha_alpha/m65ha_alpha.h b/keyboards/mode/m65ha_alpha/m65ha_alpha.h new file mode 100644 index 000000000000..6b0c63c6bec8 --- /dev/null +++ b/keyboards/mode/m65ha_alpha/m65ha_alpha.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, ___, K2D, K2E }, \ + { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ +} diff --git a/keyboards/mode/m65ha_alpha/mcuconf.h b/keyboards/mode/m65ha_alpha/mcuconf.h new file mode 100644 index 000000000000..e4cefd0b75c7 --- /dev/null +++ b/keyboards/mode/m65ha_alpha/mcuconf.h @@ -0,0 +1,35 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next +#undef STM32_PLLM_VALUE +#undef STM32_PLLN_VALUE +#undef STM32_PLLP_VALUE +#undef STM32_PLLQ_VALUE +#undef STM32_PPRE1 +#undef STM32_PPRE2 + +#define STM32_PLLM_VALUE 4 +#define STM32_PLLN_VALUE 168 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV1 + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/mode/m65ha_alpha/readme.md b/keyboards/mode/m65ha_alpha/readme.md new file mode 100644 index 000000000000..ae8b489759c0 --- /dev/null +++ b/keyboards/mode/m65ha_alpha/readme.md @@ -0,0 +1,16 @@ +# Mode SixtyFive HA rev. Alpha + +![Image Gallery](https://cdn.shopify.com/s/files/1/0279/3426/1330/files/Group_95_1024x1024.jpg) + +The Mode SixtyFive is a 65% high-end keyboard sold by [Mode Designs](https://shop.modedesigns.com/). The M65HA is the ANSI-layout variant of its PCB. + +* Keyboard Maintainer: [Gondolindrim](https://github.com/gondolindrim) +* Hardware Supported: proprietary PCB using STM32F401 controller +* Hardware Availability: revision 1 public sales are over as of june 2021. + +Flashing example for this keyboard: + + make mode/m65hi_alpha:default:flash + +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). + diff --git a/keyboards/mode/m65ha_alpha/rules.mk b/keyboards/mode/m65ha_alpha/rules.mk new file mode 100644 index 000000000000..f33a05592077 --- /dev/null +++ b/keyboards/mode/m65ha_alpha/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = STM32F401 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +EEPROM_DRIVER = i2c +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE diff --git a/keyboards/mode/m65ha_pre-alpha/chconf.h b/keyboards/mode/m65ha_pre-alpha/chconf.h new file mode 100644 index 000000000000..cbbae31079fb --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/chconf.h @@ -0,0 +1,25 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define CH_CFG_ST_FREQUENCY 10000 + +#define CH_CFG_OPTIMIZE_SPEED FALSE + +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +#include_next diff --git a/keyboards/mode/m65ha_pre-alpha/config.h b/keyboards/mode/m65ha_pre-alpha/config.h new file mode 100644 index 000000000000..22472eee3e63 --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/config.h @@ -0,0 +1,73 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x00DE +#define PRODUCT_ID 0x6565 // For 65A +#define DEVICE_VER 0x8065 // PA for pre-Alpha +#define MANUFACTURER Mode +#define PRODUCT SixtyFive HA + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B10, B12, C8 , C5 , B0 , B1 , C10, B13, B14, B15, A15, C6 , C7 , C9 , A8 } +#define MATRIX_ROW_PINS { C4 , A10, D2 , C12, A7 , C11 } +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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 */ +#define LOCKING_RESYNC_ENABLE + +#define EEPROM_I2C_24LC256 +//#define I2C1_CLOCK_SPEED 400000 +//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE + +#define STM32_HSECLK 8000000 + +#define OPENDRAIN_INDICATORS +#define LED_CAPS_LOCK_PIN A6 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/mode/m65ha_pre-alpha/halconf.h b/keyboards/mode/m65ha_pre-alpha/halconf.h new file mode 100644 index 000000000000..41bddcb2799b --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/mode/m65ha_pre-alpha/info.json b/keyboards/mode/m65ha_pre-alpha/info.json new file mode 100644 index 000000000000..b58c1153cf2e --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Mode SixtyFive HA pre-Alpha", + "url": "", + "maintainer": "Gondolindrim", + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "K00", "x": 0, "y": 0 }, + { "label": "K01", "x": 1, "y": 0 }, + { "label": "K02", "x": 2, "y": 0 }, + { "label": "K03", "x": 3, "y": 0 }, + { "label": "K04", "x": 4, "y": 0 }, + { "label": "K05", "x": 5, "y": 0 }, + { "label": "K06", "x": 6, "y": 0 }, + { "label": "K07", "x": 7, "y": 0 }, + { "label": "K08", "x": 8, "y": 0 }, + { "label": "K09", "x": 9, "y": 0 }, + { "label": "K0A", "x": 10, "y": 0 }, + { "label": "K0B", "x": 11, "y": 0 }, + { "label": "K0C", "x": 12, "y": 0 }, + { "label": "K0D", "x": 13, "y": 0, "w": 2 }, + { "label": "K0E", "x": 15, "y": 0 }, + + { "label": "K10", "x": 0, "y": 1, "w": 1.5 }, + { "label": "K11", "x": 1.5, "y": 1 }, + { "label": "K12", "x": 2.5, "y": 1 }, + { "label": "K13", "x": 3.5, "y": 1 }, + { "label": "K14", "x": 4.5, "y": 1 }, + { "label": "K15", "x": 5.5, "y": 1 }, + { "label": "K16", "x": 6.5, "y": 1 }, + { "label": "K17", "x": 7.5, "y": 1 }, + { "label": "K18", "x": 8.5, "y": 1 }, + { "label": "K19", "x": 9.5, "y": 1 }, + { "label": "K1A", "x": 10.5, "y": 1 }, + { "label": "K1B", "x": 11.5, "y": 1 }, + { "label": "K1C", "x": 12.5, "y": 1 }, + { "label": "K1D", "x": 13.5, "y": 1, "w": 1.5}, + { "label": "K1E", "x": 15, "y": 1 }, + + { "label": "K20", "x": 0, "y": 2, "w": 1.75 }, + { "label": "K21", "x": 1.75, "y": 2 }, + { "label": "K22", "x": 2.75, "y": 2 }, + { "label": "K23", "x": 3.75, "y": 2 }, + { "label": "K24", "x": 4.75, "y": 2 }, + { "label": "K25", "x": 5.75, "y": 2 }, + { "label": "K26", "x": 6.75, "y": 2 }, + { "label": "K27", "x": 7.75, "y": 2 }, + { "label": "K28", "x": 8.75, "y": 2 }, + { "label": "K29", "x": 9.75, "y": 2 }, + { "label": "K2A", "x": 10.75, "y": 2 }, + { "label": "K2B", "x": 11.75, "y": 2 }, + { "label": "K2D", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "K2E", "x": 15, "y": 2 }, + + { "label": "K30", "x": 0, "y": 3, "w": 2.25 }, + { "label": "K32", "x": 2.25, "y": 3 }, + { "label": "K33", "x": 3.25, "y": 3 }, + { "label": "K34", "x": 4.25, "y": 3 }, + { "label": "K35", "x": 5.25, "y": 3 }, + { "label": "K36", "x": 6.25, "y": 3 }, + { "label": "K37", "x": 7.25, "y": 3 }, + { "label": "K38", "x": 8.25, "y": 3 }, + { "label": "K39", "x": 9.25, "y": 3 }, + { "label": "K3A", "x": 10.25, "y": 3 }, + { "label": "K3B", "x": 11.25, "y": 3 }, + { "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "K3D", "x": 14, "y": 3 }, + { "label": "K3E", "x": 15, "y": 3 }, + + { "label": "K40", "x": 0, "y": 4, "w": 1.25 }, + { "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, + { "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, + { "label": "K5C", "x": 13, "y": 4 }, + { "label": "K5D", "x": 14, "y": 4 }, + { "label": "K5E", "x": 15, "y": 4 } + ] + } + } +} diff --git a/keyboards/mode/m65ha_pre-alpha/keymaps/default/keymap.c b/keyboards/mode/m65ha_pre-alpha/keymaps/default/keymap.c new file mode 100755 index 000000000000..2195856f0cc5 --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_DEL , + 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_PGUP, + 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 , KC_PGDN, + 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 , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65ha_pre-alpha/keymaps/via/keymap.c b/keyboards/mode/m65ha_pre-alpha/keymaps/via/keymap.c new file mode 100755 index 000000000000..8a322b0002e8 --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_BSPC, + 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_PGUP, + 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_DEL , KC_ENT , KC_PGDN, + 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 , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65ha_pre-alpha/keymaps/via/rules.mk b/keyboards/mode/m65ha_pre-alpha/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.c b/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.c new file mode 100644 index 000000000000..f65b4c71a432 --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.c @@ -0,0 +1,109 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "m65ha_preAlpha.h" + +void board_init(void) { + setPinInput(B9); + setPinInput(B10); +} + +#define LED_PIN_ON_STATE 1 +void led_init_ports(void) { + +/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator + pins default to push-pull output. Else, they are defined as open-drain. The + pin mode configuration is done through the INDICATOR_PIN_MODE which is + attributed right at the beggining. **/ + +#ifndef OPENDRAIN_INDICATORS +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL +#else +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN +#endif + +#ifdef LED_NUM_LOCK_PIN + palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_CAPS_LOCK_PIN + palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_SCROLL_LOCK_PIN + palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_COMPOSE_PIN + palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_KANA_PIN + palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); +#endif +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + } + return res; +} + +uint8_t prng(void) { + static uint8_t s = 0xAA, a = 0; + s ^= s << 3; + s ^= s >> 5; + s ^= a++ >> 2; + return s; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + // debug_enable = true; + // debug_matrix = true; + // debug_keyboard=true; + // debug_mouse=true; +} + +void matrix_scan_user(void) { + static uint32_t last_eeprom_access = 0; + uint32_t now = timer_read32(); + if (now - last_eeprom_access > 5000) { + dprint("reading eeprom\n"); + last_eeprom_access = now; + + union { + uint8_t bytes[4]; + uint32_t raw; + } tmp; + tmp.bytes[0] = prng(); + tmp.bytes[1] = prng(); + tmp.bytes[2] = prng(); + tmp.bytes[3] = prng(); + + eeconfig_update_user(tmp.raw); + uint32_t value = eeconfig_read_user(); + if (value != tmp.raw) { + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + dprint("!! EEPROM readback mismatch!\n"); + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + } + } +} diff --git a/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.h b/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.h new file mode 100644 index 000000000000..1e9d57476d2a --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E }, \ + { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ +} diff --git a/keyboards/mode/m65ha_pre-alpha/mcuconf.h b/keyboards/mode/m65ha_pre-alpha/mcuconf.h new file mode 100644 index 000000000000..e4cefd0b75c7 --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/mcuconf.h @@ -0,0 +1,35 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next +#undef STM32_PLLM_VALUE +#undef STM32_PLLN_VALUE +#undef STM32_PLLP_VALUE +#undef STM32_PLLQ_VALUE +#undef STM32_PPRE1 +#undef STM32_PPRE2 + +#define STM32_PLLM_VALUE 4 +#define STM32_PLLN_VALUE 168 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV1 + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/mode/m65ha_pre-alpha/readme.md b/keyboards/mode/m65ha_pre-alpha/readme.md new file mode 100644 index 000000000000..04a0288f0aed --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/readme.md @@ -0,0 +1,9 @@ +# Mode M65HA (pre-release Alpha version) + +This is the firmware page for the pre-Alpha version of the Mode M65HA PCB. It was intended as a test prototype. For the public-released Alpha release, use the `./m65ha_alpha` firmware. + +This PCB was not publicly released. Its firmware is kept as an archive for prototyping purposes and future developments. + +# Needed patches + +For the firmware to properly work, the PCB needs a jumper from the cathode of the right alt key to the exposed pin PA7. diff --git a/keyboards/mode/m65ha_pre-alpha/rules.mk b/keyboards/mode/m65ha_pre-alpha/rules.mk new file mode 100644 index 000000000000..f33a05592077 --- /dev/null +++ b/keyboards/mode/m65ha_pre-alpha/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = STM32F401 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +EEPROM_DRIVER = i2c +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE diff --git a/keyboards/mode/m65hi_alpha/chconf.h b/keyboards/mode/m65hi_alpha/chconf.h new file mode 100644 index 000000000000..cbbae31079fb --- /dev/null +++ b/keyboards/mode/m65hi_alpha/chconf.h @@ -0,0 +1,25 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define CH_CFG_ST_FREQUENCY 10000 + +#define CH_CFG_OPTIMIZE_SPEED FALSE + +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +#include_next diff --git a/keyboards/mode/m65hi_alpha/config.h b/keyboards/mode/m65hi_alpha/config.h new file mode 100644 index 000000000000..1a048e94d2be --- /dev/null +++ b/keyboards/mode/m65hi_alpha/config.h @@ -0,0 +1,73 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x00DE +#define PRODUCT_ID 0x6574 // For 65I + 1 (for alpha, since pre-alpha 6573) +#define DEVICE_VER 0x0065 // A for A (alpha) +#define MANUFACTURER Mode +#define PRODUCT SixtyFive HI + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B10, B12, C8 , C4 , C5 , B0 , C10, B13, B14, B15, A15, C6 , C7 , A8 , C9 } +#define MATRIX_ROW_PINS { A7 , A10, D2 , C12, B1 , C11 } +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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 */ +#define LOCKING_RESYNC_ENABLE + +#define EEPROM_I2C_24LC256 +//#define I2C1_CLOCK_SPEED 400000 +//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE + +#define STM32_HSECLK 8000000 + +#define OPENDRAIN_INDICATORS +#define LED_CAPS_LOCK_PIN A6 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/mode/m65hi_alpha/halconf.h b/keyboards/mode/m65hi_alpha/halconf.h new file mode 100644 index 000000000000..41bddcb2799b --- /dev/null +++ b/keyboards/mode/m65hi_alpha/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/mode/m65hi_alpha/info.json b/keyboards/mode/m65hi_alpha/info.json new file mode 100644 index 000000000000..aa5f98efc695 --- /dev/null +++ b/keyboards/mode/m65hi_alpha/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Mode SixtyFive HI", + "url": "", + "maintainer": "Gondolindrim", + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "K00", "x": 0, "y": 0 }, + { "label": "K01", "x": 1, "y": 0 }, + { "label": "K02", "x": 2, "y": 0 }, + { "label": "K03", "x": 3, "y": 0 }, + { "label": "K04", "x": 4, "y": 0 }, + { "label": "K05", "x": 5, "y": 0 }, + { "label": "K06", "x": 6, "y": 0 }, + { "label": "K07", "x": 7, "y": 0 }, + { "label": "K08", "x": 8, "y": 0 }, + { "label": "K09", "x": 9, "y": 0 }, + { "label": "K0A", "x": 10, "y": 0 }, + { "label": "K0B", "x": 11, "y": 0 }, + { "label": "K0C", "x": 12, "y": 0 }, + { "label": "K0D", "x": 13, "y": 0, "w": 2 }, + { "label": "K0E", "x": 15, "y": 0 }, + + { "label": "K10", "x": 0, "y": 1, "w": 1.5 }, + { "label": "K11", "x": 1.5, "y": 1 }, + { "label": "K12", "x": 2.5, "y": 1 }, + { "label": "K13", "x": 3.5, "y": 1 }, + { "label": "K14", "x": 4.5, "y": 1 }, + { "label": "K15", "x": 5.5, "y": 1 }, + { "label": "K16", "x": 6.5, "y": 1 }, + { "label": "K17", "x": 7.5, "y": 1 }, + { "label": "K18", "x": 8.5, "y": 1 }, + { "label": "K19", "x": 9.5, "y": 1 }, + { "label": "K1A", "x": 10.5, "y": 1 }, + { "label": "K1B", "x": 11.5, "y": 1 }, + { "label": "K1C", "x": 12.5, "y": 1 }, + { "label": "K1E", "x": 15, "y": 1 }, + + { "label": "K20", "x": 0, "y": 2, "w": 1.75 }, + { "label": "K21", "x": 1.75, "y": 2 }, + { "label": "K22", "x": 2.75, "y": 2 }, + { "label": "K23", "x": 3.75, "y": 2 }, + { "label": "K24", "x": 4.75, "y": 2 }, + { "label": "K25", "x": 5.75, "y": 2 }, + { "label": "K26", "x": 6.75, "y": 2 }, + { "label": "K27", "x": 7.75, "y": 2 }, + { "label": "K28", "x": 8.75, "y": 2 }, + { "label": "K29", "x": 9.75, "y": 2 }, + { "label": "K2A", "x": 10.75, "y": 2 }, + { "label": "K2B", "x": 11.75, "y": 2 }, + { "label": "K2C", "x": 12.75, "y": 2 }, + { "label": "K2D", "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, + { "label": "K2E", "x": 15, "y": 2 }, + + { "label": "K30", "x": 0, "y": 3, "w": 1.25 }, + { "label": "K31", "x": 1.25, "y": 3 }, + { "label": "K32", "x": 2.25, "y": 3 }, + { "label": "K33", "x": 3.25, "y": 3 }, + { "label": "K34", "x": 4.25, "y": 3 }, + { "label": "K35", "x": 5.25, "y": 3 }, + { "label": "K36", "x": 6.25, "y": 3 }, + { "label": "K37", "x": 7.25, "y": 3 }, + { "label": "K38", "x": 8.25, "y": 3 }, + { "label": "K39", "x": 9.25, "y": 3 }, + { "label": "K3A", "x": 10.25, "y": 3 }, + { "label": "K3B", "x": 11.25, "y": 3 }, + { "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "K3D", "x": 14, "y": 3 }, + { "label": "K3E", "x": 15, "y": 3 }, + + { "label": "K40", "x": 0, "y": 4, "w": 1.25 }, + { "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, + { "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, + { "label": "K5C", "x": 13, "y": 4 }, + { "label": "K5D", "x": 14, "y": 4 }, + { "label": "K5E", "x": 15, "y": 4 } + ] + } + } +} diff --git a/keyboards/mode/m65hi_alpha/keymaps/default/keymap.c b/keyboards/mode/m65hi_alpha/keymaps/default/keymap.c new file mode 100755 index 000000000000..2159d5ffe85b --- /dev/null +++ b/keyboards/mode/m65hi_alpha/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_DEL , + 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_PGDN, + 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_NUHS, KC_ENT , KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1) , KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65hi_alpha/keymaps/via/keymap.c b/keyboards/mode/m65hi_alpha/keymaps/via/keymap.c new file mode 100755 index 000000000000..6d84d3849631 --- /dev/null +++ b/keyboards/mode/m65hi_alpha/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_DEL , + 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_PGDN, + 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_NUHS, KC_ENT , KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(1) , KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65hi_alpha/keymaps/via/rules.mk b/keyboards/mode/m65hi_alpha/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/mode/m65hi_alpha/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mode/m65hi_alpha/m65hi_alpha.c b/keyboards/mode/m65hi_alpha/m65hi_alpha.c new file mode 100644 index 000000000000..644974870175 --- /dev/null +++ b/keyboards/mode/m65hi_alpha/m65hi_alpha.c @@ -0,0 +1,109 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "m65hi_alpha.h" + +void board_init(void) { + setPinInput(B9); + setPinInput(B10); +} + +#define LED_PIN_ON_STATE 1 +void led_init_ports(void) { + +/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator + pins default to push-pull output. Else, they are defined as open-drain. The + pin mode configuration is done through the INDICATOR_PIN_MODE which is + attributed right at the beggining. **/ + +#ifndef OPENDRAIN_INDICATORS +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL +#else +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN +#endif + +#ifdef LED_NUM_LOCK_PIN + palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_CAPS_LOCK_PIN + palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_SCROLL_LOCK_PIN + palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_COMPOSE_PIN + palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_KANA_PIN + palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); +#endif +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + } + return res; +} + +uint8_t prng(void) { + static uint8_t s = 0xAA, a = 0; + s ^= s << 3; + s ^= s >> 5; + s ^= a++ >> 2; + return s; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable = true; + // debug_matrix = true; + // debug_keyboard=true; + // debug_mouse=true; +} + +void matrix_scan_user(void) { + static uint32_t last_eeprom_access = 0; + uint32_t now = timer_read32(); + if (now - last_eeprom_access > 5000) { + dprint("reading eeprom\n"); + last_eeprom_access = now; + + union { + uint8_t bytes[4]; + uint32_t raw; + } tmp; + tmp.bytes[0] = prng(); + tmp.bytes[1] = prng(); + tmp.bytes[2] = prng(); + tmp.bytes[3] = prng(); + + eeconfig_update_user(tmp.raw); + uint32_t value = eeconfig_read_user(); + if (value != tmp.raw) { + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + dprint("!! EEPROM readback mismatch!\n"); + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + } + } +} diff --git a/keyboards/mode/m65hi_alpha/m65hi_alpha.h b/keyboards/mode/m65hi_alpha/m65hi_alpha.h new file mode 100644 index 000000000000..7d2b5cc68ed4 --- /dev/null +++ b/keyboards/mode/m65hi_alpha/m65hi_alpha.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, ___, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ +} diff --git a/keyboards/mode/m65hi_alpha/mcuconf.h b/keyboards/mode/m65hi_alpha/mcuconf.h new file mode 100644 index 000000000000..97f2ee51ee08 --- /dev/null +++ b/keyboards/mode/m65hi_alpha/mcuconf.h @@ -0,0 +1,40 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/acheron/austin/mcuconf.h -r platforms/chibios/GENERIC_STM32_F072XB/configs/mcuconf.h` + */ + +#pragma once + +#include_next +#undef STM32_PLLM_VALUE +#undef STM32_PLLN_VALUE +#undef STM32_PLLP_VALUE +#undef STM32_PLLQ_VALUE +#undef STM32_PPRE1 +#undef STM32_PPRE2 + +#define STM32_PLLM_VALUE 4 +#define STM32_PLLN_VALUE 168 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV1 + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/mode/m65hi_alpha/readme.md b/keyboards/mode/m65hi_alpha/readme.md new file mode 100644 index 000000000000..6dcc32656581 --- /dev/null +++ b/keyboards/mode/m65hi_alpha/readme.md @@ -0,0 +1,15 @@ +# Mode SixtyFive HI rev. Alpha + +![Image Gallery](https://cdn.shopify.com/s/files/1/0279/3426/1330/files/Group_95_1024x1024.jpg) + +The Mode SixtyFive is a 65% high-end keyboard sold by [Mode Designs](https://shop.modedesigns.com/). The M65HI is the ISO-layout variant of its PCB. + +* Keyboard Maintainer: [Gondolindrim](https://github.com/gondolindrim) +* Hardware Supported: proprietary PCB using STM32F401 controller +* Hardware Availability: revision 1 public sales are over as of june 2021. + +Flashing example for this keyboard: + + make mode/m65hi_alpha:default:flash + +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). diff --git a/keyboards/mode/m65hi_alpha/rules.mk b/keyboards/mode/m65hi_alpha/rules.mk new file mode 100644 index 000000000000..f33a05592077 --- /dev/null +++ b/keyboards/mode/m65hi_alpha/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = STM32F401 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +EEPROM_DRIVER = i2c +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE diff --git a/keyboards/mode/m65hi_pre-alpha/chconf.h b/keyboards/mode/m65hi_pre-alpha/chconf.h new file mode 100644 index 000000000000..cbbae31079fb --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/chconf.h @@ -0,0 +1,25 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define CH_CFG_ST_FREQUENCY 10000 + +#define CH_CFG_OPTIMIZE_SPEED FALSE + +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +#include_next diff --git a/keyboards/mode/m65hi_pre-alpha/config.h b/keyboards/mode/m65hi_pre-alpha/config.h new file mode 100644 index 000000000000..55af4f0d3871 --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/config.h @@ -0,0 +1,73 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x00DE +#define PRODUCT_ID 0x6573 // For 65I +#define DEVICE_VER 0x8065 // PA for pre-Alpha +#define MANUFACTURER Mode +#define PRODUCT SixtyFive HI + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B10, B12, C8 , C5 , B0 , B1 , C10, B13, B14, B15, A15, C6 , C7 , C9 , A8 } +#define MATRIX_ROW_PINS { C4 , A10, D2 , C12, A7 , C11 } +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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 */ +#define LOCKING_RESYNC_ENABLE + +#define EEPROM_I2C_24LC256 +//#define I2C1_CLOCK_SPEED 400000 +//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE + +#define STM32_HSECLK 8000000 + +#define OPENDRAIN_INDICATORS +#define LED_CAPS_LOCK_PIN A6 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/mode/m65hi_pre-alpha/halconf.h b/keyboards/mode/m65hi_pre-alpha/halconf.h new file mode 100644 index 000000000000..41bddcb2799b --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/mode/m65hi_pre-alpha/info.json b/keyboards/mode/m65hi_pre-alpha/info.json new file mode 100644 index 000000000000..a3b5b6cccb13 --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Mode SixtyFive HI pre-Alpha", + "url": "", + "maintainer": "Gondolindrim", + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "K00", "x": 0, "y": 0 }, + { "label": "K01", "x": 1, "y": 0 }, + { "label": "K02", "x": 2, "y": 0 }, + { "label": "K03", "x": 3, "y": 0 }, + { "label": "K04", "x": 4, "y": 0 }, + { "label": "K05", "x": 5, "y": 0 }, + { "label": "K06", "x": 6, "y": 0 }, + { "label": "K07", "x": 7, "y": 0 }, + { "label": "K08", "x": 8, "y": 0 }, + { "label": "K09", "x": 9, "y": 0 }, + { "label": "K0A", "x": 10, "y": 0 }, + { "label": "K0B", "x": 11, "y": 0 }, + { "label": "K0C", "x": 12, "y": 0 }, + { "label": "K0D", "x": 13, "y": 0, "w": 2 }, + { "label": "K0E", "x": 15, "y": 0 }, + + { "label": "K10", "x": 0, "y": 1, "w": 1.5 }, + { "label": "K11", "x": 1.5, "y": 1 }, + { "label": "K12", "x": 2.5, "y": 1 }, + { "label": "K13", "x": 3.5, "y": 1 }, + { "label": "K14", "x": 4.5, "y": 1 }, + { "label": "K15", "x": 5.5, "y": 1 }, + { "label": "K16", "x": 6.5, "y": 1 }, + { "label": "K17", "x": 7.5, "y": 1 }, + { "label": "K18", "x": 8.5, "y": 1 }, + { "label": "K19", "x": 9.5, "y": 1 }, + { "label": "K1A", "x": 10.5, "y": 1 }, + { "label": "K1B", "x": 11.5, "y": 1 }, + { "label": "K1C", "x": 12.5, "y": 1 }, + { "label": "K1E", "x": 15, "y": 1 }, + + { "label": "K20", "x": 0, "y": 2, "w": 1.75 }, + { "label": "K21", "x": 1.75, "y": 2 }, + { "label": "K22", "x": 2.75, "y": 2 }, + { "label": "K23", "x": 3.75, "y": 2 }, + { "label": "K24", "x": 4.75, "y": 2 }, + { "label": "K25", "x": 5.75, "y": 2 }, + { "label": "K26", "x": 6.75, "y": 2 }, + { "label": "K27", "x": 7.75, "y": 2 }, + { "label": "K28", "x": 8.75, "y": 2 }, + { "label": "K29", "x": 9.75, "y": 2 }, + { "label": "K2A", "x": 10.75, "y": 2 }, + { "label": "K2B", "x": 11.75, "y": 2 }, + { "label": "K2C", "x": 12.75, "y": 2 }, + { "label": "K2D", "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, + { "label": "K2E", "x": 15, "y": 2 }, + + { "label": "K30", "x": 0, "y": 3, "w": 1.25 }, + { "label": "K31", "x": 1.25, "y": 3 }, + { "label": "K32", "x": 2.25, "y": 3 }, + { "label": "K33", "x": 3.25, "y": 3 }, + { "label": "K34", "x": 4.25, "y": 3 }, + { "label": "K35", "x": 5.25, "y": 3 }, + { "label": "K36", "x": 6.25, "y": 3 }, + { "label": "K37", "x": 7.25, "y": 3 }, + { "label": "K38", "x": 8.25, "y": 3 }, + { "label": "K39", "x": 9.25, "y": 3 }, + { "label": "K3A", "x": 10.25, "y": 3 }, + { "label": "K3B", "x": 11.25, "y": 3 }, + { "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "K3D", "x": 14, "y": 3 }, + { "label": "K3E", "x": 15, "y": 3 }, + + { "label": "K40", "x": 0, "y": 4, "w": 1.25 }, + { "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, + { "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, + { "label": "K5C", "x": 13, "y": 4 }, + { "label": "K5D", "x": 14, "y": 4 }, + { "label": "K5E", "x": 15, "y": 4 } + ] + } + } +} diff --git a/keyboards/mode/m65hi_pre-alpha/keymaps/default/keymap.c b/keyboards/mode/m65hi_pre-alpha/keymaps/default/keymap.c new file mode 100755 index 000000000000..1fcde6b998ae --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_BSPC, + 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_DEL , KC_PGDN, + 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_NUHS, KC_ENT , KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65hi_pre-alpha/keymaps/via/keymap.c b/keyboards/mode/m65hi_pre-alpha/keymaps/via/keymap.c new file mode 100755 index 000000000000..1fcde6b998ae --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_BSPC, + 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_DEL , KC_PGDN, + 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_NUHS, KC_ENT , KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65hi_pre-alpha/keymaps/via/rules.mk b/keyboards/mode/m65hi_pre-alpha/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.c b/keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.c new file mode 100644 index 000000000000..b71b0f928260 --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.c @@ -0,0 +1,109 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "m65hi_preAlpha.h" + +void board_init(void) { + setPinInput(B9); + setPinInput(B10); +} + +#define LED_PIN_ON_STATE 1 +void led_init_ports(void) { + +/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator + pins default to push-pull output. Else, they are defined as open-drain. The + pin mode configuration is done through the INDICATOR_PIN_MODE which is + attributed right at the beggining. **/ + +#ifndef OPENDRAIN_INDICATORS +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL +#else +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN +#endif + +#ifdef LED_NUM_LOCK_PIN + palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_CAPS_LOCK_PIN + palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_SCROLL_LOCK_PIN + palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_COMPOSE_PIN + palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_KANA_PIN + palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); +#endif +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + } + return res; +} + +uint8_t prng(void) { + static uint8_t s = 0xAA, a = 0; + s ^= s << 3; + s ^= s >> 5; + s ^= a++ >> 2; + return s; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable = true; + // debug_matrix = true; + // debug_keyboard=true; + // debug_mouse=true; +} + +void matrix_scan_user(void) { + static uint32_t last_eeprom_access = 0; + uint32_t now = timer_read32(); + if (now - last_eeprom_access > 5000) { + dprint("reading eeprom\n"); + last_eeprom_access = now; + + union { + uint8_t bytes[4]; + uint32_t raw; + } tmp; + tmp.bytes[0] = prng(); + tmp.bytes[1] = prng(); + tmp.bytes[2] = prng(); + tmp.bytes[3] = prng(); + + eeconfig_update_user(tmp.raw); + uint32_t value = eeconfig_read_user(); + if (value != tmp.raw) { + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + dprint("!! EEPROM readback mismatch!\n"); + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + } + } +} diff --git a/keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.h b/keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.h new file mode 100644 index 000000000000..06da1758f8b0 --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ +} diff --git a/keyboards/mode/m65hi_pre-alpha/mcuconf.h b/keyboards/mode/m65hi_pre-alpha/mcuconf.h new file mode 100644 index 000000000000..e4cefd0b75c7 --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/mcuconf.h @@ -0,0 +1,35 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next +#undef STM32_PLLM_VALUE +#undef STM32_PLLN_VALUE +#undef STM32_PLLP_VALUE +#undef STM32_PLLQ_VALUE +#undef STM32_PPRE1 +#undef STM32_PPRE2 + +#define STM32_PLLM_VALUE 4 +#define STM32_PLLN_VALUE 168 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV1 + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/mode/m65hi_pre-alpha/readme.md b/keyboards/mode/m65hi_pre-alpha/readme.md new file mode 100644 index 000000000000..2630547e1f27 --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/readme.md @@ -0,0 +1,9 @@ +# Mode M65HI (pre-release Alpha version) + +This is the firmware page for the pre-Alpha version of the Mode M65HI PCB. It was intended as a test prototype. For the public-released Alpha release, use the `./m65hi_alpha` firmware. + +This PCB was not publicly released. Its firmware is kept as an archive for prototyping purposes and future developments. + +# Needed patches + +For the firmware to properly work, the PCB needs a jumper from the cathode of the right alt key to the exposed pin PA7. diff --git a/keyboards/mode/m65hi_pre-alpha/rules.mk b/keyboards/mode/m65hi_pre-alpha/rules.mk new file mode 100644 index 000000000000..f33a05592077 --- /dev/null +++ b/keyboards/mode/m65hi_pre-alpha/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = STM32F401 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +EEPROM_DRIVER = i2c +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE From b9d4ad099d2a62593074e0a4acdf9cafd8023d7c Mon Sep 17 00:00:00 2001 From: Gondolindrim Date: Tue, 16 Nov 2021 21:09:38 -0300 Subject: [PATCH 2/6] Remove hyphens from file and foldernames --- keyboards/mode/m65ha_prealpha/chconf.h | 25 ++++ keyboards/mode/m65ha_prealpha/config.h | 73 ++++++++++++ keyboards/mode/m65ha_prealpha/halconf.h | 21 ++++ keyboards/mode/m65ha_prealpha/info.json | 82 +++++++++++++ .../m65ha_prealpha/keymaps/default/keymap.c | 49 ++++++++ .../mode/m65ha_prealpha/keymaps/via/keymap.c | 49 ++++++++ .../mode/m65ha_prealpha/keymaps/via/rules.mk | 1 + .../mode/m65ha_prealpha/m65ha_prealpha.c | 109 ++++++++++++++++++ .../mode/m65ha_prealpha/m65ha_prealpha.h | 37 ++++++ keyboards/mode/m65ha_prealpha/mcuconf.h | 35 ++++++ keyboards/mode/m65ha_prealpha/readme.md | 9 ++ keyboards/mode/m65ha_prealpha/rules.mk | 24 ++++ keyboards/mode/m65hi_prealpha/chconf.h | 25 ++++ keyboards/mode/m65hi_prealpha/config.h | 73 ++++++++++++ keyboards/mode/m65hi_prealpha/halconf.h | 21 ++++ keyboards/mode/m65hi_prealpha/info.json | 83 +++++++++++++ .../m65hi_prealpha/keymaps/default/keymap.c | 49 ++++++++ .../mode/m65hi_prealpha/keymaps/via/keymap.c | 49 ++++++++ .../mode/m65hi_prealpha/keymaps/via/rules.mk | 1 + .../mode/m65hi_prealpha/m65hi_prealpha.c | 109 ++++++++++++++++++ .../mode/m65hi_prealpha/m65hi_prealpha.h | 37 ++++++ keyboards/mode/m65hi_prealpha/mcuconf.h | 35 ++++++ keyboards/mode/m65hi_prealpha/readme.md | 9 ++ keyboards/mode/m65hi_prealpha/rules.mk | 24 ++++ 24 files changed, 1029 insertions(+) create mode 100644 keyboards/mode/m65ha_prealpha/chconf.h create mode 100644 keyboards/mode/m65ha_prealpha/config.h create mode 100644 keyboards/mode/m65ha_prealpha/halconf.h create mode 100644 keyboards/mode/m65ha_prealpha/info.json create mode 100755 keyboards/mode/m65ha_prealpha/keymaps/default/keymap.c create mode 100755 keyboards/mode/m65ha_prealpha/keymaps/via/keymap.c create mode 100644 keyboards/mode/m65ha_prealpha/keymaps/via/rules.mk create mode 100644 keyboards/mode/m65ha_prealpha/m65ha_prealpha.c create mode 100644 keyboards/mode/m65ha_prealpha/m65ha_prealpha.h create mode 100644 keyboards/mode/m65ha_prealpha/mcuconf.h create mode 100644 keyboards/mode/m65ha_prealpha/readme.md create mode 100644 keyboards/mode/m65ha_prealpha/rules.mk create mode 100644 keyboards/mode/m65hi_prealpha/chconf.h create mode 100644 keyboards/mode/m65hi_prealpha/config.h create mode 100644 keyboards/mode/m65hi_prealpha/halconf.h create mode 100644 keyboards/mode/m65hi_prealpha/info.json create mode 100755 keyboards/mode/m65hi_prealpha/keymaps/default/keymap.c create mode 100755 keyboards/mode/m65hi_prealpha/keymaps/via/keymap.c create mode 100644 keyboards/mode/m65hi_prealpha/keymaps/via/rules.mk create mode 100644 keyboards/mode/m65hi_prealpha/m65hi_prealpha.c create mode 100644 keyboards/mode/m65hi_prealpha/m65hi_prealpha.h create mode 100644 keyboards/mode/m65hi_prealpha/mcuconf.h create mode 100644 keyboards/mode/m65hi_prealpha/readme.md create mode 100644 keyboards/mode/m65hi_prealpha/rules.mk diff --git a/keyboards/mode/m65ha_prealpha/chconf.h b/keyboards/mode/m65ha_prealpha/chconf.h new file mode 100644 index 000000000000..cbbae31079fb --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/chconf.h @@ -0,0 +1,25 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define CH_CFG_ST_FREQUENCY 10000 + +#define CH_CFG_OPTIMIZE_SPEED FALSE + +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +#include_next diff --git a/keyboards/mode/m65ha_prealpha/config.h b/keyboards/mode/m65ha_prealpha/config.h new file mode 100644 index 000000000000..22472eee3e63 --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/config.h @@ -0,0 +1,73 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x00DE +#define PRODUCT_ID 0x6565 // For 65A +#define DEVICE_VER 0x8065 // PA for pre-Alpha +#define MANUFACTURER Mode +#define PRODUCT SixtyFive HA + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B10, B12, C8 , C5 , B0 , B1 , C10, B13, B14, B15, A15, C6 , C7 , C9 , A8 } +#define MATRIX_ROW_PINS { C4 , A10, D2 , C12, A7 , C11 } +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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 */ +#define LOCKING_RESYNC_ENABLE + +#define EEPROM_I2C_24LC256 +//#define I2C1_CLOCK_SPEED 400000 +//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE + +#define STM32_HSECLK 8000000 + +#define OPENDRAIN_INDICATORS +#define LED_CAPS_LOCK_PIN A6 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/mode/m65ha_prealpha/halconf.h b/keyboards/mode/m65ha_prealpha/halconf.h new file mode 100644 index 000000000000..41bddcb2799b --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/mode/m65ha_prealpha/info.json b/keyboards/mode/m65ha_prealpha/info.json new file mode 100644 index 000000000000..b58c1153cf2e --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Mode SixtyFive HA pre-Alpha", + "url": "", + "maintainer": "Gondolindrim", + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "K00", "x": 0, "y": 0 }, + { "label": "K01", "x": 1, "y": 0 }, + { "label": "K02", "x": 2, "y": 0 }, + { "label": "K03", "x": 3, "y": 0 }, + { "label": "K04", "x": 4, "y": 0 }, + { "label": "K05", "x": 5, "y": 0 }, + { "label": "K06", "x": 6, "y": 0 }, + { "label": "K07", "x": 7, "y": 0 }, + { "label": "K08", "x": 8, "y": 0 }, + { "label": "K09", "x": 9, "y": 0 }, + { "label": "K0A", "x": 10, "y": 0 }, + { "label": "K0B", "x": 11, "y": 0 }, + { "label": "K0C", "x": 12, "y": 0 }, + { "label": "K0D", "x": 13, "y": 0, "w": 2 }, + { "label": "K0E", "x": 15, "y": 0 }, + + { "label": "K10", "x": 0, "y": 1, "w": 1.5 }, + { "label": "K11", "x": 1.5, "y": 1 }, + { "label": "K12", "x": 2.5, "y": 1 }, + { "label": "K13", "x": 3.5, "y": 1 }, + { "label": "K14", "x": 4.5, "y": 1 }, + { "label": "K15", "x": 5.5, "y": 1 }, + { "label": "K16", "x": 6.5, "y": 1 }, + { "label": "K17", "x": 7.5, "y": 1 }, + { "label": "K18", "x": 8.5, "y": 1 }, + { "label": "K19", "x": 9.5, "y": 1 }, + { "label": "K1A", "x": 10.5, "y": 1 }, + { "label": "K1B", "x": 11.5, "y": 1 }, + { "label": "K1C", "x": 12.5, "y": 1 }, + { "label": "K1D", "x": 13.5, "y": 1, "w": 1.5}, + { "label": "K1E", "x": 15, "y": 1 }, + + { "label": "K20", "x": 0, "y": 2, "w": 1.75 }, + { "label": "K21", "x": 1.75, "y": 2 }, + { "label": "K22", "x": 2.75, "y": 2 }, + { "label": "K23", "x": 3.75, "y": 2 }, + { "label": "K24", "x": 4.75, "y": 2 }, + { "label": "K25", "x": 5.75, "y": 2 }, + { "label": "K26", "x": 6.75, "y": 2 }, + { "label": "K27", "x": 7.75, "y": 2 }, + { "label": "K28", "x": 8.75, "y": 2 }, + { "label": "K29", "x": 9.75, "y": 2 }, + { "label": "K2A", "x": 10.75, "y": 2 }, + { "label": "K2B", "x": 11.75, "y": 2 }, + { "label": "K2D", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "K2E", "x": 15, "y": 2 }, + + { "label": "K30", "x": 0, "y": 3, "w": 2.25 }, + { "label": "K32", "x": 2.25, "y": 3 }, + { "label": "K33", "x": 3.25, "y": 3 }, + { "label": "K34", "x": 4.25, "y": 3 }, + { "label": "K35", "x": 5.25, "y": 3 }, + { "label": "K36", "x": 6.25, "y": 3 }, + { "label": "K37", "x": 7.25, "y": 3 }, + { "label": "K38", "x": 8.25, "y": 3 }, + { "label": "K39", "x": 9.25, "y": 3 }, + { "label": "K3A", "x": 10.25, "y": 3 }, + { "label": "K3B", "x": 11.25, "y": 3 }, + { "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "K3D", "x": 14, "y": 3 }, + { "label": "K3E", "x": 15, "y": 3 }, + + { "label": "K40", "x": 0, "y": 4, "w": 1.25 }, + { "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, + { "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, + { "label": "K5C", "x": 13, "y": 4 }, + { "label": "K5D", "x": 14, "y": 4 }, + { "label": "K5E", "x": 15, "y": 4 } + ] + } + } +} diff --git a/keyboards/mode/m65ha_prealpha/keymaps/default/keymap.c b/keyboards/mode/m65ha_prealpha/keymaps/default/keymap.c new file mode 100755 index 000000000000..2195856f0cc5 --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_DEL , + 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_PGUP, + 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 , KC_PGDN, + 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 , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65ha_prealpha/keymaps/via/keymap.c b/keyboards/mode/m65ha_prealpha/keymaps/via/keymap.c new file mode 100755 index 000000000000..8a322b0002e8 --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_BSPC, + 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_PGUP, + 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_DEL , KC_ENT , KC_PGDN, + 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 , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65ha_prealpha/keymaps/via/rules.mk b/keyboards/mode/m65ha_prealpha/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mode/m65ha_prealpha/m65ha_prealpha.c b/keyboards/mode/m65ha_prealpha/m65ha_prealpha.c new file mode 100644 index 000000000000..3f137a928e70 --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/m65ha_prealpha.c @@ -0,0 +1,109 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "m65ha_prealpha.h" + +void board_init(void) { + setPinInput(B9); + setPinInput(B10); +} + +#define LED_PIN_ON_STATE 1 +void led_init_ports(void) { + +/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator + pins default to push-pull output. Else, they are defined as open-drain. The + pin mode configuration is done through the INDICATOR_PIN_MODE which is + attributed right at the beggining. **/ + +#ifndef OPENDRAIN_INDICATORS +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL +#else +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN +#endif + +#ifdef LED_NUM_LOCK_PIN + palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_CAPS_LOCK_PIN + palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_SCROLL_LOCK_PIN + palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_COMPOSE_PIN + palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_KANA_PIN + palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); +#endif +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + } + return res; +} + +uint8_t prng(void) { + static uint8_t s = 0xAA, a = 0; + s ^= s << 3; + s ^= s >> 5; + s ^= a++ >> 2; + return s; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + // debug_enable = true; + // debug_matrix = true; + // debug_keyboard=true; + // debug_mouse=true; +} + +void matrix_scan_user(void) { + static uint32_t last_eeprom_access = 0; + uint32_t now = timer_read32(); + if (now - last_eeprom_access > 5000) { + dprint("reading eeprom\n"); + last_eeprom_access = now; + + union { + uint8_t bytes[4]; + uint32_t raw; + } tmp; + tmp.bytes[0] = prng(); + tmp.bytes[1] = prng(); + tmp.bytes[2] = prng(); + tmp.bytes[3] = prng(); + + eeconfig_update_user(tmp.raw); + uint32_t value = eeconfig_read_user(); + if (value != tmp.raw) { + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + dprint("!! EEPROM readback mismatch!\n"); + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + } + } +} diff --git a/keyboards/mode/m65ha_prealpha/m65ha_prealpha.h b/keyboards/mode/m65ha_prealpha/m65ha_prealpha.h new file mode 100644 index 000000000000..1e9d57476d2a --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/m65ha_prealpha.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E }, \ + { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ +} diff --git a/keyboards/mode/m65ha_prealpha/mcuconf.h b/keyboards/mode/m65ha_prealpha/mcuconf.h new file mode 100644 index 000000000000..e4cefd0b75c7 --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/mcuconf.h @@ -0,0 +1,35 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next +#undef STM32_PLLM_VALUE +#undef STM32_PLLN_VALUE +#undef STM32_PLLP_VALUE +#undef STM32_PLLQ_VALUE +#undef STM32_PPRE1 +#undef STM32_PPRE2 + +#define STM32_PLLM_VALUE 4 +#define STM32_PLLN_VALUE 168 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV1 + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/mode/m65ha_prealpha/readme.md b/keyboards/mode/m65ha_prealpha/readme.md new file mode 100644 index 000000000000..04a0288f0aed --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/readme.md @@ -0,0 +1,9 @@ +# Mode M65HA (pre-release Alpha version) + +This is the firmware page for the pre-Alpha version of the Mode M65HA PCB. It was intended as a test prototype. For the public-released Alpha release, use the `./m65ha_alpha` firmware. + +This PCB was not publicly released. Its firmware is kept as an archive for prototyping purposes and future developments. + +# Needed patches + +For the firmware to properly work, the PCB needs a jumper from the cathode of the right alt key to the exposed pin PA7. diff --git a/keyboards/mode/m65ha_prealpha/rules.mk b/keyboards/mode/m65ha_prealpha/rules.mk new file mode 100644 index 000000000000..f33a05592077 --- /dev/null +++ b/keyboards/mode/m65ha_prealpha/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = STM32F401 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +EEPROM_DRIVER = i2c +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE diff --git a/keyboards/mode/m65hi_prealpha/chconf.h b/keyboards/mode/m65hi_prealpha/chconf.h new file mode 100644 index 000000000000..cbbae31079fb --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/chconf.h @@ -0,0 +1,25 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define CH_CFG_ST_FREQUENCY 10000 + +#define CH_CFG_OPTIMIZE_SPEED FALSE + +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +#include_next diff --git a/keyboards/mode/m65hi_prealpha/config.h b/keyboards/mode/m65hi_prealpha/config.h new file mode 100644 index 000000000000..55af4f0d3871 --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/config.h @@ -0,0 +1,73 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x00DE +#define PRODUCT_ID 0x6573 // For 65I +#define DEVICE_VER 0x8065 // PA for pre-Alpha +#define MANUFACTURER Mode +#define PRODUCT SixtyFive HI + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B10, B12, C8 , C5 , B0 , B1 , C10, B13, B14, B15, A15, C6 , C7 , C9 , A8 } +#define MATRIX_ROW_PINS { C4 , A10, D2 , C12, A7 , C11 } +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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 */ +#define LOCKING_RESYNC_ENABLE + +#define EEPROM_I2C_24LC256 +//#define I2C1_CLOCK_SPEED 400000 +//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 + +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE + +#define STM32_HSECLK 8000000 + +#define OPENDRAIN_INDICATORS +#define LED_CAPS_LOCK_PIN A6 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/mode/m65hi_prealpha/halconf.h b/keyboards/mode/m65hi_prealpha/halconf.h new file mode 100644 index 000000000000..41bddcb2799b --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/halconf.h @@ -0,0 +1,21 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/mode/m65hi_prealpha/info.json b/keyboards/mode/m65hi_prealpha/info.json new file mode 100644 index 000000000000..a3b5b6cccb13 --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Mode SixtyFive HI pre-Alpha", + "url": "", + "maintainer": "Gondolindrim", + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "K00", "x": 0, "y": 0 }, + { "label": "K01", "x": 1, "y": 0 }, + { "label": "K02", "x": 2, "y": 0 }, + { "label": "K03", "x": 3, "y": 0 }, + { "label": "K04", "x": 4, "y": 0 }, + { "label": "K05", "x": 5, "y": 0 }, + { "label": "K06", "x": 6, "y": 0 }, + { "label": "K07", "x": 7, "y": 0 }, + { "label": "K08", "x": 8, "y": 0 }, + { "label": "K09", "x": 9, "y": 0 }, + { "label": "K0A", "x": 10, "y": 0 }, + { "label": "K0B", "x": 11, "y": 0 }, + { "label": "K0C", "x": 12, "y": 0 }, + { "label": "K0D", "x": 13, "y": 0, "w": 2 }, + { "label": "K0E", "x": 15, "y": 0 }, + + { "label": "K10", "x": 0, "y": 1, "w": 1.5 }, + { "label": "K11", "x": 1.5, "y": 1 }, + { "label": "K12", "x": 2.5, "y": 1 }, + { "label": "K13", "x": 3.5, "y": 1 }, + { "label": "K14", "x": 4.5, "y": 1 }, + { "label": "K15", "x": 5.5, "y": 1 }, + { "label": "K16", "x": 6.5, "y": 1 }, + { "label": "K17", "x": 7.5, "y": 1 }, + { "label": "K18", "x": 8.5, "y": 1 }, + { "label": "K19", "x": 9.5, "y": 1 }, + { "label": "K1A", "x": 10.5, "y": 1 }, + { "label": "K1B", "x": 11.5, "y": 1 }, + { "label": "K1C", "x": 12.5, "y": 1 }, + { "label": "K1E", "x": 15, "y": 1 }, + + { "label": "K20", "x": 0, "y": 2, "w": 1.75 }, + { "label": "K21", "x": 1.75, "y": 2 }, + { "label": "K22", "x": 2.75, "y": 2 }, + { "label": "K23", "x": 3.75, "y": 2 }, + { "label": "K24", "x": 4.75, "y": 2 }, + { "label": "K25", "x": 5.75, "y": 2 }, + { "label": "K26", "x": 6.75, "y": 2 }, + { "label": "K27", "x": 7.75, "y": 2 }, + { "label": "K28", "x": 8.75, "y": 2 }, + { "label": "K29", "x": 9.75, "y": 2 }, + { "label": "K2A", "x": 10.75, "y": 2 }, + { "label": "K2B", "x": 11.75, "y": 2 }, + { "label": "K2C", "x": 12.75, "y": 2 }, + { "label": "K2D", "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, + { "label": "K2E", "x": 15, "y": 2 }, + + { "label": "K30", "x": 0, "y": 3, "w": 1.25 }, + { "label": "K31", "x": 1.25, "y": 3 }, + { "label": "K32", "x": 2.25, "y": 3 }, + { "label": "K33", "x": 3.25, "y": 3 }, + { "label": "K34", "x": 4.25, "y": 3 }, + { "label": "K35", "x": 5.25, "y": 3 }, + { "label": "K36", "x": 6.25, "y": 3 }, + { "label": "K37", "x": 7.25, "y": 3 }, + { "label": "K38", "x": 8.25, "y": 3 }, + { "label": "K39", "x": 9.25, "y": 3 }, + { "label": "K3A", "x": 10.25, "y": 3 }, + { "label": "K3B", "x": 11.25, "y": 3 }, + { "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "K3D", "x": 14, "y": 3 }, + { "label": "K3E", "x": 15, "y": 3 }, + + { "label": "K40", "x": 0, "y": 4, "w": 1.25 }, + { "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, + { "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, + { "label": "K5C", "x": 13, "y": 4 }, + { "label": "K5D", "x": 14, "y": 4 }, + { "label": "K5E", "x": 15, "y": 4 } + ] + } + } +} diff --git a/keyboards/mode/m65hi_prealpha/keymaps/default/keymap.c b/keyboards/mode/m65hi_prealpha/keymaps/default/keymap.c new file mode 100755 index 000000000000..1fcde6b998ae --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_BSPC, + 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_DEL , KC_PGDN, + 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_NUHS, KC_ENT , KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65hi_prealpha/keymaps/via/keymap.c b/keyboards/mode/m65hi_prealpha/keymaps/via/keymap.c new file mode 100755 index 000000000000..1fcde6b998ae --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC , 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_BSPC, + 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_DEL , KC_PGDN, + 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_NUHS, KC_ENT , KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + RESET , 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/mode/m65hi_prealpha/keymaps/via/rules.mk b/keyboards/mode/m65hi_prealpha/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/mode/m65hi_prealpha/m65hi_prealpha.c b/keyboards/mode/m65hi_prealpha/m65hi_prealpha.c new file mode 100644 index 000000000000..1e98c91f011b --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/m65hi_prealpha.c @@ -0,0 +1,109 @@ +/* + Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "m65hi_prealpha.h" + +void board_init(void) { + setPinInput(B9); + setPinInput(B10); +} + +#define LED_PIN_ON_STATE 1 +void led_init_ports(void) { + +/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator + pins default to push-pull output. Else, they are defined as open-drain. The + pin mode configuration is done through the INDICATOR_PIN_MODE which is + attributed right at the beggining. **/ + +#ifndef OPENDRAIN_INDICATORS +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL +#else +# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN +#endif + +#ifdef LED_NUM_LOCK_PIN + palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_CAPS_LOCK_PIN + palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_SCROLL_LOCK_PIN + palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_COMPOSE_PIN + palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); +#endif +#ifdef LED_KANA_PIN + palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); +#endif +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + } + return res; +} + +uint8_t prng(void) { + static uint8_t s = 0xAA, a = 0; + s ^= s << 3; + s ^= s >> 5; + s ^= a++ >> 2; + return s; +} + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable = true; + // debug_matrix = true; + // debug_keyboard=true; + // debug_mouse=true; +} + +void matrix_scan_user(void) { + static uint32_t last_eeprom_access = 0; + uint32_t now = timer_read32(); + if (now - last_eeprom_access > 5000) { + dprint("reading eeprom\n"); + last_eeprom_access = now; + + union { + uint8_t bytes[4]; + uint32_t raw; + } tmp; + tmp.bytes[0] = prng(); + tmp.bytes[1] = prng(); + tmp.bytes[2] = prng(); + tmp.bytes[3] = prng(); + + eeconfig_update_user(tmp.raw); + uint32_t value = eeconfig_read_user(); + if (value != tmp.raw) { + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + dprint("!! EEPROM readback mismatch!\n"); + dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); + } + } +} diff --git a/keyboards/mode/m65hi_prealpha/m65hi_prealpha.h b/keyboards/mode/m65hi_prealpha/m65hi_prealpha.h new file mode 100644 index 000000000000..06da1758f8b0 --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/m65hi_prealpha.h @@ -0,0 +1,37 @@ +/* +Copyright 2020 Álvaro "Gondolindrim" Volpato + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ +} diff --git a/keyboards/mode/m65hi_prealpha/mcuconf.h b/keyboards/mode/m65hi_prealpha/mcuconf.h new file mode 100644 index 000000000000..e4cefd0b75c7 --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/mcuconf.h @@ -0,0 +1,35 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next +#undef STM32_PLLM_VALUE +#undef STM32_PLLN_VALUE +#undef STM32_PLLP_VALUE +#undef STM32_PLLQ_VALUE +#undef STM32_PPRE1 +#undef STM32_PPRE2 + +#define STM32_PLLM_VALUE 4 +#define STM32_PLLN_VALUE 168 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV1 + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/mode/m65hi_prealpha/readme.md b/keyboards/mode/m65hi_prealpha/readme.md new file mode 100644 index 000000000000..2630547e1f27 --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/readme.md @@ -0,0 +1,9 @@ +# Mode M65HI (pre-release Alpha version) + +This is the firmware page for the pre-Alpha version of the Mode M65HI PCB. It was intended as a test prototype. For the public-released Alpha release, use the `./m65hi_alpha` firmware. + +This PCB was not publicly released. Its firmware is kept as an archive for prototyping purposes and future developments. + +# Needed patches + +For the firmware to properly work, the PCB needs a jumper from the cathode of the right alt key to the exposed pin PA7. diff --git a/keyboards/mode/m65hi_prealpha/rules.mk b/keyboards/mode/m65hi_prealpha/rules.mk new file mode 100644 index 000000000000..f33a05592077 --- /dev/null +++ b/keyboards/mode/m65hi_prealpha/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = STM32F401 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +EEPROM_DRIVER = i2c +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE From 8c818604e85c5ea8836a0f493f97c05f94d61a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Volpato?= Date: Tue, 23 Nov 2021 15:31:52 -0300 Subject: [PATCH 3/6] Remove hyphen fro M65HI pre-alpha --- keyboards/mode/m65ha_pre-alpha/config.h | 73 ------------ keyboards/mode/m65ha_pre-alpha/info.json | 82 ------------- .../m65ha_pre-alpha/keymaps/default/keymap.c | 49 -------- .../mode/m65ha_pre-alpha/keymaps/via/keymap.c | 49 -------- .../mode/m65ha_pre-alpha/m65ha_preAlpha.c | 109 ------------------ .../mode/m65ha_pre-alpha/m65ha_preAlpha.h | 37 ------ keyboards/mode/m65ha_pre-alpha/readme.md | 9 -- keyboards/mode/m65hi_pre-alpha/chconf.h | 25 ---- keyboards/mode/m65hi_pre-alpha/halconf.h | 21 ---- .../mode/m65hi_pre-alpha/keymaps/via/rules.mk | 1 - keyboards/mode/m65hi_pre-alpha/mcuconf.h | 35 ------ keyboards/mode/m65hi_pre-alpha/rules.mk | 24 ---- .../m65hi_pre-alpha}/chconf.h | 0 .../m65hi_pre-alpha/config.h | 0 .../m65hi_pre-alpha}/halconf.h | 0 .../m65hi_pre-alpha/info.json | 0 .../m65hi_pre-alpha/keymaps/default/keymap.c | 0 .../m65hi_pre-alpha/keymaps/via/keymap.c | 0 .../m65hi_pre-alpha}/keymaps/via/rules.mk | 0 .../m65hi_pre-alpha/m65hi_preAlpha.c | 0 .../m65hi_pre-alpha/m65hi_preAlpha.h | 0 .../m65hi_pre-alpha}/mcuconf.h | 0 .../m65hi_pre-alpha/readme.md | 0 .../m65hi_pre-alpha}/rules.mk | 0 24 files changed, 514 deletions(-) delete mode 100644 keyboards/mode/m65ha_pre-alpha/config.h delete mode 100644 keyboards/mode/m65ha_pre-alpha/info.json delete mode 100755 keyboards/mode/m65ha_pre-alpha/keymaps/default/keymap.c delete mode 100755 keyboards/mode/m65ha_pre-alpha/keymaps/via/keymap.c delete mode 100644 keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.c delete mode 100644 keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.h delete mode 100644 keyboards/mode/m65ha_pre-alpha/readme.md delete mode 100644 keyboards/mode/m65hi_pre-alpha/chconf.h delete mode 100644 keyboards/mode/m65hi_pre-alpha/halconf.h delete mode 100644 keyboards/mode/m65hi_pre-alpha/keymaps/via/rules.mk delete mode 100644 keyboards/mode/m65hi_pre-alpha/mcuconf.h delete mode 100644 keyboards/mode/m65hi_pre-alpha/rules.mk rename keyboards/mode/{m65ha_pre-alpha => m65hi_prealpha/m65hi_pre-alpha}/chconf.h (100%) rename keyboards/mode/{ => m65hi_prealpha}/m65hi_pre-alpha/config.h (100%) rename keyboards/mode/{m65ha_pre-alpha => m65hi_prealpha/m65hi_pre-alpha}/halconf.h (100%) rename keyboards/mode/{ => m65hi_prealpha}/m65hi_pre-alpha/info.json (100%) rename keyboards/mode/{ => m65hi_prealpha}/m65hi_pre-alpha/keymaps/default/keymap.c (100%) rename keyboards/mode/{ => m65hi_prealpha}/m65hi_pre-alpha/keymaps/via/keymap.c (100%) rename keyboards/mode/{m65ha_pre-alpha => m65hi_prealpha/m65hi_pre-alpha}/keymaps/via/rules.mk (100%) rename keyboards/mode/{ => m65hi_prealpha}/m65hi_pre-alpha/m65hi_preAlpha.c (100%) rename keyboards/mode/{ => m65hi_prealpha}/m65hi_pre-alpha/m65hi_preAlpha.h (100%) rename keyboards/mode/{m65ha_pre-alpha => m65hi_prealpha/m65hi_pre-alpha}/mcuconf.h (100%) rename keyboards/mode/{ => m65hi_prealpha}/m65hi_pre-alpha/readme.md (100%) rename keyboards/mode/{m65ha_pre-alpha => m65hi_prealpha/m65hi_pre-alpha}/rules.mk (100%) diff --git a/keyboards/mode/m65ha_pre-alpha/config.h b/keyboards/mode/m65ha_pre-alpha/config.h deleted file mode 100644 index 22472eee3e63..000000000000 --- a/keyboards/mode/m65ha_pre-alpha/config.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x00DE -#define PRODUCT_ID 0x6565 // For 65A -#define DEVICE_VER 0x8065 // PA for pre-Alpha -#define MANUFACTURER Mode -#define PRODUCT SixtyFive HA - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 15 - -#define MATRIX_COL_PINS { B10, B12, C8 , C5 , B0 , B1 , C10, B13, B14, B15, A15, C6 , C7 , C9 , A8 } -#define MATRIX_ROW_PINS { C4 , A10, D2 , C12, A7 , C11 } -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* 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 */ -#define LOCKING_RESYNC_ENABLE - -#define EEPROM_I2C_24LC256 -//#define I2C1_CLOCK_SPEED 400000 -//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 - -#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE - -#define STM32_HSECLK 8000000 - -#define OPENDRAIN_INDICATORS -#define LED_CAPS_LOCK_PIN A6 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION diff --git a/keyboards/mode/m65ha_pre-alpha/info.json b/keyboards/mode/m65ha_pre-alpha/info.json deleted file mode 100644 index b58c1153cf2e..000000000000 --- a/keyboards/mode/m65ha_pre-alpha/info.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "keyboard_name": "Mode SixtyFive HA pre-Alpha", - "url": "", - "maintainer": "Gondolindrim", - "layouts": { - "LAYOUT_all": { - "layout": [ - { "label": "K00", "x": 0, "y": 0 }, - { "label": "K01", "x": 1, "y": 0 }, - { "label": "K02", "x": 2, "y": 0 }, - { "label": "K03", "x": 3, "y": 0 }, - { "label": "K04", "x": 4, "y": 0 }, - { "label": "K05", "x": 5, "y": 0 }, - { "label": "K06", "x": 6, "y": 0 }, - { "label": "K07", "x": 7, "y": 0 }, - { "label": "K08", "x": 8, "y": 0 }, - { "label": "K09", "x": 9, "y": 0 }, - { "label": "K0A", "x": 10, "y": 0 }, - { "label": "K0B", "x": 11, "y": 0 }, - { "label": "K0C", "x": 12, "y": 0 }, - { "label": "K0D", "x": 13, "y": 0, "w": 2 }, - { "label": "K0E", "x": 15, "y": 0 }, - - { "label": "K10", "x": 0, "y": 1, "w": 1.5 }, - { "label": "K11", "x": 1.5, "y": 1 }, - { "label": "K12", "x": 2.5, "y": 1 }, - { "label": "K13", "x": 3.5, "y": 1 }, - { "label": "K14", "x": 4.5, "y": 1 }, - { "label": "K15", "x": 5.5, "y": 1 }, - { "label": "K16", "x": 6.5, "y": 1 }, - { "label": "K17", "x": 7.5, "y": 1 }, - { "label": "K18", "x": 8.5, "y": 1 }, - { "label": "K19", "x": 9.5, "y": 1 }, - { "label": "K1A", "x": 10.5, "y": 1 }, - { "label": "K1B", "x": 11.5, "y": 1 }, - { "label": "K1C", "x": 12.5, "y": 1 }, - { "label": "K1D", "x": 13.5, "y": 1, "w": 1.5}, - { "label": "K1E", "x": 15, "y": 1 }, - - { "label": "K20", "x": 0, "y": 2, "w": 1.75 }, - { "label": "K21", "x": 1.75, "y": 2 }, - { "label": "K22", "x": 2.75, "y": 2 }, - { "label": "K23", "x": 3.75, "y": 2 }, - { "label": "K24", "x": 4.75, "y": 2 }, - { "label": "K25", "x": 5.75, "y": 2 }, - { "label": "K26", "x": 6.75, "y": 2 }, - { "label": "K27", "x": 7.75, "y": 2 }, - { "label": "K28", "x": 8.75, "y": 2 }, - { "label": "K29", "x": 9.75, "y": 2 }, - { "label": "K2A", "x": 10.75, "y": 2 }, - { "label": "K2B", "x": 11.75, "y": 2 }, - { "label": "K2D", "x": 12.75, "y": 2, "w": 2.25 }, - { "label": "K2E", "x": 15, "y": 2 }, - - { "label": "K30", "x": 0, "y": 3, "w": 2.25 }, - { "label": "K32", "x": 2.25, "y": 3 }, - { "label": "K33", "x": 3.25, "y": 3 }, - { "label": "K34", "x": 4.25, "y": 3 }, - { "label": "K35", "x": 5.25, "y": 3 }, - { "label": "K36", "x": 6.25, "y": 3 }, - { "label": "K37", "x": 7.25, "y": 3 }, - { "label": "K38", "x": 8.25, "y": 3 }, - { "label": "K39", "x": 9.25, "y": 3 }, - { "label": "K3A", "x": 10.25, "y": 3 }, - { "label": "K3B", "x": 11.25, "y": 3 }, - { "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "K3D", "x": 14, "y": 3 }, - { "label": "K3E", "x": 15, "y": 3 }, - - { "label": "K40", "x": 0, "y": 4, "w": 1.25 }, - { "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, - { "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, - { "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, - { "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "K5C", "x": 13, "y": 4 }, - { "label": "K5D", "x": 14, "y": 4 }, - { "label": "K5E", "x": 15, "y": 4 } - ] - } - } -} diff --git a/keyboards/mode/m65ha_pre-alpha/keymaps/default/keymap.c b/keyboards/mode/m65ha_pre-alpha/keymaps/default/keymap.c deleted file mode 100755 index 2195856f0cc5..000000000000 --- a/keyboards/mode/m65ha_pre-alpha/keymaps/default/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( - KC_ESC , 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_DEL , - 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_PGUP, - 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 , KC_PGDN, - 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 , KC_END , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_all( - RESET , 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_TRNS, KC_MUTE, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [2] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [3] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; diff --git a/keyboards/mode/m65ha_pre-alpha/keymaps/via/keymap.c b/keyboards/mode/m65ha_pre-alpha/keymaps/via/keymap.c deleted file mode 100755 index 8a322b0002e8..000000000000 --- a/keyboards/mode/m65ha_pre-alpha/keymaps/via/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( - KC_ESC , 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_BSPC, - 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_PGUP, - 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_DEL , KC_ENT , KC_PGDN, - 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 , KC_END , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_all( - RESET , 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_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [2] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [3] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; diff --git a/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.c b/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.c deleted file mode 100644 index f65b4c71a432..000000000000 --- a/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "m65ha_preAlpha.h" - -void board_init(void) { - setPinInput(B9); - setPinInput(B10); -} - -#define LED_PIN_ON_STATE 1 -void led_init_ports(void) { - -/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator - pins default to push-pull output. Else, they are defined as open-drain. The - pin mode configuration is done through the INDICATOR_PIN_MODE which is - attributed right at the beggining. **/ - -#ifndef OPENDRAIN_INDICATORS -# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL -#else -# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN -#endif - -#ifdef LED_NUM_LOCK_PIN - palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_CAPS_LOCK_PIN - palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_SCROLL_LOCK_PIN - palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_COMPOSE_PIN - palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_KANA_PIN - palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); -#endif -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // writePin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); - } - return res; -} - -uint8_t prng(void) { - static uint8_t s = 0xAA, a = 0; - s ^= s << 3; - s ^= s >> 5; - s ^= a++ >> 2; - return s; -} - -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - // debug_enable = true; - // debug_matrix = true; - // debug_keyboard=true; - // debug_mouse=true; -} - -void matrix_scan_user(void) { - static uint32_t last_eeprom_access = 0; - uint32_t now = timer_read32(); - if (now - last_eeprom_access > 5000) { - dprint("reading eeprom\n"); - last_eeprom_access = now; - - union { - uint8_t bytes[4]; - uint32_t raw; - } tmp; - tmp.bytes[0] = prng(); - tmp.bytes[1] = prng(); - tmp.bytes[2] = prng(); - tmp.bytes[3] = prng(); - - eeconfig_update_user(tmp.raw); - uint32_t value = eeconfig_read_user(); - if (value != tmp.raw) { - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - dprint("!! EEPROM readback mismatch!\n"); - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - } - } -} diff --git a/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.h b/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.h deleted file mode 100644 index 1e9d57476d2a..000000000000 --- a/keyboards/mode/m65ha_pre-alpha/m65ha_preAlpha.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "quantum.h" - -#define ___ KC_NO - -#define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E }, \ - { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ - { ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ -} diff --git a/keyboards/mode/m65ha_pre-alpha/readme.md b/keyboards/mode/m65ha_pre-alpha/readme.md deleted file mode 100644 index 04a0288f0aed..000000000000 --- a/keyboards/mode/m65ha_pre-alpha/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -# Mode M65HA (pre-release Alpha version) - -This is the firmware page for the pre-Alpha version of the Mode M65HA PCB. It was intended as a test prototype. For the public-released Alpha release, use the `./m65ha_alpha` firmware. - -This PCB was not publicly released. Its firmware is kept as an archive for prototyping purposes and future developments. - -# Needed patches - -For the firmware to properly work, the PCB needs a jumper from the cathode of the right alt key to the exposed pin PA7. diff --git a/keyboards/mode/m65hi_pre-alpha/chconf.h b/keyboards/mode/m65hi_pre-alpha/chconf.h deleted file mode 100644 index cbbae31079fb..000000000000 --- a/keyboards/mode/m65hi_pre-alpha/chconf.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define CH_CFG_ST_FREQUENCY 10000 - -#define CH_CFG_OPTIMIZE_SPEED FALSE - -#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE - -#include_next diff --git a/keyboards/mode/m65hi_pre-alpha/halconf.h b/keyboards/mode/m65hi_pre-alpha/halconf.h deleted file mode 100644 index 41bddcb2799b..000000000000 --- a/keyboards/mode/m65hi_pre-alpha/halconf.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define HAL_USE_I2C TRUE - -#include_next diff --git a/keyboards/mode/m65hi_pre-alpha/keymaps/via/rules.mk b/keyboards/mode/m65hi_pre-alpha/keymaps/via/rules.mk deleted file mode 100644 index 1e5b99807cb7..000000000000 --- a/keyboards/mode/m65hi_pre-alpha/keymaps/via/rules.mk +++ /dev/null @@ -1 +0,0 @@ -VIA_ENABLE = yes diff --git a/keyboards/mode/m65hi_pre-alpha/mcuconf.h b/keyboards/mode/m65hi_pre-alpha/mcuconf.h deleted file mode 100644 index e4cefd0b75c7..000000000000 --- a/keyboards/mode/m65hi_pre-alpha/mcuconf.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include_next -#undef STM32_PLLM_VALUE -#undef STM32_PLLN_VALUE -#undef STM32_PLLP_VALUE -#undef STM32_PLLQ_VALUE -#undef STM32_PPRE1 -#undef STM32_PPRE2 - -#define STM32_PLLM_VALUE 4 -#define STM32_PLLN_VALUE 168 -#define STM32_PLLP_VALUE 4 -#define STM32_PLLQ_VALUE 7 -#define STM32_PPRE1 STM32_PPRE1_DIV2 -#define STM32_PPRE2 STM32_PPRE2_DIV1 - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/mode/m65hi_pre-alpha/rules.mk b/keyboards/mode/m65hi_pre-alpha/rules.mk deleted file mode 100644 index f33a05592077..000000000000 --- a/keyboards/mode/m65hi_pre-alpha/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# MCU name -MCU = STM32F401 - -# Bootloader selection -BOOTLOADER = stm32-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -EEPROM_DRIVER = i2c -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE diff --git a/keyboards/mode/m65ha_pre-alpha/chconf.h b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/chconf.h similarity index 100% rename from keyboards/mode/m65ha_pre-alpha/chconf.h rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/chconf.h diff --git a/keyboards/mode/m65hi_pre-alpha/config.h b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/config.h similarity index 100% rename from keyboards/mode/m65hi_pre-alpha/config.h rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/config.h diff --git a/keyboards/mode/m65ha_pre-alpha/halconf.h b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/halconf.h similarity index 100% rename from keyboards/mode/m65ha_pre-alpha/halconf.h rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/halconf.h diff --git a/keyboards/mode/m65hi_pre-alpha/info.json b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/info.json similarity index 100% rename from keyboards/mode/m65hi_pre-alpha/info.json rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/info.json diff --git a/keyboards/mode/m65hi_pre-alpha/keymaps/default/keymap.c b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/default/keymap.c similarity index 100% rename from keyboards/mode/m65hi_pre-alpha/keymaps/default/keymap.c rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/default/keymap.c diff --git a/keyboards/mode/m65hi_pre-alpha/keymaps/via/keymap.c b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/keymap.c similarity index 100% rename from keyboards/mode/m65hi_pre-alpha/keymaps/via/keymap.c rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/keymap.c diff --git a/keyboards/mode/m65ha_pre-alpha/keymaps/via/rules.mk b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/rules.mk similarity index 100% rename from keyboards/mode/m65ha_pre-alpha/keymaps/via/rules.mk rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/rules.mk diff --git a/keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.c b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.c similarity index 100% rename from keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.c rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.c diff --git a/keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.h b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.h similarity index 100% rename from keyboards/mode/m65hi_pre-alpha/m65hi_preAlpha.h rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.h diff --git a/keyboards/mode/m65ha_pre-alpha/mcuconf.h b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/mcuconf.h similarity index 100% rename from keyboards/mode/m65ha_pre-alpha/mcuconf.h rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/mcuconf.h diff --git a/keyboards/mode/m65hi_pre-alpha/readme.md b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/readme.md similarity index 100% rename from keyboards/mode/m65hi_pre-alpha/readme.md rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/readme.md diff --git a/keyboards/mode/m65ha_pre-alpha/rules.mk b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/rules.mk similarity index 100% rename from keyboards/mode/m65ha_pre-alpha/rules.mk rename to keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/rules.mk From 3ddfb9be2f04b31a411c6dfb40f4d5e140292e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Volpato?= Date: Tue, 23 Nov 2021 15:35:25 -0300 Subject: [PATCH 4/6] Delete m65hi_pre-alpha folder --- .../m65hi_prealpha/m65hi_pre-alpha/chconf.h | 25 ---- .../m65hi_prealpha/m65hi_pre-alpha/config.h | 73 ------------ .../m65hi_prealpha/m65hi_pre-alpha/halconf.h | 21 ---- .../m65hi_prealpha/m65hi_pre-alpha/info.json | 83 ------------- .../m65hi_pre-alpha/keymaps/default/keymap.c | 49 -------- .../m65hi_pre-alpha/keymaps/via/keymap.c | 49 -------- .../m65hi_pre-alpha/keymaps/via/rules.mk | 1 - .../m65hi_pre-alpha/m65hi_preAlpha.c | 109 ------------------ .../m65hi_pre-alpha/m65hi_preAlpha.h | 37 ------ .../m65hi_prealpha/m65hi_pre-alpha/mcuconf.h | 35 ------ .../m65hi_prealpha/m65hi_pre-alpha/readme.md | 9 -- .../m65hi_prealpha/m65hi_pre-alpha/rules.mk | 24 ---- 12 files changed, 515 deletions(-) delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/chconf.h delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/config.h delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/halconf.h delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/info.json delete mode 100755 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/default/keymap.c delete mode 100755 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/keymap.c delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/rules.mk delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.c delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.h delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/mcuconf.h delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/readme.md delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/rules.mk diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/chconf.h b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/chconf.h deleted file mode 100644 index cbbae31079fb..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/chconf.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define CH_CFG_ST_FREQUENCY 10000 - -#define CH_CFG_OPTIMIZE_SPEED FALSE - -#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE - -#include_next diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/config.h b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/config.h deleted file mode 100644 index 55af4f0d3871..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/config.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x00DE -#define PRODUCT_ID 0x6573 // For 65I -#define DEVICE_VER 0x8065 // PA for pre-Alpha -#define MANUFACTURER Mode -#define PRODUCT SixtyFive HI - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 15 - -#define MATRIX_COL_PINS { B10, B12, C8 , C5 , B0 , B1 , C10, B13, B14, B15, A15, C6 , C7 , C9 , A8 } -#define MATRIX_ROW_PINS { C4 , A10, D2 , C12, A7 , C11 } -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* 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 */ -#define LOCKING_RESYNC_ENABLE - -#define EEPROM_I2C_24LC256 -//#define I2C1_CLOCK_SPEED 400000 -//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 - -#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE - -#define STM32_HSECLK 8000000 - -#define OPENDRAIN_INDICATORS -#define LED_CAPS_LOCK_PIN A6 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/halconf.h b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/halconf.h deleted file mode 100644 index 41bddcb2799b..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/halconf.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define HAL_USE_I2C TRUE - -#include_next diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/info.json b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/info.json deleted file mode 100644 index a3b5b6cccb13..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/info.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "keyboard_name": "Mode SixtyFive HI pre-Alpha", - "url": "", - "maintainer": "Gondolindrim", - "layouts": { - "LAYOUT_all": { - "layout": [ - { "label": "K00", "x": 0, "y": 0 }, - { "label": "K01", "x": 1, "y": 0 }, - { "label": "K02", "x": 2, "y": 0 }, - { "label": "K03", "x": 3, "y": 0 }, - { "label": "K04", "x": 4, "y": 0 }, - { "label": "K05", "x": 5, "y": 0 }, - { "label": "K06", "x": 6, "y": 0 }, - { "label": "K07", "x": 7, "y": 0 }, - { "label": "K08", "x": 8, "y": 0 }, - { "label": "K09", "x": 9, "y": 0 }, - { "label": "K0A", "x": 10, "y": 0 }, - { "label": "K0B", "x": 11, "y": 0 }, - { "label": "K0C", "x": 12, "y": 0 }, - { "label": "K0D", "x": 13, "y": 0, "w": 2 }, - { "label": "K0E", "x": 15, "y": 0 }, - - { "label": "K10", "x": 0, "y": 1, "w": 1.5 }, - { "label": "K11", "x": 1.5, "y": 1 }, - { "label": "K12", "x": 2.5, "y": 1 }, - { "label": "K13", "x": 3.5, "y": 1 }, - { "label": "K14", "x": 4.5, "y": 1 }, - { "label": "K15", "x": 5.5, "y": 1 }, - { "label": "K16", "x": 6.5, "y": 1 }, - { "label": "K17", "x": 7.5, "y": 1 }, - { "label": "K18", "x": 8.5, "y": 1 }, - { "label": "K19", "x": 9.5, "y": 1 }, - { "label": "K1A", "x": 10.5, "y": 1 }, - { "label": "K1B", "x": 11.5, "y": 1 }, - { "label": "K1C", "x": 12.5, "y": 1 }, - { "label": "K1E", "x": 15, "y": 1 }, - - { "label": "K20", "x": 0, "y": 2, "w": 1.75 }, - { "label": "K21", "x": 1.75, "y": 2 }, - { "label": "K22", "x": 2.75, "y": 2 }, - { "label": "K23", "x": 3.75, "y": 2 }, - { "label": "K24", "x": 4.75, "y": 2 }, - { "label": "K25", "x": 5.75, "y": 2 }, - { "label": "K26", "x": 6.75, "y": 2 }, - { "label": "K27", "x": 7.75, "y": 2 }, - { "label": "K28", "x": 8.75, "y": 2 }, - { "label": "K29", "x": 9.75, "y": 2 }, - { "label": "K2A", "x": 10.75, "y": 2 }, - { "label": "K2B", "x": 11.75, "y": 2 }, - { "label": "K2C", "x": 12.75, "y": 2 }, - { "label": "K2D", "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, - { "label": "K2E", "x": 15, "y": 2 }, - - { "label": "K30", "x": 0, "y": 3, "w": 1.25 }, - { "label": "K31", "x": 1.25, "y": 3 }, - { "label": "K32", "x": 2.25, "y": 3 }, - { "label": "K33", "x": 3.25, "y": 3 }, - { "label": "K34", "x": 4.25, "y": 3 }, - { "label": "K35", "x": 5.25, "y": 3 }, - { "label": "K36", "x": 6.25, "y": 3 }, - { "label": "K37", "x": 7.25, "y": 3 }, - { "label": "K38", "x": 8.25, "y": 3 }, - { "label": "K39", "x": 9.25, "y": 3 }, - { "label": "K3A", "x": 10.25, "y": 3 }, - { "label": "K3B", "x": 11.25, "y": 3 }, - { "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "K3D", "x": 14, "y": 3 }, - { "label": "K3E", "x": 15, "y": 3 }, - - { "label": "K40", "x": 0, "y": 4, "w": 1.25 }, - { "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, - { "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, - { "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, - { "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "K5C", "x": 13, "y": 4 }, - { "label": "K5D", "x": 14, "y": 4 }, - { "label": "K5E", "x": 15, "y": 4 } - ] - } - } -} diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/default/keymap.c b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/default/keymap.c deleted file mode 100755 index 1fcde6b998ae..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/default/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( - KC_ESC , 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_BSPC, - 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_DEL , KC_PGDN, - 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_NUHS, KC_ENT , KC_PGUP, - KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_all( - RESET , 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_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [2] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [3] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/keymap.c b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/keymap.c deleted file mode 100755 index 1fcde6b998ae..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( - KC_ESC , 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_BSPC, - 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_DEL , KC_PGDN, - 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_NUHS, KC_ENT , KC_PGUP, - KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_all( - RESET , 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_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [2] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [3] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/rules.mk b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/rules.mk deleted file mode 100644 index 1e5b99807cb7..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/keymaps/via/rules.mk +++ /dev/null @@ -1 +0,0 @@ -VIA_ENABLE = yes diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.c b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.c deleted file mode 100644 index b71b0f928260..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "m65hi_preAlpha.h" - -void board_init(void) { - setPinInput(B9); - setPinInput(B10); -} - -#define LED_PIN_ON_STATE 1 -void led_init_ports(void) { - -/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator - pins default to push-pull output. Else, they are defined as open-drain. The - pin mode configuration is done through the INDICATOR_PIN_MODE which is - attributed right at the beggining. **/ - -#ifndef OPENDRAIN_INDICATORS -# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL -#else -# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN -#endif - -#ifdef LED_NUM_LOCK_PIN - palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_CAPS_LOCK_PIN - palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_SCROLL_LOCK_PIN - palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_COMPOSE_PIN - palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_KANA_PIN - palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); -#endif -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // writePin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); - } - return res; -} - -uint8_t prng(void) { - static uint8_t s = 0xAA, a = 0; - s ^= s << 3; - s ^= s >> 5; - s ^= a++ >> 2; - return s; -} - -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - debug_enable = true; - // debug_matrix = true; - // debug_keyboard=true; - // debug_mouse=true; -} - -void matrix_scan_user(void) { - static uint32_t last_eeprom_access = 0; - uint32_t now = timer_read32(); - if (now - last_eeprom_access > 5000) { - dprint("reading eeprom\n"); - last_eeprom_access = now; - - union { - uint8_t bytes[4]; - uint32_t raw; - } tmp; - tmp.bytes[0] = prng(); - tmp.bytes[1] = prng(); - tmp.bytes[2] = prng(); - tmp.bytes[3] = prng(); - - eeconfig_update_user(tmp.raw); - uint32_t value = eeconfig_read_user(); - if (value != tmp.raw) { - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - dprint("!! EEPROM readback mismatch!\n"); - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - } - } -} diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.h b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.h deleted file mode 100644 index 06da1758f8b0..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/m65hi_preAlpha.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "quantum.h" - -#define ___ KC_NO - -#define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ - { ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ -} diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/mcuconf.h b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/mcuconf.h deleted file mode 100644 index e4cefd0b75c7..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/mcuconf.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include_next -#undef STM32_PLLM_VALUE -#undef STM32_PLLN_VALUE -#undef STM32_PLLP_VALUE -#undef STM32_PLLQ_VALUE -#undef STM32_PPRE1 -#undef STM32_PPRE2 - -#define STM32_PLLM_VALUE 4 -#define STM32_PLLN_VALUE 168 -#define STM32_PLLP_VALUE 4 -#define STM32_PLLQ_VALUE 7 -#define STM32_PPRE1 STM32_PPRE1_DIV2 -#define STM32_PPRE2 STM32_PPRE2_DIV1 - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/readme.md b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/readme.md deleted file mode 100644 index 2630547e1f27..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -# Mode M65HI (pre-release Alpha version) - -This is the firmware page for the pre-Alpha version of the Mode M65HI PCB. It was intended as a test prototype. For the public-released Alpha release, use the `./m65hi_alpha` firmware. - -This PCB was not publicly released. Its firmware is kept as an archive for prototyping purposes and future developments. - -# Needed patches - -For the firmware to properly work, the PCB needs a jumper from the cathode of the right alt key to the exposed pin PA7. diff --git a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/rules.mk b/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/rules.mk deleted file mode 100644 index f33a05592077..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_pre-alpha/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# MCU name -MCU = STM32F401 - -# Bootloader selection -BOOTLOADER = stm32-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -EEPROM_DRIVER = i2c -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE From 674f4483c5da2217b77ff7293d149d4b38921fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Volpato?= Date: Tue, 23 Nov 2021 15:37:47 -0300 Subject: [PATCH 5/6] Remove prealpha firmwares --- keyboards/mode/m65ha_prealpha/chconf.h | 25 ---- keyboards/mode/m65ha_prealpha/config.h | 73 ------------ keyboards/mode/m65ha_prealpha/halconf.h | 21 ---- keyboards/mode/m65ha_prealpha/info.json | 82 ------------- .../m65ha_prealpha/keymaps/default/keymap.c | 49 -------- .../mode/m65ha_prealpha/keymaps/via/keymap.c | 49 -------- .../mode/m65ha_prealpha/keymaps/via/rules.mk | 1 - .../mode/m65ha_prealpha/m65ha_prealpha.c | 109 ------------------ .../mode/m65ha_prealpha/m65ha_prealpha.h | 37 ------ keyboards/mode/m65ha_prealpha/mcuconf.h | 35 ------ keyboards/mode/m65ha_prealpha/readme.md | 9 -- keyboards/mode/m65ha_prealpha/rules.mk | 24 ---- keyboards/mode/m65hi_prealpha/chconf.h | 25 ---- keyboards/mode/m65hi_prealpha/config.h | 73 ------------ keyboards/mode/m65hi_prealpha/halconf.h | 21 ---- keyboards/mode/m65hi_prealpha/info.json | 83 ------------- .../m65hi_prealpha/keymaps/default/keymap.c | 49 -------- .../mode/m65hi_prealpha/keymaps/via/keymap.c | 49 -------- .../mode/m65hi_prealpha/keymaps/via/rules.mk | 1 - .../mode/m65hi_prealpha/m65hi_prealpha.c | 109 ------------------ .../mode/m65hi_prealpha/m65hi_prealpha.h | 37 ------ keyboards/mode/m65hi_prealpha/mcuconf.h | 35 ------ keyboards/mode/m65hi_prealpha/readme.md | 9 -- keyboards/mode/m65hi_prealpha/rules.mk | 24 ---- 24 files changed, 1029 deletions(-) delete mode 100644 keyboards/mode/m65ha_prealpha/chconf.h delete mode 100644 keyboards/mode/m65ha_prealpha/config.h delete mode 100644 keyboards/mode/m65ha_prealpha/halconf.h delete mode 100644 keyboards/mode/m65ha_prealpha/info.json delete mode 100755 keyboards/mode/m65ha_prealpha/keymaps/default/keymap.c delete mode 100755 keyboards/mode/m65ha_prealpha/keymaps/via/keymap.c delete mode 100644 keyboards/mode/m65ha_prealpha/keymaps/via/rules.mk delete mode 100644 keyboards/mode/m65ha_prealpha/m65ha_prealpha.c delete mode 100644 keyboards/mode/m65ha_prealpha/m65ha_prealpha.h delete mode 100644 keyboards/mode/m65ha_prealpha/mcuconf.h delete mode 100644 keyboards/mode/m65ha_prealpha/readme.md delete mode 100644 keyboards/mode/m65ha_prealpha/rules.mk delete mode 100644 keyboards/mode/m65hi_prealpha/chconf.h delete mode 100644 keyboards/mode/m65hi_prealpha/config.h delete mode 100644 keyboards/mode/m65hi_prealpha/halconf.h delete mode 100644 keyboards/mode/m65hi_prealpha/info.json delete mode 100755 keyboards/mode/m65hi_prealpha/keymaps/default/keymap.c delete mode 100755 keyboards/mode/m65hi_prealpha/keymaps/via/keymap.c delete mode 100644 keyboards/mode/m65hi_prealpha/keymaps/via/rules.mk delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_prealpha.c delete mode 100644 keyboards/mode/m65hi_prealpha/m65hi_prealpha.h delete mode 100644 keyboards/mode/m65hi_prealpha/mcuconf.h delete mode 100644 keyboards/mode/m65hi_prealpha/readme.md delete mode 100644 keyboards/mode/m65hi_prealpha/rules.mk diff --git a/keyboards/mode/m65ha_prealpha/chconf.h b/keyboards/mode/m65ha_prealpha/chconf.h deleted file mode 100644 index cbbae31079fb..000000000000 --- a/keyboards/mode/m65ha_prealpha/chconf.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define CH_CFG_ST_FREQUENCY 10000 - -#define CH_CFG_OPTIMIZE_SPEED FALSE - -#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE - -#include_next diff --git a/keyboards/mode/m65ha_prealpha/config.h b/keyboards/mode/m65ha_prealpha/config.h deleted file mode 100644 index 22472eee3e63..000000000000 --- a/keyboards/mode/m65ha_prealpha/config.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x00DE -#define PRODUCT_ID 0x6565 // For 65A -#define DEVICE_VER 0x8065 // PA for pre-Alpha -#define MANUFACTURER Mode -#define PRODUCT SixtyFive HA - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 15 - -#define MATRIX_COL_PINS { B10, B12, C8 , C5 , B0 , B1 , C10, B13, B14, B15, A15, C6 , C7 , C9 , A8 } -#define MATRIX_ROW_PINS { C4 , A10, D2 , C12, A7 , C11 } -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* 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 */ -#define LOCKING_RESYNC_ENABLE - -#define EEPROM_I2C_24LC256 -//#define I2C1_CLOCK_SPEED 400000 -//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 - -#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE - -#define STM32_HSECLK 8000000 - -#define OPENDRAIN_INDICATORS -#define LED_CAPS_LOCK_PIN A6 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION diff --git a/keyboards/mode/m65ha_prealpha/halconf.h b/keyboards/mode/m65ha_prealpha/halconf.h deleted file mode 100644 index 41bddcb2799b..000000000000 --- a/keyboards/mode/m65ha_prealpha/halconf.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define HAL_USE_I2C TRUE - -#include_next diff --git a/keyboards/mode/m65ha_prealpha/info.json b/keyboards/mode/m65ha_prealpha/info.json deleted file mode 100644 index b58c1153cf2e..000000000000 --- a/keyboards/mode/m65ha_prealpha/info.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "keyboard_name": "Mode SixtyFive HA pre-Alpha", - "url": "", - "maintainer": "Gondolindrim", - "layouts": { - "LAYOUT_all": { - "layout": [ - { "label": "K00", "x": 0, "y": 0 }, - { "label": "K01", "x": 1, "y": 0 }, - { "label": "K02", "x": 2, "y": 0 }, - { "label": "K03", "x": 3, "y": 0 }, - { "label": "K04", "x": 4, "y": 0 }, - { "label": "K05", "x": 5, "y": 0 }, - { "label": "K06", "x": 6, "y": 0 }, - { "label": "K07", "x": 7, "y": 0 }, - { "label": "K08", "x": 8, "y": 0 }, - { "label": "K09", "x": 9, "y": 0 }, - { "label": "K0A", "x": 10, "y": 0 }, - { "label": "K0B", "x": 11, "y": 0 }, - { "label": "K0C", "x": 12, "y": 0 }, - { "label": "K0D", "x": 13, "y": 0, "w": 2 }, - { "label": "K0E", "x": 15, "y": 0 }, - - { "label": "K10", "x": 0, "y": 1, "w": 1.5 }, - { "label": "K11", "x": 1.5, "y": 1 }, - { "label": "K12", "x": 2.5, "y": 1 }, - { "label": "K13", "x": 3.5, "y": 1 }, - { "label": "K14", "x": 4.5, "y": 1 }, - { "label": "K15", "x": 5.5, "y": 1 }, - { "label": "K16", "x": 6.5, "y": 1 }, - { "label": "K17", "x": 7.5, "y": 1 }, - { "label": "K18", "x": 8.5, "y": 1 }, - { "label": "K19", "x": 9.5, "y": 1 }, - { "label": "K1A", "x": 10.5, "y": 1 }, - { "label": "K1B", "x": 11.5, "y": 1 }, - { "label": "K1C", "x": 12.5, "y": 1 }, - { "label": "K1D", "x": 13.5, "y": 1, "w": 1.5}, - { "label": "K1E", "x": 15, "y": 1 }, - - { "label": "K20", "x": 0, "y": 2, "w": 1.75 }, - { "label": "K21", "x": 1.75, "y": 2 }, - { "label": "K22", "x": 2.75, "y": 2 }, - { "label": "K23", "x": 3.75, "y": 2 }, - { "label": "K24", "x": 4.75, "y": 2 }, - { "label": "K25", "x": 5.75, "y": 2 }, - { "label": "K26", "x": 6.75, "y": 2 }, - { "label": "K27", "x": 7.75, "y": 2 }, - { "label": "K28", "x": 8.75, "y": 2 }, - { "label": "K29", "x": 9.75, "y": 2 }, - { "label": "K2A", "x": 10.75, "y": 2 }, - { "label": "K2B", "x": 11.75, "y": 2 }, - { "label": "K2D", "x": 12.75, "y": 2, "w": 2.25 }, - { "label": "K2E", "x": 15, "y": 2 }, - - { "label": "K30", "x": 0, "y": 3, "w": 2.25 }, - { "label": "K32", "x": 2.25, "y": 3 }, - { "label": "K33", "x": 3.25, "y": 3 }, - { "label": "K34", "x": 4.25, "y": 3 }, - { "label": "K35", "x": 5.25, "y": 3 }, - { "label": "K36", "x": 6.25, "y": 3 }, - { "label": "K37", "x": 7.25, "y": 3 }, - { "label": "K38", "x": 8.25, "y": 3 }, - { "label": "K39", "x": 9.25, "y": 3 }, - { "label": "K3A", "x": 10.25, "y": 3 }, - { "label": "K3B", "x": 11.25, "y": 3 }, - { "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "K3D", "x": 14, "y": 3 }, - { "label": "K3E", "x": 15, "y": 3 }, - - { "label": "K40", "x": 0, "y": 4, "w": 1.25 }, - { "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, - { "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, - { "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, - { "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "K5C", "x": 13, "y": 4 }, - { "label": "K5D", "x": 14, "y": 4 }, - { "label": "K5E", "x": 15, "y": 4 } - ] - } - } -} diff --git a/keyboards/mode/m65ha_prealpha/keymaps/default/keymap.c b/keyboards/mode/m65ha_prealpha/keymaps/default/keymap.c deleted file mode 100755 index 2195856f0cc5..000000000000 --- a/keyboards/mode/m65ha_prealpha/keymaps/default/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( - KC_ESC , 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_DEL , - 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_PGUP, - 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 , KC_PGDN, - 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 , KC_END , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_all( - RESET , 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_TRNS, KC_MUTE, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [2] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [3] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; diff --git a/keyboards/mode/m65ha_prealpha/keymaps/via/keymap.c b/keyboards/mode/m65ha_prealpha/keymaps/via/keymap.c deleted file mode 100755 index 8a322b0002e8..000000000000 --- a/keyboards/mode/m65ha_prealpha/keymaps/via/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( - KC_ESC , 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_BSPC, - 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_PGUP, - 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_DEL , KC_ENT , KC_PGDN, - 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 , KC_END , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_all( - RESET , 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_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [2] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [3] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; diff --git a/keyboards/mode/m65ha_prealpha/keymaps/via/rules.mk b/keyboards/mode/m65ha_prealpha/keymaps/via/rules.mk deleted file mode 100644 index 1e5b99807cb7..000000000000 --- a/keyboards/mode/m65ha_prealpha/keymaps/via/rules.mk +++ /dev/null @@ -1 +0,0 @@ -VIA_ENABLE = yes diff --git a/keyboards/mode/m65ha_prealpha/m65ha_prealpha.c b/keyboards/mode/m65ha_prealpha/m65ha_prealpha.c deleted file mode 100644 index 3f137a928e70..000000000000 --- a/keyboards/mode/m65ha_prealpha/m65ha_prealpha.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "m65ha_prealpha.h" - -void board_init(void) { - setPinInput(B9); - setPinInput(B10); -} - -#define LED_PIN_ON_STATE 1 -void led_init_ports(void) { - -/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator - pins default to push-pull output. Else, they are defined as open-drain. The - pin mode configuration is done through the INDICATOR_PIN_MODE which is - attributed right at the beggining. **/ - -#ifndef OPENDRAIN_INDICATORS -# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL -#else -# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN -#endif - -#ifdef LED_NUM_LOCK_PIN - palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_CAPS_LOCK_PIN - palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_SCROLL_LOCK_PIN - palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_COMPOSE_PIN - palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_KANA_PIN - palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); -#endif -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // writePin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); - } - return res; -} - -uint8_t prng(void) { - static uint8_t s = 0xAA, a = 0; - s ^= s << 3; - s ^= s >> 5; - s ^= a++ >> 2; - return s; -} - -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - // debug_enable = true; - // debug_matrix = true; - // debug_keyboard=true; - // debug_mouse=true; -} - -void matrix_scan_user(void) { - static uint32_t last_eeprom_access = 0; - uint32_t now = timer_read32(); - if (now - last_eeprom_access > 5000) { - dprint("reading eeprom\n"); - last_eeprom_access = now; - - union { - uint8_t bytes[4]; - uint32_t raw; - } tmp; - tmp.bytes[0] = prng(); - tmp.bytes[1] = prng(); - tmp.bytes[2] = prng(); - tmp.bytes[3] = prng(); - - eeconfig_update_user(tmp.raw); - uint32_t value = eeconfig_read_user(); - if (value != tmp.raw) { - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - dprint("!! EEPROM readback mismatch!\n"); - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - } - } -} diff --git a/keyboards/mode/m65ha_prealpha/m65ha_prealpha.h b/keyboards/mode/m65ha_prealpha/m65ha_prealpha.h deleted file mode 100644 index 1e9d57476d2a..000000000000 --- a/keyboards/mode/m65ha_prealpha/m65ha_prealpha.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "quantum.h" - -#define ___ KC_NO - -#define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E }, \ - { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ - { ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ -} diff --git a/keyboards/mode/m65ha_prealpha/mcuconf.h b/keyboards/mode/m65ha_prealpha/mcuconf.h deleted file mode 100644 index e4cefd0b75c7..000000000000 --- a/keyboards/mode/m65ha_prealpha/mcuconf.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include_next -#undef STM32_PLLM_VALUE -#undef STM32_PLLN_VALUE -#undef STM32_PLLP_VALUE -#undef STM32_PLLQ_VALUE -#undef STM32_PPRE1 -#undef STM32_PPRE2 - -#define STM32_PLLM_VALUE 4 -#define STM32_PLLN_VALUE 168 -#define STM32_PLLP_VALUE 4 -#define STM32_PLLQ_VALUE 7 -#define STM32_PPRE1 STM32_PPRE1_DIV2 -#define STM32_PPRE2 STM32_PPRE2_DIV1 - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/mode/m65ha_prealpha/readme.md b/keyboards/mode/m65ha_prealpha/readme.md deleted file mode 100644 index 04a0288f0aed..000000000000 --- a/keyboards/mode/m65ha_prealpha/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -# Mode M65HA (pre-release Alpha version) - -This is the firmware page for the pre-Alpha version of the Mode M65HA PCB. It was intended as a test prototype. For the public-released Alpha release, use the `./m65ha_alpha` firmware. - -This PCB was not publicly released. Its firmware is kept as an archive for prototyping purposes and future developments. - -# Needed patches - -For the firmware to properly work, the PCB needs a jumper from the cathode of the right alt key to the exposed pin PA7. diff --git a/keyboards/mode/m65ha_prealpha/rules.mk b/keyboards/mode/m65ha_prealpha/rules.mk deleted file mode 100644 index f33a05592077..000000000000 --- a/keyboards/mode/m65ha_prealpha/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# MCU name -MCU = STM32F401 - -# Bootloader selection -BOOTLOADER = stm32-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -EEPROM_DRIVER = i2c -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE diff --git a/keyboards/mode/m65hi_prealpha/chconf.h b/keyboards/mode/m65hi_prealpha/chconf.h deleted file mode 100644 index cbbae31079fb..000000000000 --- a/keyboards/mode/m65hi_prealpha/chconf.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define CH_CFG_ST_FREQUENCY 10000 - -#define CH_CFG_OPTIMIZE_SPEED FALSE - -#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE - -#include_next diff --git a/keyboards/mode/m65hi_prealpha/config.h b/keyboards/mode/m65hi_prealpha/config.h deleted file mode 100644 index 55af4f0d3871..000000000000 --- a/keyboards/mode/m65hi_prealpha/config.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x00DE -#define PRODUCT_ID 0x6573 // For 65I -#define DEVICE_VER 0x8065 // PA for pre-Alpha -#define MANUFACTURER Mode -#define PRODUCT SixtyFive HI - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 15 - -#define MATRIX_COL_PINS { B10, B12, C8 , C5 , B0 , B1 , C10, B13, B14, B15, A15, C6 , C7 , C9 , A8 } -#define MATRIX_ROW_PINS { C4 , A10, D2 , C12, A7 , C11 } -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* 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 */ -#define LOCKING_RESYNC_ENABLE - -#define EEPROM_I2C_24LC256 -//#define I2C1_CLOCK_SPEED 400000 -//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 - -#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE - -#define STM32_HSECLK 8000000 - -#define OPENDRAIN_INDICATORS -#define LED_CAPS_LOCK_PIN A6 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION diff --git a/keyboards/mode/m65hi_prealpha/halconf.h b/keyboards/mode/m65hi_prealpha/halconf.h deleted file mode 100644 index 41bddcb2799b..000000000000 --- a/keyboards/mode/m65hi_prealpha/halconf.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define HAL_USE_I2C TRUE - -#include_next diff --git a/keyboards/mode/m65hi_prealpha/info.json b/keyboards/mode/m65hi_prealpha/info.json deleted file mode 100644 index a3b5b6cccb13..000000000000 --- a/keyboards/mode/m65hi_prealpha/info.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "keyboard_name": "Mode SixtyFive HI pre-Alpha", - "url": "", - "maintainer": "Gondolindrim", - "layouts": { - "LAYOUT_all": { - "layout": [ - { "label": "K00", "x": 0, "y": 0 }, - { "label": "K01", "x": 1, "y": 0 }, - { "label": "K02", "x": 2, "y": 0 }, - { "label": "K03", "x": 3, "y": 0 }, - { "label": "K04", "x": 4, "y": 0 }, - { "label": "K05", "x": 5, "y": 0 }, - { "label": "K06", "x": 6, "y": 0 }, - { "label": "K07", "x": 7, "y": 0 }, - { "label": "K08", "x": 8, "y": 0 }, - { "label": "K09", "x": 9, "y": 0 }, - { "label": "K0A", "x": 10, "y": 0 }, - { "label": "K0B", "x": 11, "y": 0 }, - { "label": "K0C", "x": 12, "y": 0 }, - { "label": "K0D", "x": 13, "y": 0, "w": 2 }, - { "label": "K0E", "x": 15, "y": 0 }, - - { "label": "K10", "x": 0, "y": 1, "w": 1.5 }, - { "label": "K11", "x": 1.5, "y": 1 }, - { "label": "K12", "x": 2.5, "y": 1 }, - { "label": "K13", "x": 3.5, "y": 1 }, - { "label": "K14", "x": 4.5, "y": 1 }, - { "label": "K15", "x": 5.5, "y": 1 }, - { "label": "K16", "x": 6.5, "y": 1 }, - { "label": "K17", "x": 7.5, "y": 1 }, - { "label": "K18", "x": 8.5, "y": 1 }, - { "label": "K19", "x": 9.5, "y": 1 }, - { "label": "K1A", "x": 10.5, "y": 1 }, - { "label": "K1B", "x": 11.5, "y": 1 }, - { "label": "K1C", "x": 12.5, "y": 1 }, - { "label": "K1E", "x": 15, "y": 1 }, - - { "label": "K20", "x": 0, "y": 2, "w": 1.75 }, - { "label": "K21", "x": 1.75, "y": 2 }, - { "label": "K22", "x": 2.75, "y": 2 }, - { "label": "K23", "x": 3.75, "y": 2 }, - { "label": "K24", "x": 4.75, "y": 2 }, - { "label": "K25", "x": 5.75, "y": 2 }, - { "label": "K26", "x": 6.75, "y": 2 }, - { "label": "K27", "x": 7.75, "y": 2 }, - { "label": "K28", "x": 8.75, "y": 2 }, - { "label": "K29", "x": 9.75, "y": 2 }, - { "label": "K2A", "x": 10.75, "y": 2 }, - { "label": "K2B", "x": 11.75, "y": 2 }, - { "label": "K2C", "x": 12.75, "y": 2 }, - { "label": "K2D", "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, - { "label": "K2E", "x": 15, "y": 2 }, - - { "label": "K30", "x": 0, "y": 3, "w": 1.25 }, - { "label": "K31", "x": 1.25, "y": 3 }, - { "label": "K32", "x": 2.25, "y": 3 }, - { "label": "K33", "x": 3.25, "y": 3 }, - { "label": "K34", "x": 4.25, "y": 3 }, - { "label": "K35", "x": 5.25, "y": 3 }, - { "label": "K36", "x": 6.25, "y": 3 }, - { "label": "K37", "x": 7.25, "y": 3 }, - { "label": "K38", "x": 8.25, "y": 3 }, - { "label": "K39", "x": 9.25, "y": 3 }, - { "label": "K3A", "x": 10.25, "y": 3 }, - { "label": "K3B", "x": 11.25, "y": 3 }, - { "label": "K3C", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "K3D", "x": 14, "y": 3 }, - { "label": "K3E", "x": 15, "y": 3 }, - - { "label": "K40", "x": 0, "y": 4, "w": 1.25 }, - { "label": "K41", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "K42", "x": 2.5, "y": 4, "w": 1.25 }, - { "label": "K56", "x": 3.75, "y": 4, "w": 6.25 }, - { "label": "K5A", "x": 10, "y": 4, "w": 1.25 }, - { "label": "K5B", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "K5C", "x": 13, "y": 4 }, - { "label": "K5D", "x": 14, "y": 4 }, - { "label": "K5E", "x": 15, "y": 4 } - ] - } - } -} diff --git a/keyboards/mode/m65hi_prealpha/keymaps/default/keymap.c b/keyboards/mode/m65hi_prealpha/keymaps/default/keymap.c deleted file mode 100755 index 1fcde6b998ae..000000000000 --- a/keyboards/mode/m65hi_prealpha/keymaps/default/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( - KC_ESC , 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_BSPC, - 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_DEL , KC_PGDN, - 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_NUHS, KC_ENT , KC_PGUP, - KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_all( - RESET , 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_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [2] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [3] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; diff --git a/keyboards/mode/m65hi_prealpha/keymaps/via/keymap.c b/keyboards/mode/m65hi_prealpha/keymaps/via/keymap.c deleted file mode 100755 index 1fcde6b998ae..000000000000 --- a/keyboards/mode/m65hi_prealpha/keymaps/via/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( - KC_ESC , 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_BSPC, - 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_DEL , KC_PGDN, - 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_NUHS, KC_ENT , KC_PGUP, - KC_LSFT, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_all( - RESET , 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_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [2] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [3] = LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) -}; diff --git a/keyboards/mode/m65hi_prealpha/keymaps/via/rules.mk b/keyboards/mode/m65hi_prealpha/keymaps/via/rules.mk deleted file mode 100644 index 1e5b99807cb7..000000000000 --- a/keyboards/mode/m65hi_prealpha/keymaps/via/rules.mk +++ /dev/null @@ -1 +0,0 @@ -VIA_ENABLE = yes diff --git a/keyboards/mode/m65hi_prealpha/m65hi_prealpha.c b/keyboards/mode/m65hi_prealpha/m65hi_prealpha.c deleted file mode 100644 index 1e98c91f011b..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_prealpha.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "m65hi_prealpha.h" - -void board_init(void) { - setPinInput(B9); - setPinInput(B10); -} - -#define LED_PIN_ON_STATE 1 -void led_init_ports(void) { - -/** If the OPENDRAIN_INDICATORS option is not defined in config.h, the indicator - pins default to push-pull output. Else, they are defined as open-drain. The - pin mode configuration is done through the INDICATOR_PIN_MODE which is - attributed right at the beggining. **/ - -#ifndef OPENDRAIN_INDICATORS -# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_PUSHPULL -#else -# define INDICATOR_PIN_MODE PAL_MODE_OUTPUT_OPENDRAIN -#endif - -#ifdef LED_NUM_LOCK_PIN - palSetLineMode(LED_NUM_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_CAPS_LOCK_PIN - palSetLineMode(LED_CAPS_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_SCROLL_LOCK_PIN - palSetLineMode(LED_SCROLL_LOCK_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_COMPOSE_PIN - palSetLineMode(LED_COMPOSE_PIN, INDICATOR_PIN_MODE); -#endif -#ifdef LED_KANA_PIN - palSetLineMode(LED_KANA_PIN, INDICATOR_PIN_MODE); -#endif -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // writePin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); - } - return res; -} - -uint8_t prng(void) { - static uint8_t s = 0xAA, a = 0; - s ^= s << 3; - s ^= s >> 5; - s ^= a++ >> 2; - return s; -} - -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - debug_enable = true; - // debug_matrix = true; - // debug_keyboard=true; - // debug_mouse=true; -} - -void matrix_scan_user(void) { - static uint32_t last_eeprom_access = 0; - uint32_t now = timer_read32(); - if (now - last_eeprom_access > 5000) { - dprint("reading eeprom\n"); - last_eeprom_access = now; - - union { - uint8_t bytes[4]; - uint32_t raw; - } tmp; - tmp.bytes[0] = prng(); - tmp.bytes[1] = prng(); - tmp.bytes[2] = prng(); - tmp.bytes[3] = prng(); - - eeconfig_update_user(tmp.raw); - uint32_t value = eeconfig_read_user(); - if (value != tmp.raw) { - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - dprint("!! EEPROM readback mismatch!\n"); - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - } - } -} diff --git a/keyboards/mode/m65hi_prealpha/m65hi_prealpha.h b/keyboards/mode/m65hi_prealpha/m65hi_prealpha.h deleted file mode 100644 index 06da1758f8b0..000000000000 --- a/keyboards/mode/m65hi_prealpha/m65hi_prealpha.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2020 Álvaro "Gondolindrim" Volpato - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "quantum.h" - -#define ___ KC_NO - -#define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K56, K5A, K5B, K5C, K5D, K5E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ - { ___, ___, ___, ___, ___, ___, K56, ___, ___, ___, K5A, K5B, K5C, K5D, K5E } \ -} diff --git a/keyboards/mode/m65hi_prealpha/mcuconf.h b/keyboards/mode/m65hi_prealpha/mcuconf.h deleted file mode 100644 index e4cefd0b75c7..000000000000 --- a/keyboards/mode/m65hi_prealpha/mcuconf.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include_next -#undef STM32_PLLM_VALUE -#undef STM32_PLLN_VALUE -#undef STM32_PLLP_VALUE -#undef STM32_PLLQ_VALUE -#undef STM32_PPRE1 -#undef STM32_PPRE2 - -#define STM32_PLLM_VALUE 4 -#define STM32_PLLN_VALUE 168 -#define STM32_PLLP_VALUE 4 -#define STM32_PLLQ_VALUE 7 -#define STM32_PPRE1 STM32_PPRE1_DIV2 -#define STM32_PPRE2 STM32_PPRE2_DIV1 - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/mode/m65hi_prealpha/readme.md b/keyboards/mode/m65hi_prealpha/readme.md deleted file mode 100644 index 2630547e1f27..000000000000 --- a/keyboards/mode/m65hi_prealpha/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -# Mode M65HI (pre-release Alpha version) - -This is the firmware page for the pre-Alpha version of the Mode M65HI PCB. It was intended as a test prototype. For the public-released Alpha release, use the `./m65hi_alpha` firmware. - -This PCB was not publicly released. Its firmware is kept as an archive for prototyping purposes and future developments. - -# Needed patches - -For the firmware to properly work, the PCB needs a jumper from the cathode of the right alt key to the exposed pin PA7. diff --git a/keyboards/mode/m65hi_prealpha/rules.mk b/keyboards/mode/m65hi_prealpha/rules.mk deleted file mode 100644 index f33a05592077..000000000000 --- a/keyboards/mode/m65hi_prealpha/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# MCU name -MCU = STM32F401 - -# Bootloader selection -BOOTLOADER = stm32-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic lite -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -EEPROM_DRIVER = i2c -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -DDEBUG_EEPROM_OUTPUT=TRUE From 394067cd74c52772374781b603ae42789e5760a8 Mon Sep 17 00:00:00 2001 From: Gondolindrim Date: Mon, 29 Nov 2021 20:00:58 -0300 Subject: [PATCH 6/6] Remove EEPROM debug functions --- keyboards/mode/m65ha_alpha/m65ha_alpha.c | 42 ------------------------ keyboards/mode/m65hi_alpha/m65hi_alpha.c | 42 ------------------------ 2 files changed, 84 deletions(-) diff --git a/keyboards/mode/m65ha_alpha/m65ha_alpha.c b/keyboards/mode/m65ha_alpha/m65ha_alpha.c index e05de6fb0c73..93e0c06b73fc 100644 --- a/keyboards/mode/m65ha_alpha/m65ha_alpha.c +++ b/keyboards/mode/m65ha_alpha/m65ha_alpha.c @@ -65,45 +65,3 @@ bool led_update_kb(led_t led_state) { } return res; } - -uint8_t prng(void) { - static uint8_t s = 0xAA, a = 0; - s ^= s << 3; - s ^= s >> 5; - s ^= a++ >> 2; - return s; -} - -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - // debug_enable = true; - // debug_matrix = true; - // debug_keyboard=true; - // debug_mouse=true; -} - -void matrix_scan_user(void) { - static uint32_t last_eeprom_access = 0; - uint32_t now = timer_read32(); - if (now - last_eeprom_access > 5000) { - dprint("reading eeprom\n"); - last_eeprom_access = now; - - union { - uint8_t bytes[4]; - uint32_t raw; - } tmp; - tmp.bytes[0] = prng(); - tmp.bytes[1] = prng(); - tmp.bytes[2] = prng(); - tmp.bytes[3] = prng(); - - eeconfig_update_user(tmp.raw); - uint32_t value = eeconfig_read_user(); - if (value != tmp.raw) { - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - dprint("!! EEPROM readback mismatch!\n"); - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - } - } -} diff --git a/keyboards/mode/m65hi_alpha/m65hi_alpha.c b/keyboards/mode/m65hi_alpha/m65hi_alpha.c index 644974870175..db0ab7ca9aee 100644 --- a/keyboards/mode/m65hi_alpha/m65hi_alpha.c +++ b/keyboards/mode/m65hi_alpha/m65hi_alpha.c @@ -65,45 +65,3 @@ bool led_update_kb(led_t led_state) { } return res; } - -uint8_t prng(void) { - static uint8_t s = 0xAA, a = 0; - s ^= s << 3; - s ^= s >> 5; - s ^= a++ >> 2; - return s; -} - -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - debug_enable = true; - // debug_matrix = true; - // debug_keyboard=true; - // debug_mouse=true; -} - -void matrix_scan_user(void) { - static uint32_t last_eeprom_access = 0; - uint32_t now = timer_read32(); - if (now - last_eeprom_access > 5000) { - dprint("reading eeprom\n"); - last_eeprom_access = now; - - union { - uint8_t bytes[4]; - uint32_t raw; - } tmp; - tmp.bytes[0] = prng(); - tmp.bytes[1] = prng(); - tmp.bytes[2] = prng(); - tmp.bytes[3] = prng(); - - eeconfig_update_user(tmp.raw); - uint32_t value = eeconfig_read_user(); - if (value != tmp.raw) { - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - dprint("!! EEPROM readback mismatch!\n"); - dprint("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); - } - } -}