From 8aa55b41bb4c402dc0a56836b4062d48f6d6ab35 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Mon, 31 Jul 2023 18:31:25 -0400 Subject: [PATCH 1/4] Add CK Meetup Pad 2023 to QMK --- keyboards/cannonkeys/meetuppad2023/info.json | 40 +++++++++++++++++++ .../meetuppad2023/keymaps/default/keymap.c | 20 ++++++++++ .../meetuppad2023/keymaps/via/keymap.c | 35 ++++++++++++++++ .../meetuppad2023/keymaps/via/rules.mk | 1 + keyboards/cannonkeys/meetuppad2023/readme.md | 18 +++++++++ keyboards/cannonkeys/meetuppad2023/rules.mk | 5 +++ 6 files changed, 119 insertions(+) create mode 100644 keyboards/cannonkeys/meetuppad2023/info.json create mode 100644 keyboards/cannonkeys/meetuppad2023/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/meetuppad2023/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/meetuppad2023/keymaps/via/rules.mk create mode 100644 keyboards/cannonkeys/meetuppad2023/readme.md create mode 100644 keyboards/cannonkeys/meetuppad2023/rules.mk diff --git a/keyboards/cannonkeys/meetuppad2023/info.json b/keyboards/cannonkeys/meetuppad2023/info.json new file mode 100644 index 000000000000..94b20707f480 --- /dev/null +++ b/keyboards/cannonkeys/meetuppad2023/info.json @@ -0,0 +1,40 @@ +{ + "manufacturer": "CannonKeys", + "url": "https://cannonkeys.com", + "keyboard_name": "Meetup Pad 2023", + "maintainer": "awkannan", + "processor": "STM32F072", + "bootloader": "stm32-dfu", + "usb": { + "vid": "0xCA04", + "pid": "0x2023", + "device_version": "0.0.1" + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "diode_direction": "COL2ROW", + "matrix_pins": { + "rows": ["B1", "A7"], + "cols": ["B11", "B10", "B2", "B0"] + }, + "layouts": { + "LAYOUT": { + "layout": [ + { "matrix": [1, 0], "x": 0, "y": 0 }, + { "matrix": [0, 0], "x": 1, "y": 0 }, + { "matrix": [1, 1], "x": 0, "y": 1 }, + { "matrix": [0, 1], "x": 1, "y": 1 }, + { "matrix": [1, 2], "x": 0, "y": 2 }, + { "matrix": [0, 2], "x": 1, "y": 2 }, + { "matrix": [1, 3], "x": 0, "y": 3 }, + { "matrix": [0, 3], "x": 1, "y": 3 } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/cannonkeys/meetuppad2023/keymaps/default/keymap.c b/keyboards/cannonkeys/meetuppad2023/keymaps/default/keymap.c new file mode 100644 index 000000000000..790839f831e0 --- /dev/null +++ b/keyboards/cannonkeys/meetuppad2023/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +// Copyright 2023 Andrew Kannan +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_1, KC_2, + KC_3, KC_4, + KC_5, KC_6, + KC_7, MO(1) + ), + + [1] = LAYOUT( + QK_BOOT, KC_8, + KC_9, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/cannonkeys/meetuppad2023/keymaps/via/keymap.c b/keyboards/cannonkeys/meetuppad2023/keymaps/via/keymap.c new file mode 100644 index 000000000000..53550b8292b1 --- /dev/null +++ b/keyboards/cannonkeys/meetuppad2023/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +// Copyright 2023 Andrew Kannan +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum custom_keycodes { + MYMACRO = QK_KB_0, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + MYMACRO, KC_1, + KC_2, KC_3, + KC_4, KC_5, + KC_6, MO(1) + ), + + [1] = LAYOUT( + QK_BOOT, KC_7, + KC_8, KC_9, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MYMACRO: + if (record->event.pressed) { + SEND_STRING("I went to the CannonKeys 2023 meetup and all I got was this macropad"); + } + break; + } + return true; +}; diff --git a/keyboards/cannonkeys/meetuppad2023/keymaps/via/rules.mk b/keyboards/cannonkeys/meetuppad2023/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/cannonkeys/meetuppad2023/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/cannonkeys/meetuppad2023/readme.md b/keyboards/cannonkeys/meetuppad2023/readme.md new file mode 100644 index 000000000000..42cd33406c13 --- /dev/null +++ b/keyboards/cannonkeys/meetuppad2023/readme.md @@ -0,0 +1,18 @@ +# CannonKeys Meetup Pad 2023 + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/meetup_pad2023:default + +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 right on this board) and plug in the keyboard +* **Physical reset button**: Swap the boot switch on the back of the PCB to "1" and hit the reset button +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/cannonkeys/meetuppad2023/rules.mk b/keyboards/cannonkeys/meetuppad2023/rules.mk new file mode 100644 index 000000000000..2a5031cd3205 --- /dev/null +++ b/keyboards/cannonkeys/meetuppad2023/rules.mk @@ -0,0 +1,5 @@ +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -v FFFF -p FFFF + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE From bd9478703ce457bf0bfc3383ef960ac0809d49b0 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Mon, 31 Jul 2023 18:32:01 -0400 Subject: [PATCH 2/4] update readme --- keyboards/cannonkeys/meetuppad2023/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/cannonkeys/meetuppad2023/readme.md b/keyboards/cannonkeys/meetuppad2023/readme.md index 42cd33406c13..59f925834afd 100644 --- a/keyboards/cannonkeys/meetuppad2023/readme.md +++ b/keyboards/cannonkeys/meetuppad2023/readme.md @@ -5,7 +5,7 @@ Hardware Supported: STM32F072CBT6 Make example for this keyboard (after setting up your build environment): - make cannonkeys/meetup_pad2023:default + make cannonkeys/meetuppad2023:default 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). From 971895db2b656fe1006b7cea62d3e8eaf7849b16 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Tue, 22 Aug 2023 13:00:27 -0400 Subject: [PATCH 3/4] Reformatted JSON --- keyboards/cannonkeys/meetuppad2023/info.json | 38 ++++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/keyboards/cannonkeys/meetuppad2023/info.json b/keyboards/cannonkeys/meetuppad2023/info.json index 94b20707f480..e55d4361d84e 100644 --- a/keyboards/cannonkeys/meetuppad2023/info.json +++ b/keyboards/cannonkeys/meetuppad2023/info.json @@ -1,15 +1,9 @@ { "manufacturer": "CannonKeys", - "url": "https://cannonkeys.com", "keyboard_name": "Meetup Pad 2023", "maintainer": "awkannan", - "processor": "STM32F072", "bootloader": "stm32-dfu", - "usb": { - "vid": "0xCA04", - "pid": "0x2023", - "device_version": "0.0.1" - }, + "diode_direction": "COL2ROW", "features": { "bootmagic": true, "command": false, @@ -18,23 +12,29 @@ "mousekey": true, "nkro": true }, - "diode_direction": "COL2ROW", "matrix_pins": { - "rows": ["B1", "A7"], - "cols": ["B11", "B10", "B2", "B0"] + "cols": ["B11", "B10", "B2", "B0"], + "rows": ["B1", "A7"] + }, + "processor": "STM32F072", + "url": "https://cannonkeys.com", + "usb": { + "device_version": "0.0.1", + "pid": "0x2023", + "vid": "0xCA04" }, "layouts": { "LAYOUT": { "layout": [ - { "matrix": [1, 0], "x": 0, "y": 0 }, - { "matrix": [0, 0], "x": 1, "y": 0 }, - { "matrix": [1, 1], "x": 0, "y": 1 }, - { "matrix": [0, 1], "x": 1, "y": 1 }, - { "matrix": [1, 2], "x": 0, "y": 2 }, - { "matrix": [0, 2], "x": 1, "y": 2 }, - { "matrix": [1, 3], "x": 0, "y": 3 }, - { "matrix": [0, 3], "x": 1, "y": 3 } + {"matrix": [1, 0], "x": 0, "y": 0}, + {"matrix": [0, 0], "x": 1, "y": 0}, + {"matrix": [1, 1], "x": 0, "y": 1}, + {"matrix": [0, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 0, "y": 2}, + {"matrix": [0, 2], "x": 1, "y": 2}, + {"matrix": [1, 3], "x": 0, "y": 3}, + {"matrix": [0, 3], "x": 1, "y": 3} ] } } -} \ No newline at end of file +} From 34bf800d214fe50ea8f2c946a99bd1e32d0231f1 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Mon, 28 Aug 2023 15:33:21 -0400 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Ryan --- keyboards/cannonkeys/meetuppad2023/keymaps/via/keymap.c | 2 +- keyboards/cannonkeys/meetuppad2023/readme.md | 4 ++-- keyboards/cannonkeys/meetuppad2023/rules.mk | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/keyboards/cannonkeys/meetuppad2023/keymaps/via/keymap.c b/keyboards/cannonkeys/meetuppad2023/keymaps/via/keymap.c index 53550b8292b1..8039eb260ea9 100644 --- a/keyboards/cannonkeys/meetuppad2023/keymaps/via/keymap.c +++ b/keyboards/cannonkeys/meetuppad2023/keymaps/via/keymap.c @@ -27,7 +27,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case MYMACRO: if (record->event.pressed) { - SEND_STRING("I went to the CannonKeys 2023 meetup and all I got was this macropad"); + SEND_STRING("I went to the CannonKeys 2023 meetup and all I got was this macropad"); } break; } diff --git a/keyboards/cannonkeys/meetuppad2023/readme.md b/keyboards/cannonkeys/meetuppad2023/readme.md index 59f925834afd..73312c1b6976 100644 --- a/keyboards/cannonkeys/meetuppad2023/readme.md +++ b/keyboards/cannonkeys/meetuppad2023/readme.md @@ -1,7 +1,7 @@ # CannonKeys Meetup Pad 2023 -Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) -Hardware Supported: STM32F072CBT6 +* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) +* Hardware Supported: STM32F072CBT6 Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/cannonkeys/meetuppad2023/rules.mk b/keyboards/cannonkeys/meetuppad2023/rules.mk index 2a5031cd3205..0ab54aaaf718 100644 --- a/keyboards/cannonkeys/meetuppad2023/rules.mk +++ b/keyboards/cannonkeys/meetuppad2023/rules.mk @@ -1,5 +1,2 @@ # Wildcard to allow APM32 MCU DFU_SUFFIX_ARGS = -v FFFF -p FFFF - -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE