From d714d7256f8a847dd8289306864f0a09ae52b0e8 Mon Sep 17 00:00:00 2001 From: toril940 Date: Wed, 8 Nov 2023 16:51:12 +0000 Subject: [PATCH] waffle87 requests bundled: - Licence headers added - Codeblocked matrix_diagram.md - Consolidated files where possible - Removed excess from config.h --- keyboards/mariorion_v25/halconf.h | 3 + .../{proto => }/keymaps/default/keymap.c | 2 +- .../{proto => }/keymaps/via/keymap.c | 2 +- .../{prod => }/keymaps/via/rules.mk | 0 .../mariorion_v25/{proto => }/mariorion_v25.c | 6 +- keyboards/mariorion_v25/matrix_diagram.md | 5 +- keyboards/mariorion_v25/mcuconf.h | 3 + keyboards/mariorion_v25/prod/config.h | 33 +-------- .../prod/keymaps/default/keymap.c | 32 --------- .../mariorion_v25/prod/keymaps/via/keymap.c | 32 --------- keyboards/mariorion_v25/prod/mariorion_v25.c | 72 ------------------- keyboards/mariorion_v25/proto/config.h | 16 ----- .../mariorion_v25/proto/keymaps/via/rules.mk | 1 - 13 files changed, 17 insertions(+), 190 deletions(-) rename keyboards/mariorion_v25/{proto => }/keymaps/default/keymap.c (99%) rename keyboards/mariorion_v25/{proto => }/keymaps/via/keymap.c (99%) rename keyboards/mariorion_v25/{prod => }/keymaps/via/rules.mk (100%) rename keyboards/mariorion_v25/{proto => }/mariorion_v25.c (92%) delete mode 100644 keyboards/mariorion_v25/prod/keymaps/default/keymap.c delete mode 100644 keyboards/mariorion_v25/prod/keymaps/via/keymap.c delete mode 100644 keyboards/mariorion_v25/prod/mariorion_v25.c delete mode 100644 keyboards/mariorion_v25/proto/keymaps/via/rules.mk diff --git a/keyboards/mariorion_v25/halconf.h b/keyboards/mariorion_v25/halconf.h index fa185a82f91..a25bad2c7f9 100644 --- a/keyboards/mariorion_v25/halconf.h +++ b/keyboards/mariorion_v25/halconf.h @@ -1,3 +1,6 @@ +// Copyright 2023 Maria (@toril940) +// SPDX-License-Identifier: GPL-2.0-or-later + #pragma once #define HAL_USE_PWM TRUE diff --git a/keyboards/mariorion_v25/proto/keymaps/default/keymap.c b/keyboards/mariorion_v25/keymaps/default/keymap.c similarity index 99% rename from keyboards/mariorion_v25/proto/keymaps/default/keymap.c rename to keyboards/mariorion_v25/keymaps/default/keymap.c index bda53555475..4bee23b2728 100644 --- a/keyboards/mariorion_v25/proto/keymaps/default/keymap.c +++ b/keyboards/mariorion_v25/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -// Copyright 2023 QMK +// Copyright 2023 Maria (@toril940) // SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H diff --git a/keyboards/mariorion_v25/proto/keymaps/via/keymap.c b/keyboards/mariorion_v25/keymaps/via/keymap.c similarity index 99% rename from keyboards/mariorion_v25/proto/keymaps/via/keymap.c rename to keyboards/mariorion_v25/keymaps/via/keymap.c index fda58fac012..95bbe9cfc28 100644 --- a/keyboards/mariorion_v25/proto/keymaps/via/keymap.c +++ b/keyboards/mariorion_v25/keymaps/via/keymap.c @@ -1,4 +1,4 @@ -// Copyright 2023 QMK +// Copyright 2023 Maria (@toril940) // SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H diff --git a/keyboards/mariorion_v25/prod/keymaps/via/rules.mk b/keyboards/mariorion_v25/keymaps/via/rules.mk similarity index 100% rename from keyboards/mariorion_v25/prod/keymaps/via/rules.mk rename to keyboards/mariorion_v25/keymaps/via/rules.mk diff --git a/keyboards/mariorion_v25/proto/mariorion_v25.c b/keyboards/mariorion_v25/mariorion_v25.c similarity index 92% rename from keyboards/mariorion_v25/proto/mariorion_v25.c rename to keyboards/mariorion_v25/mariorion_v25.c index e2eb6c096cd..7c57c29dfd1 100644 --- a/keyboards/mariorion_v25/proto/mariorion_v25.c +++ b/keyboards/mariorion_v25/mariorion_v25.c @@ -1,4 +1,4 @@ -// Copyright 2023 Maria @toril940 +// Copyright @ // // 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 @@ -29,7 +29,7 @@ void matrix_init_kb(void) { matrix_init_user(); } -__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { +layer_state_t layer_state_set_kb(layer_state_t state) { switch (get_highest_layer(state)) { case 1: writePinHigh(INDICATOR_0); @@ -52,7 +52,7 @@ __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { writePinHigh(INDICATOR_2); break; } - return state; + return layer_state_set_user(state); } void suspend_power_down_kb(void) { diff --git a/keyboards/mariorion_v25/matrix_diagram.md b/keyboards/mariorion_v25/matrix_diagram.md index 352fb637034..f37df5a6e10 100644 --- a/keyboards/mariorion_v25/matrix_diagram.md +++ b/keyboards/mariorion_v25/matrix_diagram.md @@ -1,5 +1,5 @@ # Matrix Diagram for MariOrion v2.5 - +``` ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ │00 │ │02 │03 │04 │05 │ │06 │07 │08 │09 │ │0A │0B │0C │0D │ │0F │0G │0H │ └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ @@ -25,4 +25,5 @@ └─────┴───┴─────┴───────────┴───┴───────────┴─────┴───┴─────┘ ┌─────┬───┬───────────────────────────────────────┬───┬─────┐ │50 │51 │55 │5C │5D │ 10u Spacebar -└─────┴───┴───────────────────────────────────────┴───┴─────┘ \ No newline at end of file +└─────┴───┴───────────────────────────────────────┴───┴─────┘ +``` \ No newline at end of file diff --git a/keyboards/mariorion_v25/mcuconf.h b/keyboards/mariorion_v25/mcuconf.h index 18f87b42eac..c2cf95aef2e 100644 --- a/keyboards/mariorion_v25/mcuconf.h +++ b/keyboards/mariorion_v25/mcuconf.h @@ -1,3 +1,6 @@ +// Copyright 2023 Maria (@toril940) +// SPDX-License-Identifier: GPL-2.0-or-later + #pragma once #include_next diff --git a/keyboards/mariorion_v25/prod/config.h b/keyboards/mariorion_v25/prod/config.h index d749b02c10b..042f7662d8e 100644 --- a/keyboards/mariorion_v25/prod/config.h +++ b/keyboards/mariorion_v25/prod/config.h @@ -1,37 +1,10 @@ -// Copyright @ -// -// 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 . +// Copyright 2023 Maria (@toril940) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once -/* - * 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 WS2812_EXTERNAL_PULLUP + #define WS2812_PWM_DRIVER PWMD17 #define WS2812_PWM_CHANNEL 1 #define WS2812_DMA_STREAM STM32_DMA1_STREAM1 diff --git a/keyboards/mariorion_v25/prod/keymaps/default/keymap.c b/keyboards/mariorion_v25/prod/keymaps/default/keymap.c deleted file mode 100644 index 0452eb6c883..00000000000 --- a/keyboards/mariorion_v25/prod/keymaps/default/keymap.c +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2023 QMK -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│ - * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bk│ Bk│ │Ins│Hom│PgU│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ├───┼───┼───┤ - * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ - * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐ - * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │Fn │ │ ↑ │ - * ├────┼───┴┬──┴─┬─┴───┴───┼───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤ ┌───┼───┼───┐ - * │Ctrl│GUI │Alt │ │ │ │ Alt│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ - * └────┴────┴────┴─────────┴───┴──────────┴────┴────┴────┴────┘ └───┴───┴───┘ - */ - [0] = LAYOUT_all( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, - - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - 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_LSFT, RGB_TOG, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, RGB_MOD, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ) -}; diff --git a/keyboards/mariorion_v25/prod/keymaps/via/keymap.c b/keyboards/mariorion_v25/prod/keymaps/via/keymap.c deleted file mode 100644 index 967ef8186a3..00000000000 --- a/keyboards/mariorion_v25/prod/keymaps/via/keymap.c +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2023 QMK -// SPDX-License-Identifier: GPL-2.0-or-later - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│ - * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┐ - * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Bk│ Bk│ │Ins│Hom│PgU│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ ├───┼───┼───┤ - * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ - * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ ┌───┐ - * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shft │Fn │ │ ↑ │ - * ├────┼───┴┬──┴─┬─┴───┴───┼───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤ ┌───┼───┼───┐ - * │Ctrl│GUI │Alt │ │ │ │ Alt│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ - * └────┴────┴────┴─────────┴───┴──────────┴────┴────┴────┴────┘ └───┴───┴───┘ - */ -[0] = LAYOUT_all( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, - - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - 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_LSFT, RGB_TOG, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, RGB_MOD, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT -), -}; diff --git a/keyboards/mariorion_v25/prod/mariorion_v25.c b/keyboards/mariorion_v25/prod/mariorion_v25.c deleted file mode 100644 index e2eb6c096cd..00000000000 --- a/keyboards/mariorion_v25/prod/mariorion_v25.c +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2023 Maria @toril940 -// -// 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 "quantum.h" - -// Optional override functions below. -// You can leave any or all of these undefined. -// These are only required if you want to perform custom actions. - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - setPinOutput(INDICATOR_0); - setPinOutput(INDICATOR_1); - setPinOutput(INDICATOR_2); - matrix_init_user(); -} - -__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { - switch (get_highest_layer(state)) { - case 1: - writePinHigh(INDICATOR_0); - writePinLow(INDICATOR_1); - writePinLow(INDICATOR_2); - break; - case 2: - writePinLow(INDICATOR_0); - writePinHigh(INDICATOR_1); - writePinLow(INDICATOR_2); - break; - case 3: - writePinLow(INDICATOR_0); - writePinLow(INDICATOR_1); - writePinHigh(INDICATOR_2); - break; - default: - writePinHigh(INDICATOR_0); - writePinHigh(INDICATOR_1); - writePinHigh(INDICATOR_2); - break; - } - return state; -} - -void suspend_power_down_kb(void) { - writePinLow(INDICATOR_0); - writePinLow(INDICATOR_1); - writePinLow(INDICATOR_2); - - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - writePinHigh(INDICATOR_0); - writePinHigh(INDICATOR_1); - writePinHigh(INDICATOR_2); - - suspend_wakeup_init_user(); -} diff --git a/keyboards/mariorion_v25/proto/config.h b/keyboards/mariorion_v25/proto/config.h index 5dd0604ae75..6865f2dbb01 100644 --- a/keyboards/mariorion_v25/proto/config.h +++ b/keyboards/mariorion_v25/proto/config.h @@ -3,22 +3,6 @@ #pragma once -/* - * 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 WS2812_EXTERNAL_PULLUP #define WS2812_PWM_DRIVER PWMD17 diff --git a/keyboards/mariorion_v25/proto/keymaps/via/rules.mk b/keyboards/mariorion_v25/proto/keymaps/via/rules.mk deleted file mode 100644 index 036bd6d1c3e..00000000000 --- a/keyboards/mariorion_v25/proto/keymaps/via/rules.mk +++ /dev/null @@ -1 +0,0 @@ -VIA_ENABLE = yes \ No newline at end of file