From fc1406bf6bda47a14b856290c0539d6e592569dc Mon Sep 17 00:00:00 2001 From: ShandonCodes Date: Mon, 18 Sep 2023 00:58:51 +0000 Subject: [PATCH 1/4] Add riot pad --- keyboards/riot_pad/config.h | 8 +++ keyboards/riot_pad/halconf.h | 7 +++ keyboards/riot_pad/info.json | 58 +++++++++++++++++++++ keyboards/riot_pad/keymaps/default/keymap.c | 30 +++++++++++ keyboards/riot_pad/keymaps/via/keymap.c | 22 ++++++++ keyboards/riot_pad/keymaps/via/rules.mk | 1 + keyboards/riot_pad/mcuconf.h | 8 +++ keyboards/riot_pad/readme.md | 25 +++++++++ keyboards/riot_pad/rules.mk | 0 9 files changed, 159 insertions(+) create mode 100644 keyboards/riot_pad/config.h create mode 100644 keyboards/riot_pad/halconf.h create mode 100644 keyboards/riot_pad/info.json create mode 100644 keyboards/riot_pad/keymaps/default/keymap.c create mode 100644 keyboards/riot_pad/keymaps/via/keymap.c create mode 100644 keyboards/riot_pad/keymaps/via/rules.mk create mode 100644 keyboards/riot_pad/mcuconf.h create mode 100644 keyboards/riot_pad/readme.md create mode 100644 keyboards/riot_pad/rules.mk diff --git a/keyboards/riot_pad/config.h b/keyboards/riot_pad/config.h new file mode 100644 index 000000000000..97dcb1de3c7f --- /dev/null +++ b/keyboards/riot_pad/config.h @@ -0,0 +1,8 @@ +// Copyright 2023 ShandonCodes (@ShandonCodes) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define WS2812_SPI SPID1 +#define WS2812_SPI_MOSI_PAL_MODE 0 +#define WS2812_SPI_SCK_PAL_MODE 0 +#define WS2812_SPI_SCK_PIN A5 diff --git a/keyboards/riot_pad/halconf.h b/keyboards/riot_pad/halconf.h new file mode 100644 index 000000000000..555a60902955 --- /dev/null +++ b/keyboards/riot_pad/halconf.h @@ -0,0 +1,7 @@ +// Copyright 2023 ShandonCodes (@ShandonCodes) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#define HAL_USE_SPI TRUE + +#include_next \ No newline at end of file diff --git a/keyboards/riot_pad/info.json b/keyboards/riot_pad/info.json new file mode 100644 index 000000000000..de9e1a5c7877 --- /dev/null +++ b/keyboards/riot_pad/info.json @@ -0,0 +1,58 @@ +{ + "manufacturer": "ShandonCodes", + "keyboard_name": "RiotPad", + "maintainer": "ShandonCodes", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "nkro": true, + "rgblight": true + }, + "bootmagic": { + "matrix": [0, 0] + }, + "matrix_pins": { + "cols": ["B14", "A8", "A9"], + "rows": ["B13", "B15"] + }, + "ws2812": { + "pin": "A7", + "driver": "spi" + }, + "rgblight": { + "led_count": 12, + "animations": { + "breathing":true, + "alternating":true, + "christmas":true, + "knight":true, + "rainbow_mood":true, + "rainbow_swirl":true, + "snake":true, + "static_gradient":true, + "twinkle":true + } + }, + "processor": "STM32F072", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x1000", + "vid": "0x7877" + }, + "layouts": { + "LAYOUT_ortho_2x3": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/riot_pad/keymaps/default/keymap.c b/keyboards/riot_pad/keymaps/default/keymap.c new file mode 100644 index 000000000000..832fdae60e24 --- /dev/null +++ b/keyboards/riot_pad/keymaps/default/keymap.c @@ -0,0 +1,30 @@ +// Copyright 2023 ShandonCodes (@ShandonCodes) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬────┐ + * │ A │ B │ C │ + * ├───┼───┼────┤ + * │ D │ E │ Fn │ + * └───┴───┴────┘ + */ + [0] = LAYOUT_ortho_2x3( + KC_A, KC_B, KC_C, + KC_D, KC_E, MO(1) + ), + [1] = LAYOUT_ortho_2x3( + RGB_MOD, RGB_RMOD, RGB_TOG, + RGB_VAI, RGB_VAD, KC_TRNS + ), + [2] = LAYOUT_ortho_2x3( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_ortho_2x3( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/riot_pad/keymaps/via/keymap.c b/keyboards/riot_pad/keymaps/via/keymap.c new file mode 100644 index 000000000000..a4bfce0059de --- /dev/null +++ b/keyboards/riot_pad/keymaps/via/keymap.c @@ -0,0 +1,22 @@ +// Copyright 2023 ShandonCodes (@ShandonCodes) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┐ + * │ A │ B │ C │ + * ├───┼───┼───┤ + * │ D │ E │ F │ + * └───┴───┴───┘ + */ + [0] = LAYOUT_ortho_2x3( + KC_A, KC_B, KC_C, + KC_D, KC_E, MO(1) + ), + [1] = LAYOUT_ortho_2x3( + RGB_MOD, RGB_RMOD, RGB_TOG, + RGB_VAI, RGB_VAD, KC_TRNS + ) +}; diff --git a/keyboards/riot_pad/keymaps/via/rules.mk b/keyboards/riot_pad/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/riot_pad/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/riot_pad/mcuconf.h b/keyboards/riot_pad/mcuconf.h new file mode 100644 index 000000000000..7c3eec48021c --- /dev/null +++ b/keyboards/riot_pad/mcuconf.h @@ -0,0 +1,8 @@ +// Copyright 2023 ShandonCodes (@ShandonCodes) +// SPDX-License-Identifier: GPL-2.0-or-later +#pragma once + +#include_next + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE \ No newline at end of file diff --git a/keyboards/riot_pad/readme.md b/keyboards/riot_pad/readme.md new file mode 100644 index 000000000000..8a1bbf53c6a9 --- /dev/null +++ b/keyboards/riot_pad/readme.md @@ -0,0 +1,25 @@ +# riot_pad + +![riot_pad](https://i.imgur.com/zH6H3pS.png) + +A RGB lovin', 6 key macropad. + +* Keyboard Maintainer: [ShandonCodes](https://github.com/ShandonCodes) +* Hardware Supported: RiotPad PCB +* Hardware Availability: [Limited Groupbuy](https://store.shandon.codes/) + +Make example for this keyboard (after setting up your build environment): + + make riot_pad:default + +Flashing example for this keyboard: + + make riot_pad: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). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (top left key) and plug in the keyboard diff --git a/keyboards/riot_pad/rules.mk b/keyboards/riot_pad/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 From 710ccf57928f65313159c3cce09551537072593a Mon Sep 17 00:00:00 2001 From: ShandonCodes Date: Mon, 18 Sep 2023 01:09:53 +0000 Subject: [PATCH 2/4] Remove default bootload --- keyboards/riot_pad/info.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/riot_pad/info.json b/keyboards/riot_pad/info.json index de9e1a5c7877..c7959e38318e 100644 --- a/keyboards/riot_pad/info.json +++ b/keyboards/riot_pad/info.json @@ -11,9 +11,6 @@ "nkro": true, "rgblight": true }, - "bootmagic": { - "matrix": [0, 0] - }, "matrix_pins": { "cols": ["B14", "A8", "A9"], "rows": ["B13", "B15"] From 76f1daeb2be93e7c667f2232a9e95e72dd7fb9e9 Mon Sep 17 00:00:00 2001 From: ShandonCodes Date: Mon, 18 Sep 2023 12:25:02 +0000 Subject: [PATCH 3/4] Resolve comment --- keyboards/riot_pad/info.json | 35 +++++++++++---------- keyboards/riot_pad/keymaps/default/keymap.c | 8 ----- keyboards/riot_pad/keymaps/via/keymap.c | 10 +++--- keyboards/riot_pad/readme.md | 2 +- 4 files changed, 24 insertions(+), 31 deletions(-) diff --git a/keyboards/riot_pad/info.json b/keyboards/riot_pad/info.json index c7959e38318e..0798a4de60c8 100644 --- a/keyboards/riot_pad/info.json +++ b/keyboards/riot_pad/info.json @@ -15,31 +15,32 @@ "cols": ["B14", "A8", "A9"], "rows": ["B13", "B15"] }, - "ws2812": { - "pin": "A7", - "driver": "spi" - }, + "processor": "STM32F072", "rgblight": { - "led_count": 12, "animations": { - "breathing":true, - "alternating":true, - "christmas":true, - "knight":true, - "rainbow_mood":true, - "rainbow_swirl":true, - "snake":true, - "static_gradient":true, - "twinkle":true - } + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "snake": true, + "static_gradient": true, + "twinkle": true + }, + "led_count": 12 }, - "processor": "STM32F072", "url": "", "usb": { "device_version": "1.0.0", "pid": "0x1000", "vid": "0x7877" }, + "ws2812": { + "driver": "spi", + "pin": "A7" + }, + "community_layouts": ["ortho_2x3"], "layouts": { "LAYOUT_ortho_2x3": { "layout": [ @@ -52,4 +53,4 @@ ] } } -} \ No newline at end of file +} diff --git a/keyboards/riot_pad/keymaps/default/keymap.c b/keyboards/riot_pad/keymaps/default/keymap.c index 832fdae60e24..0e6eda839e42 100644 --- a/keyboards/riot_pad/keymaps/default/keymap.c +++ b/keyboards/riot_pad/keymaps/default/keymap.c @@ -18,13 +18,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT_ortho_2x3( RGB_MOD, RGB_RMOD, RGB_TOG, RGB_VAI, RGB_VAD, KC_TRNS - ), - [2] = LAYOUT_ortho_2x3( - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS - ), - [3] = LAYOUT_ortho_2x3( - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS ) }; diff --git a/keyboards/riot_pad/keymaps/via/keymap.c b/keyboards/riot_pad/keymaps/via/keymap.c index a4bfce0059de..0e6eda839e42 100644 --- a/keyboards/riot_pad/keymaps/via/keymap.c +++ b/keyboards/riot_pad/keymaps/via/keymap.c @@ -5,11 +5,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* - * ┌───┬───┬───┐ - * │ A │ B │ C │ - * ├───┼───┼───┤ - * │ D │ E │ F │ - * └───┴───┴───┘ + * ┌───┬───┬────┐ + * │ A │ B │ C │ + * ├───┼───┼────┤ + * │ D │ E │ Fn │ + * └───┴───┴────┘ */ [0] = LAYOUT_ortho_2x3( KC_A, KC_B, KC_C, diff --git a/keyboards/riot_pad/readme.md b/keyboards/riot_pad/readme.md index 8a1bbf53c6a9..c2c3ffd4be5e 100644 --- a/keyboards/riot_pad/readme.md +++ b/keyboards/riot_pad/readme.md @@ -1,6 +1,6 @@ # riot_pad -![riot_pad](https://i.imgur.com/zH6H3pS.png) +![riot_pad](https://i.imgur.com/zH6H3pSh.png) A RGB lovin', 6 key macropad. From 236f91a00520091669df311c40f67a1578b44e10 Mon Sep 17 00:00:00 2001 From: ShandonCodes Date: Mon, 18 Sep 2023 13:46:53 +0000 Subject: [PATCH 4/4] Adhere to template --- keyboards/riot_pad/rules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/riot_pad/rules.mk b/keyboards/riot_pad/rules.mk index e69de29bb2d1..7ff128fa692e 100644 --- a/keyboards/riot_pad/rules.mk +++ b/keyboards/riot_pad/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank \ No newline at end of file