diff options
| author | NightlyBoards <65656486+NightlyBoards@users.noreply.github.com> | 2021-08-14 03:32:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-13 12:32:33 -0700 |
| commit | 504d443ee3feb69e7d3a2d65d4b60d21f86dea61 (patch) | |
| tree | 649cff1e7b1fe082883ef8dbd754d072013085a1 | |
| parent | 0f0ebde0aa51b2d9bd9a817c0c6c2c5ef53e16e9 (diff) | |
| download | qmk_firmware-504d443ee3feb69e7d3a2d65d4b60d21f86dea61.tar.gz qmk_firmware-504d443ee3feb69e7d3a2d65d4b60d21f86dea61.zip | |
[Keyboard] Add n9 macropad (#13168)
| -rw-r--r-- | keyboards/nightly_boards/n9/config.h | 93 | ||||
| -rw-r--r-- | keyboards/nightly_boards/n9/info.json | 23 | ||||
| -rw-r--r-- | keyboards/nightly_boards/n9/keymaps/default/keymap.c | 24 | ||||
| -rw-r--r-- | keyboards/nightly_boards/n9/keymaps/via/keymap.c | 39 | ||||
| -rw-r--r-- | keyboards/nightly_boards/n9/keymaps/via/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/nightly_boards/n9/n9.c | 18 | ||||
| -rw-r--r-- | keyboards/nightly_boards/n9/n9.h | 29 | ||||
| -rw-r--r-- | keyboards/nightly_boards/n9/readme.md | 18 | ||||
| -rw-r--r-- | keyboards/nightly_boards/n9/rules.mk | 21 |
9 files changed, 267 insertions, 0 deletions
diff --git a/keyboards/nightly_boards/n9/config.h b/keyboards/nightly_boards/n9/config.h new file mode 100644 index 000000000..b8b29099c --- /dev/null +++ b/keyboards/nightly_boards/n9/config.h | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Neil Brian Ramirez | ||
| 3 | This program is free software: you can redistribute it and/or modify | ||
| 4 | it under the terms of the GNU General Public License as published by | ||
| 5 | the Free Software Foundation, either version 2 of the License, or | ||
| 6 | (at your option) any later version. | ||
| 7 | This program is distributed in the hope that it will be useful, | ||
| 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 10 | GNU General Public License for more details. | ||
| 11 | You should have received a copy of the GNU General Public License | ||
| 12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #pragma once | ||
| 16 | |||
| 17 | #include "config_common.h" | ||
| 18 | |||
| 19 | /* USB Device descriptor parameter */ | ||
| 20 | #define VENDOR_ID 0xD812 | ||
| 21 | #define PRODUCT_ID 0x0012 | ||
| 22 | #define DEVICE_VER 0x0001 | ||
| 23 | #define MANUFACTURER Neil Brian Ramirez | ||
| 24 | #define PRODUCT [n]9 | ||
| 25 | |||
| 26 | /* key matrix size */ | ||
| 27 | #define MATRIX_ROWS 3 | ||
| 28 | #define MATRIX_COLS 3 | ||
| 29 | |||
| 30 | /* | ||
| 31 | * Keyboard Matrix Assignments | ||
| 32 | * | ||
| 33 | * Change this to how you wired your keyboard | ||
| 34 | * COLS: AVR pins used for columns, left to right | ||
| 35 | * ROWS: AVR pins used for rows, top to bottom | ||
| 36 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 37 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 38 | * | ||
| 39 | */ | ||
| 40 | #define MATRIX_ROW_PINS { F4, B1, B3 } | ||
| 41 | #define MATRIX_COL_PINS { F6, F7, D4 } | ||
| 42 | #define UNUSED_PINS | ||
| 43 | |||
| 44 | /* COL2ROW, ROW2COL*/ | ||
| 45 | #define DIODE_DIRECTION COL2ROW | ||
| 46 | |||
| 47 | // #define BACKLIGHT_PIN F1 | ||
| 48 | // #define BACKLIGHT_BREATHING | ||
| 49 | // #define BACKLIGHT_LEVELS 3 | ||
| 50 | |||
| 51 | #define RGB_DI_PIN F5 | ||
| 52 | #ifdef RGB_DI_PIN | ||
| 53 | #define RGBLED_NUM 8 | ||
| 54 | #define RGBLIGHT_HUE_STEP 8 | ||
| 55 | #define RGBLIGHT_SAT_STEP 8 | ||
| 56 | #define RGBLIGHT_VAL_STEP 8 | ||
| 57 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 58 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 59 | // /*== all animations enable ==*/ | ||
| 60 | #define RGBLIGHT_ANIMATIONS | ||
| 61 | // /*== or choose animations ==*/ | ||
| 62 | // #define RGBLIGHT_EFFECT_BREATHING | ||
| 63 | // #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 64 | // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 65 | // #define RGBLIGHT_EFFECT_SNAKE | ||
| 66 | // #define RGBLIGHT_EFFECT_KNIGHT | ||
| 67 | // #define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 68 | // #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 69 | // #define RGBLIGHT_EFFECT_RGB_TEST | ||
| 70 | // #define RGBLIGHT_EFFECT_ALTERNATING | ||
| 71 | // /*== customize breathing effect ==*/ | ||
| 72 | // /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
| 73 | // #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
| 74 | // /*==== use exp() and sin() ====*/ | ||
| 75 | // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
| 76 | // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
| 77 | #endif | ||
| 78 | |||
| 79 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 80 | #define DEBOUNCE 5 | ||
| 81 | |||
| 82 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 83 | //#define MATRIX_HAS_GHOST | ||
| 84 | |||
| 85 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 86 | #define LOCKING_SUPPORT_ENABLE | ||
| 87 | /* Locking resynchronize hack */ | ||
| 88 | #define LOCKING_RESYNC_ENABLE | ||
| 89 | |||
| 90 | |||
| 91 | /* disable these deprecated features by default */ | ||
| 92 | #define NO_ACTION_MACRO | ||
| 93 | #define NO_ACTION_FUNCTION | ||
diff --git a/keyboards/nightly_boards/n9/info.json b/keyboards/nightly_boards/n9/info.json new file mode 100644 index 000000000..aeba1a2b1 --- /dev/null +++ b/keyboards/nightly_boards/n9/info.json | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "[n]9", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "Neil Brian Ramirez", | ||
| 5 | "width": 3, | ||
| 6 | "height": 3, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"x":0, "y":0}, | ||
| 11 | {"x":1, "y":0}, | ||
| 12 | {"x":2, "y":0}, | ||
| 13 | |||
| 14 | {"x":0, "y":1}, | ||
| 15 | {"x":1, "y":1}, | ||
| 16 | {"x":2, "y":1}, | ||
| 17 | |||
| 18 | {"x":0, "y":2}, | ||
| 19 | {"x":1, "y":2}, | ||
| 20 | {"x":2, "y":2}] | ||
| 21 | } | ||
| 22 | } | ||
| 23 | } | ||
diff --git a/keyboards/nightly_boards/n9/keymaps/default/keymap.c b/keyboards/nightly_boards/n9/keymaps/default/keymap.c new file mode 100644 index 000000000..8687c0be9 --- /dev/null +++ b/keyboards/nightly_boards/n9/keymaps/default/keymap.c | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* Copyright 2020 Neil Brian Ramirez | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | [0] = LAYOUT( | ||
| 20 | KC_1, KC_2, KC_3, | ||
| 21 | KC_4, KC_5, KC_6, | ||
| 22 | KC_7, KC_8, KC_9 | ||
| 23 | ), | ||
| 24 | }; | ||
diff --git a/keyboards/nightly_boards/n9/keymaps/via/keymap.c b/keyboards/nightly_boards/n9/keymaps/via/keymap.c new file mode 100644 index 000000000..34c4cc26c --- /dev/null +++ b/keyboards/nightly_boards/n9/keymaps/via/keymap.c | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | /* Copyright 2020 Neil Brian Ramirez | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 19 | [0] = LAYOUT( | ||
| 20 | KC_1, KC_2, KC_3, | ||
| 21 | KC_4, KC_5, KC_6, | ||
| 22 | KC_7, KC_8, KC_9 | ||
| 23 | ), | ||
| 24 | [1] = LAYOUT( | ||
| 25 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 26 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 27 | KC_TRNS, KC_TRNS, KC_TRNS | ||
| 28 | ), | ||
| 29 | [2] = LAYOUT( | ||
| 30 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 31 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 32 | KC_TRNS, KC_TRNS, KC_TRNS | ||
| 33 | ), | ||
| 34 | [3] = LAYOUT( | ||
| 35 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 36 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 37 | KC_TRNS, KC_TRNS, KC_TRNS | ||
| 38 | ), | ||
| 39 | }; | ||
diff --git a/keyboards/nightly_boards/n9/keymaps/via/rules.mk b/keyboards/nightly_boards/n9/keymaps/via/rules.mk new file mode 100644 index 000000000..43061db1d --- /dev/null +++ b/keyboards/nightly_boards/n9/keymaps/via/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/nightly_boards/n9/n9.c b/keyboards/nightly_boards/n9/n9.c new file mode 100644 index 000000000..e6b736aa8 --- /dev/null +++ b/keyboards/nightly_boards/n9/n9.c | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | /* Copyright 2020 Neil Brian Ramirez | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "n9.h" | ||
| 18 | |||
diff --git a/keyboards/nightly_boards/n9/n9.h b/keyboards/nightly_boards/n9/n9.h new file mode 100644 index 000000000..6b0dbdc2e --- /dev/null +++ b/keyboards/nightly_boards/n9/n9.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /* Copyright 2020 Neil Brian Ramirez | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include "quantum.h" | ||
| 20 | |||
| 21 | #define LAYOUT( \ | ||
| 22 | K00, K01, K02, \ | ||
| 23 | K10, K11, K12, \ | ||
| 24 | K20, K21, K22 \ | ||
| 25 | ) { \ | ||
| 26 | { K00, K01, K02 }, \ | ||
| 27 | { K10, K11, K12 }, \ | ||
| 28 | { K20, K21, K22 }, \ | ||
| 29 | } | ||
diff --git a/keyboards/nightly_boards/n9/readme.md b/keyboards/nightly_boards/n9/readme.md new file mode 100644 index 000000000..3bf202439 --- /dev/null +++ b/keyboards/nightly_boards/n9/readme.md | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | # [n]9 | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A 9-key pcb powered by a pro-micro | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [Neil Brian Ramirez](https://github.com/NightlyBoards) | ||
| 8 | * Hardware Supported: atmega32u4 | ||
| 9 | |||
| 10 | Make example for this keyboard (after setting up your build environment): | ||
| 11 | |||
| 12 | make nightly_boards/n9:default | ||
| 13 | |||
| 14 | Flashing example for this keyboard: | ||
| 15 | |||
| 16 | make nightly_boards/n9:default:flash | ||
| 17 | |||
| 18 | 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/nightly_boards/n9/rules.mk b/keyboards/nightly_boards/n9/rules.mk new file mode 100644 index 000000000..39b3797a0 --- /dev/null +++ b/keyboards/nightly_boards/n9/rules.mk | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
