From a483ab321313471bfa54e71f14bb68056130b7c3 Mon Sep 17 00:00:00 2001 From: peepeetee <43021794+peepeetee@users.noreply.github.com> Date: Tue, 11 Jan 2022 08:39:17 +0800 Subject: [Keyboard] move novelkeys keyboards to vendor folder (#15783) --- keyboards/novelkeys/nk1/config.h | 93 ++++++++++++ keyboards/novelkeys/nk1/info.json | 10 ++ keyboards/novelkeys/nk1/keymaps/default/keymap.c | 21 +++ keyboards/novelkeys/nk1/keymaps/default/readme.md | 1 + keyboards/novelkeys/nk1/keymaps/via/keymap.c | 21 +++ keyboards/novelkeys/nk1/keymaps/via/readme.md | 1 + keyboards/novelkeys/nk1/keymaps/via/rules.mk | 1 + keyboards/novelkeys/nk1/nk1.c | 17 +++ keyboards/novelkeys/nk1/nk1.h | 25 ++++ keyboards/novelkeys/nk1/readme.md | 32 +++++ keyboards/novelkeys/nk1/rules.mk | 20 +++ keyboards/novelkeys/nk65/config.h | 159 +++++++++++++++++++++ keyboards/novelkeys/nk65/halconf.h | 33 +++++ keyboards/novelkeys/nk65/info.json | 10 ++ keyboards/novelkeys/nk65/keymaps/default/keymap.c | 46 ++++++ keyboards/novelkeys/nk65/keymaps/default/readme.md | 6 + .../novelkeys/nk65/keymaps/madhatter/keymap.c | 37 +++++ keyboards/novelkeys/nk65/keymaps/via/keymap.c | 46 ++++++ keyboards/novelkeys/nk65/keymaps/via/readme.md | 6 + keyboards/novelkeys/nk65/keymaps/via/rules.mk | 1 + keyboards/novelkeys/nk65/mcuconf.h | 43 ++++++ keyboards/novelkeys/nk65/nk65.c | 54 +++++++ keyboards/novelkeys/nk65/nk65.h | 38 +++++ keyboards/novelkeys/nk65/readme.md | 39 +++++ keyboards/novelkeys/nk65/rules.mk | 35 +++++ keyboards/novelkeys/nk65/v1_4/config.h | 22 +++ keyboards/novelkeys/nk65/v1_4/readme.md | 39 +++++ keyboards/novelkeys/nk65/v1_4/rules.mk | 1 + keyboards/novelkeys/nk87/config.h | 146 +++++++++++++++++++ keyboards/novelkeys/nk87/halconf.h | 33 +++++ keyboards/novelkeys/nk87/info.json | 10 ++ keyboards/novelkeys/nk87/keymaps/default/keymap.c | 34 +++++ keyboards/novelkeys/nk87/keymaps/default/readme.md | 7 + keyboards/novelkeys/nk87/keymaps/via/keymap.c | 51 +++++++ keyboards/novelkeys/nk87/keymaps/via/readme.md | 7 + keyboards/novelkeys/nk87/keymaps/via/rules.mk | 1 + keyboards/novelkeys/nk87/mcuconf.h | 43 ++++++ keyboards/novelkeys/nk87/nk87.c | 58 ++++++++ keyboards/novelkeys/nk87/nk87.h | 40 ++++++ keyboards/novelkeys/nk87/readme.md | 34 +++++ keyboards/novelkeys/nk87/rules.mk | 33 +++++ keyboards/novelkeys/novelpad/config.h | 144 +++++++++++++++++++ keyboards/novelkeys/novelpad/info.json | 35 +++++ .../novelkeys/novelpad/keymaps/0xdec/keymap.c | 46 ++++++ .../novelkeys/novelpad/keymaps/default/keymap.c | 73 ++++++++++ keyboards/novelkeys/novelpad/novelpad.c | 18 +++ keyboards/novelkeys/novelpad/novelpad.h | 36 +++++ keyboards/novelkeys/novelpad/readme.md | 15 ++ keyboards/novelkeys/novelpad/rules.mk | 20 +++ 49 files changed, 1741 insertions(+) create mode 100644 keyboards/novelkeys/nk1/config.h create mode 100755 keyboards/novelkeys/nk1/info.json create mode 100644 keyboards/novelkeys/nk1/keymaps/default/keymap.c create mode 100644 keyboards/novelkeys/nk1/keymaps/default/readme.md create mode 100644 keyboards/novelkeys/nk1/keymaps/via/keymap.c create mode 100644 keyboards/novelkeys/nk1/keymaps/via/readme.md create mode 100644 keyboards/novelkeys/nk1/keymaps/via/rules.mk create mode 100644 keyboards/novelkeys/nk1/nk1.c create mode 100644 keyboards/novelkeys/nk1/nk1.h create mode 100644 keyboards/novelkeys/nk1/readme.md create mode 100644 keyboards/novelkeys/nk1/rules.mk create mode 100755 keyboards/novelkeys/nk65/config.h create mode 100644 keyboards/novelkeys/nk65/halconf.h create mode 100755 keyboards/novelkeys/nk65/info.json create mode 100755 keyboards/novelkeys/nk65/keymaps/default/keymap.c create mode 100755 keyboards/novelkeys/nk65/keymaps/default/readme.md create mode 100755 keyboards/novelkeys/nk65/keymaps/madhatter/keymap.c create mode 100755 keyboards/novelkeys/nk65/keymaps/via/keymap.c create mode 100755 keyboards/novelkeys/nk65/keymaps/via/readme.md create mode 100755 keyboards/novelkeys/nk65/keymaps/via/rules.mk create mode 100644 keyboards/novelkeys/nk65/mcuconf.h create mode 100755 keyboards/novelkeys/nk65/nk65.c create mode 100755 keyboards/novelkeys/nk65/nk65.h create mode 100755 keyboards/novelkeys/nk65/readme.md create mode 100755 keyboards/novelkeys/nk65/rules.mk create mode 100755 keyboards/novelkeys/nk65/v1_4/config.h create mode 100755 keyboards/novelkeys/nk65/v1_4/readme.md create mode 100755 keyboards/novelkeys/nk65/v1_4/rules.mk create mode 100755 keyboards/novelkeys/nk87/config.h create mode 100644 keyboards/novelkeys/nk87/halconf.h create mode 100755 keyboards/novelkeys/nk87/info.json create mode 100755 keyboards/novelkeys/nk87/keymaps/default/keymap.c create mode 100755 keyboards/novelkeys/nk87/keymaps/default/readme.md create mode 100755 keyboards/novelkeys/nk87/keymaps/via/keymap.c create mode 100755 keyboards/novelkeys/nk87/keymaps/via/readme.md create mode 100755 keyboards/novelkeys/nk87/keymaps/via/rules.mk create mode 100644 keyboards/novelkeys/nk87/mcuconf.h create mode 100755 keyboards/novelkeys/nk87/nk87.c create mode 100755 keyboards/novelkeys/nk87/nk87.h create mode 100755 keyboards/novelkeys/nk87/readme.md create mode 100755 keyboards/novelkeys/nk87/rules.mk create mode 100755 keyboards/novelkeys/novelpad/config.h create mode 100644 keyboards/novelkeys/novelpad/info.json create mode 100755 keyboards/novelkeys/novelpad/keymaps/0xdec/keymap.c create mode 100755 keyboards/novelkeys/novelpad/keymaps/default/keymap.c create mode 100755 keyboards/novelkeys/novelpad/novelpad.c create mode 100755 keyboards/novelkeys/novelpad/novelpad.h create mode 100644 keyboards/novelkeys/novelpad/readme.md create mode 100755 keyboards/novelkeys/novelpad/rules.mk (limited to 'keyboards/novelkeys') diff --git a/keyboards/novelkeys/nk1/config.h b/keyboards/novelkeys/nk1/config.h new file mode 100644 index 0000000000..122df2e6da --- /dev/null +++ b/keyboards/novelkeys/nk1/config.h @@ -0,0 +1,93 @@ + +/* Copyright 2021 Yiancar + * + * 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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4E4D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT NK1 + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ + { D4 } \ +} + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +#define RGB_DI_PIN F0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 9 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + #define RGBLIGHT_ANIMATIONS +#endif + +/* There is only 1 Button so limiting VIA to 1 layer */ +#define DYNAMIC_KEYMAP_LAYER_COUNT 1 diff --git a/keyboards/novelkeys/nk1/info.json b/keyboards/novelkeys/nk1/info.json new file mode 100755 index 0000000000..43b1719e94 --- /dev/null +++ b/keyboards/novelkeys/nk1/info.json @@ -0,0 +1,10 @@ +{ + "keyboard_name": "NK1", + "url": "www.yiancar-designs.com", + "maintainer": "yiancar", + "layouts": { + "LAYOUT_ortho_1x1": { + "layout": [{"x": 0, "y": 0}] + } + } +} diff --git a/keyboards/novelkeys/nk1/keymaps/default/keymap.c b/keyboards/novelkeys/nk1/keymaps/default/keymap.c new file mode 100644 index 0000000000..550a0f4873 --- /dev/null +++ b/keyboards/novelkeys/nk1/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +/* Copyright 2021 Yiancar + * + * 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_ortho_1x1( /* Base */ + KC_ENT) +}; diff --git a/keyboards/novelkeys/nk1/keymaps/default/readme.md b/keyboards/novelkeys/nk1/keymaps/default/readme.md new file mode 100644 index 0000000000..6e9c78ee51 --- /dev/null +++ b/keyboards/novelkeys/nk1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for NK1 diff --git a/keyboards/novelkeys/nk1/keymaps/via/keymap.c b/keyboards/novelkeys/nk1/keymaps/via/keymap.c new file mode 100644 index 0000000000..550a0f4873 --- /dev/null +++ b/keyboards/novelkeys/nk1/keymaps/via/keymap.c @@ -0,0 +1,21 @@ +/* Copyright 2021 Yiancar + * + * 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_ortho_1x1( /* Base */ + KC_ENT) +}; diff --git a/keyboards/novelkeys/nk1/keymaps/via/readme.md b/keyboards/novelkeys/nk1/keymaps/via/readme.md new file mode 100644 index 0000000000..10025a5969 --- /dev/null +++ b/keyboards/novelkeys/nk1/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default keymap for NK1 with VIA enabled diff --git a/keyboards/novelkeys/nk1/keymaps/via/rules.mk b/keyboards/novelkeys/nk1/keymaps/via/rules.mk new file mode 100644 index 0000000000..036bd6d1c3 --- /dev/null +++ b/keyboards/novelkeys/nk1/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/novelkeys/nk1/nk1.c b/keyboards/novelkeys/nk1/nk1.c new file mode 100644 index 0000000000..6833478568 --- /dev/null +++ b/keyboards/novelkeys/nk1/nk1.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Yiancar + * + * 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 "nk1.h" diff --git a/keyboards/novelkeys/nk1/nk1.h b/keyboards/novelkeys/nk1/nk1.h new file mode 100644 index 0000000000..3962e18516 --- /dev/null +++ b/keyboards/novelkeys/nk1/nk1.h @@ -0,0 +1,25 @@ +/* Copyright 2021 Yiancar + * + * 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 LAYOUT_ortho_1x1( \ + K00 \ +) { \ + { K00 } \ +} diff --git a/keyboards/novelkeys/nk1/readme.md b/keyboards/novelkeys/nk1/readme.md new file mode 100644 index 0000000000..720d03adbc --- /dev/null +++ b/keyboards/novelkeys/nk1/readme.md @@ -0,0 +1,32 @@ +# NK1 + +A big switch keypad! + +* Keyboard Maintainer: [Yiancar](https://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +* Hardware Supported: A BIG keypad with ATmega 32u4 +* Hardware Availability: https://novelkeys.xyz/ + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make novelkeys/nk1: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). + +### Reset + +- Unplug +- Hold the key +- Plug In +- Unplug +- Release the key + +### Flash + +- Unplug +- Hold the key +- Plug In +- Flash using QMK Toolbox or dfu-util (`make nk1::flash`) diff --git a/keyboards/novelkeys/nk1/rules.mk b/keyboards/novelkeys/nk1/rules.mk new file mode 100644 index 0000000000..16d3dfedd0 --- /dev/null +++ b/keyboards/novelkeys/nk1/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +LAYOUTS = ortho_1x1 diff --git a/keyboards/novelkeys/nk65/config.h b/keyboards/novelkeys/nk65/config.h new file mode 100755 index 0000000000..3268e8ebf4 --- /dev/null +++ b/keyboards/novelkeys/nk65/config.h @@ -0,0 +1,159 @@ +/* +Copyright 2019 Yiancar + +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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4E4B +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT NK65 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B3, B4, B5, A8, A4 } +#define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3, A5 } +// To enable debugger set A13 A14 -> A5 A7 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* Backlight options */ + +#define RGB_BACKLIGHT_ENABLED 1 + +#define RGB_BACKLIGHT_NK65 + +// they aren't really used if RGB_BACKLIGHT_HS60 defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 6 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 128 + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0100000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111111000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 32 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE + +/* Custom EEPROM start addressing. This is to support + * both 128kb and 256kb versions of F303. + * Register 0x1FFFF7CC holds the size of the flash memory. + */ +#ifndef FLASHSIZE_BASE +# define FLASHSIZE_BASE ((uint32_t)0x1FFFF7CCU) /*!< FLASH Size register base address */ +#endif +#define FEE_MCU_FLASH_SIZE_IGNORE_CHECK +#define FEE_MCU_FLASH_SIZE \ +({ \ + uint16_t (*flash_size) = (uint16_t*)FLASHSIZE_BASE; \ + *flash_size; \ +}) diff --git a/keyboards/novelkeys/nk65/halconf.h b/keyboards/novelkeys/nk65/halconf.h new file mode 100644 index 0000000000..e6d7e3c2ed --- /dev/null +++ b/keyboards/novelkeys/nk65/halconf.h @@ -0,0 +1,33 @@ +/* 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/nk65/halconf.h -r platforms/chibios/QMK_PROTON_C/configs/halconf.h` + */ + +#pragma once + +#define HAL_USE_PWM FALSE + +#define HAL_USE_SPI FALSE + +#define PAL_USE_CALLBACKS FALSE + +#define PAL_USE_WAIT FALSE + +#include_next + diff --git a/keyboards/novelkeys/nk65/info.json b/keyboards/novelkeys/nk65/info.json new file mode 100755 index 0000000000..3c2b438c2b --- /dev/null +++ b/keyboards/novelkeys/nk65/info.json @@ -0,0 +1,10 @@ +{ + "keyboard_name": "NK65", + "url": "", + "maintainer": "yiancar", + "layouts": { + "LAYOUT_65_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Page Up", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Page Down", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} diff --git a/keyboards/novelkeys/nk65/keymaps/default/keymap.c b/keyboards/novelkeys/nk65/keymaps/default/keymap.c new file mode 100755 index 0000000000..f0fcda4674 --- /dev/null +++ b/keyboards/novelkeys/nk65/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2019 Yiancar + * + * 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_65_ansi( /* Base */ + KC_GESC, 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_HOME, + 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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi( /* FN */ + KC_GRV, 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_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_65_ansi( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/novelkeys/nk65/keymaps/default/readme.md b/keyboards/novelkeys/nk65/keymaps/default/readme.md new file mode 100755 index 0000000000..27bcd0501d --- /dev/null +++ b/keyboards/novelkeys/nk65/keymaps/default/readme.md @@ -0,0 +1,6 @@ +The default keymap for NK65. VIA support disabled. +========================================================= + +![Layout image](https://i.imgur.com/DL0CjJO.png) + +Default layer is normal ANSI 65% \ No newline at end of file diff --git a/keyboards/novelkeys/nk65/keymaps/madhatter/keymap.c b/keyboards/novelkeys/nk65/keymaps/madhatter/keymap.c new file mode 100755 index 0000000000..e5e0fea461 --- /dev/null +++ b/keyboards/novelkeys/nk65/keymaps/madhatter/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2019 Yiancar + * + * 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 + +enum my_layers { + _QWERTY, + _FNMS +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = LAYOUT_65_ansi( /* Base */ + KC_GESC, 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_BSLS, KC_HOME,\ + 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_BSPC, 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_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FNMS), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[_FNMS] = LAYOUT_65_ansi( /* FN */ + KC_GRV, 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_DEL, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,\ + AG_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/novelkeys/nk65/keymaps/via/keymap.c b/keyboards/novelkeys/nk65/keymaps/via/keymap.c new file mode 100755 index 0000000000..f0fcda4674 --- /dev/null +++ b/keyboards/novelkeys/nk65/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2019 Yiancar + * + * 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_65_ansi( /* Base */ + KC_GESC, 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_HOME, + 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_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi( /* FN */ + KC_GRV, 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_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_65_ansi( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/novelkeys/nk65/keymaps/via/readme.md b/keyboards/novelkeys/nk65/keymaps/via/readme.md new file mode 100755 index 0000000000..6689191e4c --- /dev/null +++ b/keyboards/novelkeys/nk65/keymaps/via/readme.md @@ -0,0 +1,6 @@ +The default keymap for NK65. VIA support enabled. +========================================================= + +![Layout image](https://i.imgur.com/DL0CjJO.png) + +Default layer is normal ANSI 65% \ No newline at end of file diff --git a/keyboards/novelkeys/nk65/keymaps/via/rules.mk b/keyboards/novelkeys/nk65/keymaps/via/rules.mk new file mode 100755 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/novelkeys/nk65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/novelkeys/nk65/mcuconf.h b/keyboards/novelkeys/nk65/mcuconf.h new file mode 100644 index 0000000000..f37f37c179 --- /dev/null +++ b/keyboards/novelkeys/nk65/mcuconf.h @@ -0,0 +1,43 @@ +/* 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/nk65/mcuconf.h -r platforms/chibios/QMK_PROTON_C/configs/mcuconf.h` + */ + +#pragma once + +#include_next + +#undef STM32_GPT_USE_TIM4 +#define STM32_GPT_USE_TIM4 TRUE + +#undef STM32_GPT_USE_TIM15 +#define STM32_GPT_USE_TIM15 FALSE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 FALSE + +#undef STM32_PWM_USE_TIM4 +#define STM32_PWM_USE_TIM4 FALSE + +#undef STM32_SERIAL_USE_USART2 +#define STM32_SERIAL_USE_USART2 FALSE + +#undef STM32_SPI_USE_SPI2 +#define STM32_SPI_USE_SPI2 FALSE + diff --git a/keyboards/novelkeys/nk65/nk65.c b/keyboards/novelkeys/nk65/nk65.c new file mode 100755 index 0000000000..4ed18c114e --- /dev/null +++ b/keyboards/novelkeys/nk65/nk65.c @@ -0,0 +1,54 @@ +/* Copyright 2019 Yiancar + * + * 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 . + */ +#ifndef RGB_BACKLIGHT_NK65 +#error RGB_BACKLIGHT_NK65 not defined, recheck config.h +#endif + +#include "nk65.h" +#include "drivers/led/issi/is31fl3733.h" + +/* Indicator LEDS are part of the LED driver + * Top LED is blue only. LED driver 2 RGB 7 Green channel + * Middle LED is blue and red. LED driver 2 RGB 6 Red and Blue channel + * Bottom LED is red only LED driver 2 RGB 6 Green channel. + */ +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + if (led_state.caps_lock) { + IS31FL3733_set_color( 7+64-1, 0, 255, 0 ); + } else { + IS31FL3733_set_color( 7+64-1, 0, 0, 0 ); + } + } + return res; +} + +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t R = 0; + uint8_t G = 0; + uint8_t B = 0; + if (state & (1UL << 1)) { + R = 255; + B = 255; + } + if (state & (1UL << 2)) { + G = 255; + } + + IS31FL3733_set_color( 6+64-1, R, G, B ); + return state; +} diff --git a/keyboards/novelkeys/nk65/nk65.h b/keyboards/novelkeys/nk65/nk65.h new file mode 100755 index 0000000000..35aca2a64c --- /dev/null +++ b/keyboards/novelkeys/nk65/nk65.h @@ -0,0 +1,38 @@ +/* Copyright 2019 Yiancar + * + * 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 XXX KC_NO + +#include "quantum.h" +#include "../wilba_tech/wt_rgb_backlight_keycodes.h" +#include "via.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_65_ansi( \ + 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, K2C, 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, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { 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, XXX, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, K49, K4A, K4B, K4C, K4D, K4E } \ +} diff --git a/keyboards/novelkeys/nk65/readme.md b/keyboards/novelkeys/nk65/readme.md new file mode 100755 index 0000000000..38f66500b9 --- /dev/null +++ b/keyboards/novelkeys/nk65/readme.md @@ -0,0 +1,39 @@ +NK65 +========= + +![NK65](https://i.imgur.com/EXNbVpL.jpg) + +This is a standard fixed layout 65% PCB. It supports VIA and full per-key RGB. + +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +Hardware Supported: A 65% keyboard with STM32F303CC +Hardware Availability: https://novelkeys.xyz/ + +Due to the RGB implementation, the NK65 is currently not compatible with community layouts. + +NOTE: For PCBs with revision v1.4 or later please use nk65/v1_4 in the make command. + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make novelkeys/nk65:via + +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). + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or dfu-util (`make nk65::dfu-util`) diff --git a/keyboards/novelkeys/nk65/rules.mk b/keyboards/novelkeys/nk65/rules.mk new file mode 100755 index 0000000000..d64ce8e1f6 --- /dev/null +++ b/keyboards/novelkeys/nk65/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = STM32F303 +BOARD = QMK_PROTON_C + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change yes to no to disable +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +AUDIO_ENABLE = no # Audio output +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +CIE1931_CURVE = yes + +LAYOUTS = 65_ansi + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + drivers/led/issi/is31fl3733.c \ + quantum/color.c \ + i2c_master.c diff --git a/keyboards/novelkeys/nk65/v1_4/config.h b/keyboards/novelkeys/nk65/v1_4/config.h new file mode 100755 index 0000000000..88629e5c99 --- /dev/null +++ b/keyboards/novelkeys/nk65/v1_4/config.h @@ -0,0 +1,22 @@ +/* +Copyright 2021 Yiancar + +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 + +#undef MATRIX_COL_PINS +#define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, B1, B0, A7, A0, A1, A2, A3, A5 } +// To enable debugger set A13 A14 -> A5 A7 diff --git a/keyboards/novelkeys/nk65/v1_4/readme.md b/keyboards/novelkeys/nk65/v1_4/readme.md new file mode 100755 index 0000000000..399919a8be --- /dev/null +++ b/keyboards/novelkeys/nk65/v1_4/readme.md @@ -0,0 +1,39 @@ +NK65 V1.4 +========= + +![NK65](https://i.imgur.com/EXNbVpL.jpg) + +NOTE: Please use this directory only if you have revision 1.4 PCB or later. + +This is a standard fixed layout 65% PCB. It supports VIA and full per-key RGB. + +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +Hardware Supported: A 65% keyboard with STM32F303CC +Hardware Availability: https://novelkeys.xyz/ + +Due to the RGB implementation, the NK65 is currently not compatible with community layouts. + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make nk65/v1_4:via + +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). + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or dfu-util (`make nk65/v1_4::dfu-util`) diff --git a/keyboards/novelkeys/nk65/v1_4/rules.mk b/keyboards/novelkeys/nk65/v1_4/rules.mk new file mode 100755 index 0000000000..8b13789179 --- /dev/null +++ b/keyboards/novelkeys/nk65/v1_4/rules.mk @@ -0,0 +1 @@ + diff --git a/keyboards/novelkeys/nk87/config.h b/keyboards/novelkeys/nk87/config.h new file mode 100755 index 0000000000..091d80efb8 --- /dev/null +++ b/keyboards/novelkeys/nk87/config.h @@ -0,0 +1,146 @@ +/* +Copyright 2020 Yiancar + +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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4E4C +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT NK87 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +#define MATRIX_ROW_PINS { A7, B3, B4, B5, A8, A4 } +#define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, B2, B0, A6, A0, A1, A2, A3, A5, B1, B10 } +// To enable debugger set A13 A14 -> A5 A7 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* Backlight options */ + +#define RGB_BACKLIGHT_ENABLED 1 + +#define RGB_BACKLIGHT_NK87 + +// they aren't really used if RGB_BACKLIGHT_HS60 defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 6 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 128 + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +// Rows are shifted one down, F-row cannot be dynamically modified at the moment. +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b1110000000000000 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b1100000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b1001000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b1111100000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +// Backlight config starts after VIA's EEPROM usage, +// dynamic keymaps start after this. +#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 32 + +// VIA lighting is handled by the keyboard-level code +#define VIA_CUSTOM_LIGHTING_ENABLE diff --git a/keyboards/novelkeys/nk87/halconf.h b/keyboards/novelkeys/nk87/halconf.h new file mode 100644 index 0000000000..fb0c214264 --- /dev/null +++ b/keyboards/novelkeys/nk87/halconf.h @@ -0,0 +1,33 @@ +/* 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/nk87/halconf.h -r platforms/chibios/QMK_PROTON_C/configs/halconf.h` + */ + +#pragma once + +#define HAL_USE_PWM FALSE + +#define HAL_USE_SPI FALSE + +#define PAL_USE_CALLBACKS FALSE + +#define PAL_USE_WAIT FALSE + +#include_next + diff --git a/keyboards/novelkeys/nk87/info.json b/keyboards/novelkeys/nk87/info.json new file mode 100755 index 0000000000..5603ffd52b --- /dev/null +++ b/keyboards/novelkeys/nk87/info.json @@ -0,0 +1,10 @@ +{ + "keyboard_name": "NK87", + "url": "www.yiancar-designs.com", + "maintainer": "Yiancar", + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":1.25, "y":0}, {"label":"0,2", "x":2.25, "y":0}, {"label":"0,3", "x":3.25, "y":0}, {"label":"0,4", "x":4.25, "y":0}, {"label":"0,5", "x":5.5, "y":0}, {"label":"0,6", "x":6.5, "y":0}, {"label":"0,7", "x":7.5, "y":0}, {"label":"0,8", "x":8.5, "y":0}, {"label":"0,9", "x":9.75, "y":0}, {"label":"0,10", "x":10.75, "y":0}, {"label":"0,12", "x":11.75, "y":0}, {"label":"0,12", "x":12.75, "y":0}, {"label":"0,13", "x":14, "y":0}, {"label":"0,14", "x":15.25, "y":0}, {"label":"0,15", "x":16.25, "y":0}, {"label":"0,16", "x":17.25, "y":0}, {"label":"1,0", "x":0, "y":1.25}, {"label":"1,1", "x":1, "y":1.25}, {"label":"1,2", "x":2, "y":1.25}, {"label":"1,3", "x":3, "y":1.25}, {"label":"1,4", "x":4, "y":1.25}, {"label":"1,5", "x":5, "y":1.25}, {"label":"1,6", "x":6, "y":1.25}, {"label":"1,7", "x":7, "y":1.25}, {"label":"1,8", "x":8, "y":1.25}, {"label":"1,9", "x":9, "y":1.25}, {"label":"1,10", "x":10, "y":1.25}, {"label":"1,11", "x":11, "y":1.25}, {"label":"1,12", "x":12, "y":1.25}, {"label":"1,13", "x":13, "y":1.25, "w":2}, {"label":"1,14", "x":15.25, "y":1.25}, {"label":"1,15", "x":16.25, "y":1.25}, {"label":"1,16", "x":17.25, "y":1.25}, {"label":"2,0", "x":0, "y":2.25, "w":1.5}, {"label":"2,1", "x":1.5, "y":2.25}, {"label":"2,2", "x":2.5, "y":2.25}, {"label":"2,3", "x":3.5, "y":2.25}, {"label":"2,4", "x":4.5, "y":2.25}, {"label":"2,5", "x":5.5, "y":2.25}, {"label":"2,6", "x":6.5, "y":2.25}, {"label":"2,7", "x":7.5, "y":2.25}, {"label":"2,8", "x":8.5, "y":2.25}, {"label":"2,9", "x":9.5, "y":2.25}, {"label":"2,10", "x":10.5, "y":2.25}, {"label":"2,11", "x":11.5, "y":2.25}, {"label":"2,12", "x":12.5, "y":2.25}, {"label":"3,12", "x":13.5, "y":2.25, "w":1.5}, {"label":"2,14", "x":15.25, "y":2.25}, {"label":"2,15", "x":16.25, "y":2.25}, {"label":"2,16", "x":17.25, "y":2.25}, {"label":"3,0", "x":0, "y":3.25, "w":1.75}, {"label":"3,1", "x":1.75, "y":3.25}, {"label":"3,2", "x":2.75, "y":3.25}, {"label":"3,3", "x":3.75, "y":3.25}, {"label":"3,4", "x":4.75, "y":3.25}, {"label":"3,5", "x":5.75, "y":3.25}, {"label":"3,6", "x":6.75, "y":3.25}, {"label":"3,7", "x":7.75, "y":3.25}, {"label":"3,8", "x":8.75, "y":3.25}, {"label":"3,9", "x":9.75, "y":3.25}, {"label":"3,10", "x":10.75, "y":3.25}, {"label":"3,11", "x":11.75, "y":3.25}, {"label":"3,13", "x":12.75, "y":3.25, "w":2.25}, {"label":"4,0", "x":0, "y":4.25, "w":2.25}, {"label":"4,2", "x":2.25, "y":4.25}, {"label":"4,3", "x":3.25, "y":4.25}, {"label":"4,4", "x":4.25, "y":4.25}, {"label":"4,5", "x":5.25, "y":4.25}, {"label":"4,6", "x":6.25, "y":4.25}, {"label":"4,7", "x":7.25, "y":4.25}, {"label":"4,8", "x":8.25, "y":4.25}, {"label":"4,9", "x":9.25, "y":4.25}, {"label":"4,10", "x":10.25, "y":4.25}, {"label":"4,11", "x":11.25, "y":4.25}, {"label":"4,12", "x":12.25, "y":4.25, "w":2.75}, {"label":"4,15", "x":16.25, "y":4.25}, {"label":"5,0", "x":0, "y":5.25, "w":1.5}, {"label":"5,1", "x":1.5, "y":5.25}, {"label":"5,2", "x":2.5, "y":5.25, "w":1.5}, {"label":"5,6", "x":4, "y":5.25, "w":7}, {"label":"5,11", "x":11, "y":5.25, "w":1.5}, {"label":"5,12", "x":12.5, "y":5.25}, {"label":"5,13", "x":13.5, "y":5.25, "w":1.5}, {"label":"5,14", "x":15.25, "y":5.25}, {"label":"5,15", "x":16.25, "y":5.25}, {"label":"5,16", "x":17.25, "y":5.25}] + } + } +} diff --git a/keyboards/novelkeys/nk87/keymaps/default/keymap.c b/keyboards/novelkeys/nk87/keymaps/default/keymap.c new file mode 100755 index 0000000000..f5387d48de --- /dev/null +++ b/keyboards/novelkeys/nk87/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 Yiancar + * + * 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( /* Base */ + 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_F13, KC_PSCR, KC_SLCK, 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_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, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_all( /* FN */ + KC_TRNS, KC_TRNS, KC_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_VOLD, 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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, 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/novelkeys/nk87/keymaps/default/readme.md b/keyboards/novelkeys/nk87/keymaps/default/readme.md new file mode 100755 index 0000000000..c0ca436184 --- /dev/null +++ b/keyboards/novelkeys/nk87/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default keymap for NK87 + +![Layer 0](https://i.imgur.com/nw29fvc.png) +Fn Layer: +![Layer 1](https://i.imgur.com/SyijLFt.png) + +Default layer is normal ANSI TKL diff --git a/keyboards/novelkeys/nk87/keymaps/via/keymap.c b/keyboards/novelkeys/nk87/keymaps/via/keymap.c new file mode 100755 index 0000000000..f8ada46952 --- /dev/null +++ b/keyboards/novelkeys/nk87/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 Yiancar + * + * 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( /* Base */ + 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_F13, KC_PSCR, KC_SLCK, 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_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, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_all( /* FN */ + KC_TRNS, KC_TRNS, KC_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_VOLD, 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_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_all( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/novelkeys/nk87/keymaps/via/readme.md b/keyboards/novelkeys/nk87/keymaps/via/readme.md new file mode 100755 index 0000000000..90253575e7 --- /dev/null +++ b/keyboards/novelkeys/nk87/keymaps/via/readme.md @@ -0,0 +1,7 @@ +# The default VIA keymap for NK87 + +![Layer 0](https://i.imgur.com/nw29fvc.png) +Fn Layer: +![Layer 1](https://i.imgur.com/SyijLFt.png) + +Default layer is normal ANSI TKL diff --git a/keyboards/novelkeys/nk87/keymaps/via/rules.mk b/keyboards/novelkeys/nk87/keymaps/via/rules.mk new file mode 100755 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/novelkeys/nk87/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/novelkeys/nk87/mcuconf.h b/keyboards/novelkeys/nk87/mcuconf.h new file mode 100644 index 0000000000..1aa2fb55b4 --- /dev/null +++ b/keyboards/novelkeys/nk87/mcuconf.h @@ -0,0 +1,43 @@ +/* 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/nk87/mcuconf.h -r platforms/chibios/QMK_PROTON_C/configs/mcuconf.h` + */ + +#pragma once + +#include_next + +#undef STM32_GPT_USE_TIM4 +#define STM32_GPT_USE_TIM4 TRUE + +#undef STM32_GPT_USE_TIM15 +#define STM32_GPT_USE_TIM15 FALSE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 FALSE + +#undef STM32_PWM_USE_TIM4 +#define STM32_PWM_USE_TIM4 FALSE + +#undef STM32_SERIAL_USE_USART2 +#define STM32_SERIAL_USE_USART2 FALSE + +#undef STM32_SPI_USE_SPI2 +#define STM32_SPI_USE_SPI2 FALSE + diff --git a/keyboards/novelkeys/nk87/nk87.c b/keyboards/novelkeys/nk87/nk87.c new file mode 100755 index 0000000000..c90ba02ea4 --- /dev/null +++ b/keyboards/novelkeys/nk87/nk87.c @@ -0,0 +1,58 @@ +/* Copyright 2020 Yiancar + * + * 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 . + */ +#ifndef RGB_BACKLIGHT_NK87 +#error RGB_BACKLIGHT_NK87 not defined, recheck config.h +#endif + +#include "nk87.h" +#include "drivers/led/issi/is31fl3733.h" + +/* Indicator LEDS are part of the LED driver + * Top LED is blue only. LED driver 2 RGB 63 Blue channel + * Middle LED is blue and red. LED driver 2 RGB 63 Red and Green channel + * Bottom LED is red only LED driver 2 RGB 48 Blue channel. + */ +uint8_t CAPS = 0; +uint8_t FN1 = 0; +uint8_t FN2 = 0; + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + if (led_state.caps_lock) { + CAPS = 255; + } else { + CAPS = 0; + } + } + IS31FL3733_set_color( 63+64-1, FN1, FN1, CAPS ); + IS31FL3733_set_color( 48+64-1, 0, 0, FN2 ); + return res; +} + +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { + if (state & (1UL << 1)) { + FN1 = 255; + } else { + FN1 = 0; + } + if (state & (1UL << 2)) { + FN2 = 255; + } else { + FN2 = 0; + } + return state; +} diff --git a/keyboards/novelkeys/nk87/nk87.h b/keyboards/novelkeys/nk87/nk87.h new file mode 100755 index 0000000000..d17b1fb4a0 --- /dev/null +++ b/keyboards/novelkeys/nk87/nk87.h @@ -0,0 +1,40 @@ +/* Copyright 2020 Yiancar + * + * 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 XXX KC_NO + +#include "quantum.h" +#include "../wilba_tech/wt_rgb_backlight_keycodes.h" +#include "via.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K3C, K2E, K2F, K2G, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4F, \ + K50, K51, K52, K56, K5B, K5C, K5D, K5E, K5F, K5G \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX, K2E, K2F, K2G }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, XXX, XXX, XXX }, \ + { K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, XXX, XXX, K4F, XXX }, \ + { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, XXX, K5B, K5C, K5D, K5E, K5F, K5G } \ +} diff --git a/keyboards/novelkeys/nk87/readme.md b/keyboards/novelkeys/nk87/readme.md new file mode 100755 index 0000000000..0de3e08b40 --- /dev/null +++ b/keyboards/novelkeys/nk87/readme.md @@ -0,0 +1,34 @@ +# NK87 + +![NK87](https://i.imgur.com/nw29fvc.png) + +This is a standard fixed layout TKL PCB. It supports VIA and full per-key RGB. + +* Keyboard Maintainer: [Yiancar](https://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar) +* Hardware Supported: A TKL keyboard with STM32F303CC +* Hardware Availability: https://novelkeys.xyz/ + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make novelkeys/nk87: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). + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or dfu-util (`make nk87::dfu-util`) diff --git a/keyboards/novelkeys/nk87/rules.mk b/keyboards/novelkeys/nk87/rules.mk new file mode 100755 index 0000000000..fb3055a2a8 --- /dev/null +++ b/keyboards/novelkeys/nk87/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = STM32F303 +BOARD = QMK_PROTON_C + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +CIE1931_CURVE = yes + +# project specific files +SRC = keyboards/wilba_tech/wt_main.c \ + keyboards/wilba_tech/wt_rgb_backlight.c \ + drivers/led/issi/is31fl3733.c \ + quantum/color.c \ + i2c_master.c diff --git a/keyboards/novelkeys/novelpad/config.h b/keyboards/novelkeys/novelpad/config.h new file mode 100755 index 0000000000..a7947220ff --- /dev/null +++ b/keyboards/novelkeys/novelpad/config.h @@ -0,0 +1,144 @@ +/* +Copyright 2018 Cole Markham + +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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6070 +#define DEVICE_VER 0x0001 +#define MANUFACTURER NovelKeys.xyz +#define PRODUCT Novelpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C2, C4, C5, C6, C7 } +#define MATRIX_COL_PINS { D7, D6, D5, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +//#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 10 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 4 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * 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 + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/novelkeys/novelpad/info.json b/keyboards/novelkeys/novelpad/info.json new file mode 100644 index 0000000000..ed4a31236d --- /dev/null +++ b/keyboards/novelkeys/novelpad/info.json @@ -0,0 +1,35 @@ +{ + "keyboard_name": "NovelPad", + "url": "", + "maintainer": "qmk", + "layouts": { + "LAYOUT_ortho_5x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4} + ] + } + } +} diff --git a/keyboards/novelkeys/novelpad/keymaps/0xdec/keymap.c b/keyboards/novelkeys/novelpad/keymaps/0xdec/keymap.c new file mode 100755 index 0000000000..bb8c977c92 --- /dev/null +++ b/keyboards/novelkeys/novelpad/keymaps/0xdec/keymap.c @@ -0,0 +1,46 @@ +/* +Copyright 2018 Jordi Pakey-Rodriguez + +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( + LT(1, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_P1, KC_P2, KC_P3, KC_TAB, + KC_PCMM, KC_P0, KC_PDOT, KC_PENT + ), + + [1] = LAYOUT( + _______, RESET, BL_STEP, RGB_TOG, + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, + RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, + RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, + RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G + ), + +}; + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + // Illuminate the LED under the Num Lock key + rgblight_sethsv_at(0, 0, 127, 1); + } else { + rgblight_sethsv_at(0, 0, 0, 1); + } +} diff --git a/keyboards/novelkeys/novelpad/keymaps/default/keymap.c b/keyboards/novelkeys/novelpad/keymaps/default/keymap.c new file mode 100755 index 0000000000..cbac67eaaa --- /dev/null +++ b/keyboards/novelkeys/novelpad/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +/* +Copyright 2018 Cole Markham + +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 + +enum custom_keycodes { + WK_RED = SAFE_RANGE, + WK_GREEN, + WK_BLUE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_NLCK, KC_PSLS, KC_PAST, KC_ESC, + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_TAB, + MO(1), KC_P0, KC_PDOT, KC_ENT + ), + + [1] = LAYOUT( + _______, BL_STEP, RGB_M_SW, RESET, + RGB_TOG, RGB_MOD, RGB_M_P, RGB_M_SN, + RGB_HUI, RGB_SAI, RGB_VAI, RGB_M_K, + RGB_HUD, RGB_SAD, RGB_VAD, RGB_M_X, + _______, WK_RED, WK_GREEN, WK_BLUE + ) +}; + +void keyboard_post_init_user(void) { + rgblight_setrgb(0, 255, 0); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case WK_RED: + if (record->event.pressed) { + rgblight_show_solid_color(0xFF, 0x00, 0x00); + } else { + rgblight_show_solid_color(0xFF, 0xFF, 0xFF); + } + return false; + case WK_GREEN: + if (record->event.pressed) { + rgblight_show_solid_color(0x00, 0xFF, 0x00); + } else { + rgblight_show_solid_color(0xFF, 0xFF, 0xFF); + } + return false; + case WK_BLUE: + if (record->event.pressed) { + rgblight_show_solid_color(0x00, 0x00, 0xFF); + } else { + rgblight_show_solid_color(0xFF, 0xFF, 0xFF); + } + return false; + } + return true; +} diff --git a/keyboards/novelkeys/novelpad/novelpad.c b/keyboards/novelkeys/novelpad/novelpad.c new file mode 100755 index 0000000000..9f6ee7dae4 --- /dev/null +++ b/keyboards/novelkeys/novelpad/novelpad.c @@ -0,0 +1,18 @@ +/* +Copyright 2018 Cole Markham + +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 "novelpad.h" diff --git a/keyboards/novelkeys/novelpad/novelpad.h b/keyboards/novelkeys/novelpad/novelpad.h new file mode 100755 index 0000000000..6650a67223 --- /dev/null +++ b/keyboards/novelkeys/novelpad/novelpad.h @@ -0,0 +1,36 @@ +/* +Copyright 2018 Cole Markham + +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 LAYOUT_ortho_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ +} + +#define LAYOUT LAYOUT_ortho_5x4 diff --git a/keyboards/novelkeys/novelpad/readme.md b/keyboards/novelkeys/novelpad/readme.md new file mode 100644 index 0000000000..49773b8dc0 --- /dev/null +++ b/keyboards/novelkeys/novelpad/readme.md @@ -0,0 +1,15 @@ +# NovelPad/NumChoc + +![NovelPad](https://i.imgur.com/vi4EdSh.jpg?1) + +A 5x4 macropad/numpad, sold by NovelKeys.xyz. There are two versions of the PCB, the NovelPad for MX switches and the NumChoc for Kailh Choc low profile switches. Both utilize the same firmware with no changes required. + +Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) / [Woodkeys.click](https://woodkeys.click) +Hardware Supported: NovelPad +Hardware Availability: [Novelkeys.xyz](https://novelkeys.xyz) + +Make example for this keyboard (after setting up your build environment): + + make novelkeys/novelpad: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). diff --git a/keyboards/novelkeys/novelpad/rules.mk b/keyboards/novelkeys/novelpad/rules.mk new file mode 100755 index 0000000000..ecdb295257 --- /dev/null +++ b/keyboards/novelkeys/novelpad/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = yes # In-switch LEDs +AUDIO_ENABLE = no # There is no available timer or pin for audio on the NovelPad +RGBLIGHT_ENABLE = yes # RGB LEDs for underglow, installed and enabled by default for the NovelPad + +LAYOUTS = ortho_5x4 -- cgit v1.2.3