aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNightlyBoards <65656486+NightlyBoards@users.noreply.github.com>2020-07-31 00:44:29 +0800
committerGitHub <noreply@github.com>2020-07-30 17:44:29 +0100
commit83c12a516b3d0c1b603bce28a55bdeba476311df (patch)
tree8fc68a925417adc75ad69f2086afb2952b458c9b
parent08f31f664a9011aa28f8da3de300db475ce3aba7 (diff)
downloadqmk_firmware-83c12a516b3d0c1b603bce28a55bdeba476311df.tar.gz
qmk_firmware-83c12a516b3d0c1b603bce28a55bdeba476311df.zip
[keyboard] Add [n]2 support (#9862)
* Create Alter folder * Revert "Create Alter folder" This reverts commit 361103b821dbb22957b66cdedb0d11f996def71c. * Add n2 keyboard * Apply suggestions from code review Edited config.h, keymap.c, readme.md, and rules.mk Co-authored-by: Ryan <fauxpark@gmail.com> * Update readme.md Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--keyboards/nightly_boards/n2/config.h93
-rw-r--r--keyboards/nightly_boards/n2/info.json12
-rw-r--r--keyboards/nightly_boards/n2/keymaps/default/keymap.c23
-rw-r--r--keyboards/nightly_boards/n2/n2.c18
-rw-r--r--keyboards/nightly_boards/n2/n2.h27
-rw-r--r--keyboards/nightly_boards/n2/readme.md18
-rw-r--r--keyboards/nightly_boards/n2/rules.mk22
7 files changed, 213 insertions, 0 deletions
diff --git a/keyboards/nightly_boards/n2/config.h b/keyboards/nightly_boards/n2/config.h
new file mode 100644
index 000000000..5ffa15f08
--- /dev/null
+++ b/keyboards/nightly_boards/n2/config.h
@@ -0,0 +1,93 @@
1/*
2Copyright 2020 Neil Brian Ramirez
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7This program is distributed in the hope that it will be useful,
8but WITHOUT ANY WARRANTY; without even the implied warranty of
9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10GNU General Public License for more details.
11You should have received a copy of the GNU General Public License
12along 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 0x0717
21#define PRODUCT_ID 0x0003
22#define DEVICE_VER 0x0001
23#define MANUFACTURER Neil Brian Ramirez
24#define PRODUCT [n]2
25
26/* key matrix size */
27#define MATRIX_ROWS 2
28#define MATRIX_COLS 2
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 { F1, C7 }
41#define MATRIX_COL_PINS { F0, C6 }
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 D4
52#ifdef RGB_DI_PIN
53#define RGBLED_NUM 2
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/n2/info.json b/keyboards/nightly_boards/n2/info.json
new file mode 100644
index 000000000..fe2faa8c7
--- /dev/null
+++ b/keyboards/nightly_boards/n2/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name": "[n]2",
3 "url": "",
4 "maintainer": "Neil Brian Ramirez",
5 "width": 1,
6 "height": 2,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [{"x":0, "y":0}, {"x":0, "y":1}]
10 }
11 }
12}
diff --git a/keyboards/nightly_boards/n2/keymaps/default/keymap.c b/keyboards/nightly_boards/n2/keymaps/default/keymap.c
new file mode 100644
index 000000000..ec60b19a6
--- /dev/null
+++ b/keyboards/nightly_boards/n2/keymaps/default/keymap.c
@@ -0,0 +1,23 @@
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
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT(
20 KC_L,
21 KC_O
22 )
23};
diff --git a/keyboards/nightly_boards/n2/n2.c b/keyboards/nightly_boards/n2/n2.c
new file mode 100644
index 000000000..d5daa06a6
--- /dev/null
+++ b/keyboards/nightly_boards/n2/n2.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 "n2.h"
18
diff --git a/keyboards/nightly_boards/n2/n2.h b/keyboards/nightly_boards/n2/n2.h
new file mode 100644
index 000000000..10242e41d
--- /dev/null
+++ b/keyboards/nightly_boards/n2/n2.h
@@ -0,0 +1,27 @@
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, \
23 K11 \
24) { \
25 { K00, KC_NO }, \
26 { KC_NO, K11 }, \
27}
diff --git a/keyboards/nightly_boards/n2/readme.md b/keyboards/nightly_boards/n2/readme.md
new file mode 100644
index 000000000..fc1ae5a93
--- /dev/null
+++ b/keyboards/nightly_boards/n2/readme.md
@@ -0,0 +1,18 @@
1# [n]2
2
3![n2](https://i.imgur.com/iHOxmHil.png)
4
5A 2 key pcb
6
7* Keyboard Maintainer: [Neil Brian Ramirez](https://github.com/NightlyBoards)
8* Hardware Supported: atmega32u4
9
10Make example for this keyboard (after setting up your build environment):
11
12 make nightly_boards/n2:default
13
14Flashing example for this keyboard:
15
16 make nightly_boards/n2:default:flash
17
18See 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/n2/rules.mk b/keyboards/nightly_boards/n2/rules.mk
new file mode 100644
index 000000000..62427c917
--- /dev/null
+++ b/keyboards/nightly_boards/n2/rules.mk
@@ -0,0 +1,22 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_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
18NKRO_ENABLE = no # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output