From 2d95cc664e160933a1dd6e1e22d05cf7f81cef9a Mon Sep 17 00:00:00 2001 From: Linus Nibell Date: Mon, 20 Nov 2023 09:16:49 +0100 Subject: [PATCH] added nibell micropad --- keyboards/nibell/mpad6/config.h | 20 ++++++++++ keyboards/nibell/mpad6/info.json | 39 +++++++++++++++++++ .../nibell/mpad6/keymaps/default/keymap.c | 18 +++++++++ keyboards/nibell/mpad6/readme.md | 27 +++++++++++++ keyboards/nibell/mpad6/rules.mk | 1 + keyboards/nibell/rp2040/config.h | 22 +++++++++++ keyboards/nibell/rp2040/halconf.h | 10 +++++ keyboards/nibell/rp2040/info.json | 15 +++++++ .../nibell/rp2040/keymaps/default/keymap.c | 7 ++++ keyboards/nibell/rp2040/mcuconf.h | 12 ++++++ keyboards/nibell/rp2040/readme.md | 12 ++++++ keyboards/nibell/rp2040/rules.mk | 0 12 files changed, 183 insertions(+) create mode 100644 keyboards/nibell/mpad6/config.h create mode 100644 keyboards/nibell/mpad6/info.json create mode 100644 keyboards/nibell/mpad6/keymaps/default/keymap.c create mode 100644 keyboards/nibell/mpad6/readme.md create mode 100644 keyboards/nibell/mpad6/rules.mk create mode 100644 keyboards/nibell/rp2040/config.h create mode 100644 keyboards/nibell/rp2040/halconf.h create mode 100644 keyboards/nibell/rp2040/info.json create mode 100644 keyboards/nibell/rp2040/keymaps/default/keymap.c create mode 100644 keyboards/nibell/rp2040/mcuconf.h create mode 100644 keyboards/nibell/rp2040/readme.md create mode 100644 keyboards/nibell/rp2040/rules.mk diff --git a/keyboards/nibell/mpad6/config.h b/keyboards/nibell/mpad6/config.h new file mode 100644 index 00000000000..7f634ec24e6 --- /dev/null +++ b/keyboards/nibell/mpad6/config.h @@ -0,0 +1,20 @@ +// Copyright 2023 nibell (@nibell) +// 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 diff --git a/keyboards/nibell/mpad6/info.json b/keyboards/nibell/mpad6/info.json new file mode 100644 index 00000000000..5bf84315aad --- /dev/null +++ b/keyboards/nibell/mpad6/info.json @@ -0,0 +1,39 @@ +{ + "manufacturer": "nibell", + "keyboard_name": "nibell/mpad6", + "maintainer": "nibell", + "bootloader": "rp2040", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["GP12", "GP11", "GP10"], + "rows": ["GP4", "GP5"] + }, + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "community_layouts": ["ortho_2x3"], + "layouts": { + "LAYOUT_ortho_2x3": { + "layout": [ + {"x": 0, "y": 0, "matrix": [0, 0]}, + {"x": 1, "y": 0, "matrix": [0, 1]}, + {"x": 2, "y": 0, "matrix": [0, 2]}, + {"x": 0, "y": 1, "matrix": [1, 0]}, + {"x": 1, "y": 1, "matrix": [1, 1]}, + {"x": 2, "y": 1, "matrix": [1, 2]} + ] + } + } +} diff --git a/keyboards/nibell/mpad6/keymaps/default/keymap.c b/keyboards/nibell/mpad6/keymaps/default/keymap.c new file mode 100644 index 00000000000..1c9a471c77f --- /dev/null +++ b/keyboards/nibell/mpad6/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬────────┬───────┐ + * │ 1 │ 2 │ 3 │ + * ├───┼────────┼───────┤ + * │ 4 │ RSHIFT │ RCTRL │ + * └───┴────────┴───────┘ + */ + [0] = LAYOUT_ortho_2x3( + KC_1, KC_2, KC_3, + KC_4, KC_RIGHT_SHIFT, KC_RIGHT_CTRL + ) +}; diff --git a/keyboards/nibell/mpad6/readme.md b/keyboards/nibell/mpad6/readme.md new file mode 100644 index 00000000000..5ab9f9d7bf9 --- /dev/null +++ b/keyboards/nibell/mpad6/readme.md @@ -0,0 +1,27 @@ +# nibell/mpad6 + +![nibell/mpad6](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [nibell](https://github.com/nibell) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make nibell/mpad6:default + +Flashing example for this keyboard: + + make nibell/mpad6: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 (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/nibell/mpad6/rules.mk b/keyboards/nibell/mpad6/rules.mk new file mode 100644 index 00000000000..6e7633bfe01 --- /dev/null +++ b/keyboards/nibell/mpad6/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/nibell/rp2040/config.h b/keyboards/nibell/rp2040/config.h new file mode 100644 index 00000000000..0563ebfa5f1 --- /dev/null +++ b/keyboards/nibell/rp2040/config.h @@ -0,0 +1,22 @@ +// Copyright 2022 Stefan Kerkmann +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + + +#define DEBUG_MATRIX_SCAN_RATE + +#define QMK_WAITING_TEST_BUSY_PIN GP8 +#define QMK_WAITING_TEST_YIELD_PIN GP9 + +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25 +#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U + +#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B + +#define AUDIO_PIN GP16 +#define AUDIO_PWM_DRIVER PWMD0 +#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A + +#define ADC_PIN GP26 diff --git a/keyboards/nibell/rp2040/halconf.h b/keyboards/nibell/rp2040/halconf.h new file mode 100644 index 00000000000..ec56be2263f --- /dev/null +++ b/keyboards/nibell/rp2040/halconf.h @@ -0,0 +1,10 @@ +// Copyright 2022 Stefan Kerkmann +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE +#define HAL_USE_ADC TRUE + +#include_next diff --git a/keyboards/nibell/rp2040/info.json b/keyboards/nibell/rp2040/info.json new file mode 100644 index 00000000000..40eb8962322 --- /dev/null +++ b/keyboards/nibell/rp2040/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Onekey RP2040", + "processor": "RP2040", + "bootloader": "rp2040", + "matrix_pins": { + "cols": ["GP4"], + "rows": ["GP5"] + }, + "backlight": { + "pin": "GP25" + }, + "ws2812": { + "pin": "GP25" + } +} diff --git a/keyboards/nibell/rp2040/keymaps/default/keymap.c b/keyboards/nibell/rp2040/keymaps/default/keymap.c new file mode 100644 index 00000000000..1c0375e56cc --- /dev/null +++ b/keyboards/nibell/rp2040/keymaps/default/keymap.c @@ -0,0 +1,7 @@ +// Copyright 2020 QMK +// SPDX-License-Identifier: GPL-2.0-or-later +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_ortho_1x1(KC_A) +}; diff --git a/keyboards/nibell/rp2040/mcuconf.h b/keyboards/nibell/rp2040/mcuconf.h new file mode 100644 index 00000000000..e24a0d4f24e --- /dev/null +++ b/keyboards/nibell/rp2040/mcuconf.h @@ -0,0 +1,12 @@ +// Copyright 2022 Stefan Kerkmann +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef RP_PWM_USE_PWM0 +#define RP_PWM_USE_PWM0 TRUE + +#undef RP_PWM_USE_PWM4 +#define RP_PWM_USE_PWM4 TRUE diff --git a/keyboards/nibell/rp2040/readme.md b/keyboards/nibell/rp2040/readme.md new file mode 100644 index 00000000000..9014479f8d5 --- /dev/null +++ b/keyboards/nibell/rp2040/readme.md @@ -0,0 +1,12 @@ +# Raspberry Pi 2040 onekey + +To trigger keypress, short together pins *GP4* and *GP5*. + +Double-tap reset to enter bootloader mode. Copy the built uf2 file to the device by dragging the file to the new USB disk. + +## Supported Hardware + +* Raspberry Pi Pico +* SparkFun Pro Micro - RP2040 +* Adafruit KB2040 - RP2040 Kee Boar +* ...and many more RP2040 based development boards diff --git a/keyboards/nibell/rp2040/rules.mk b/keyboards/nibell/rp2040/rules.mk new file mode 100644 index 00000000000..e69de29bb2d