aboutsummaryrefslogtreecommitdiff
path: root/keyboards/ncc1701kb
diff options
context:
space:
mode:
authorJesse Leventhal <45154268+jessel92@users.noreply.github.com>2020-01-07 17:29:45 -0500
committerJames Young <18669334+noroadsleft@users.noreply.github.com>2020-01-07 14:29:45 -0800
commit0c86cfeaed23377862356326c0f26191f74d899f (patch)
tree845044fda9e3592fcffb325a2d4e10d2c2f72a73 /keyboards/ncc1701kb
parentb69457a192374522de9662a219165ddfdd83afc2 (diff)
downloadqmk_firmware-0c86cfeaed23377862356326c0f26191f74d899f.tar.gz
qmk_firmware-0c86cfeaed23377862356326c0f26191f74d899f.zip
[Keyboard] Added NCC-1701-KB 3x3 Keypad with Encoder and Keymap (#7819)
* Added NCC-1701-KB Keypad and Keymap * Update keyboards/ncc1701kb/config.h * Update keyboards/ncc1701kb/config.h * Update keyboards/ncc1701kb/config.h * Update keyboards/ncc1701kb/config.h * Update keyboards/ncc1701kb/ncc1701kb.h * Update keyboards/ncc1701kb/readme.md * Update keyboards/ncc1701kb/readme.md * Update keyboards/ncc1701kb/readme.md * Fixed changes rules.mk bootloader * Fixed rules.mk Build Options * Recomended fauxpark changes/fixes * Update keyboards/ncc1701kb/ncc1701kb.h * Update keyboards/ncc1701kb/ncc1701kb.h * Update keyboards/ncc1701kb/readme.md * Update keyboards/ncc1701kb/readme.md
Diffstat (limited to 'keyboards/ncc1701kb')
-rw-r--r--keyboards/ncc1701kb/config.h53
-rw-r--r--keyboards/ncc1701kb/info.json12
-rw-r--r--keyboards/ncc1701kb/keymaps/default/keymap.c51
-rw-r--r--keyboards/ncc1701kb/ncc1701kb.c1
-rw-r--r--keyboards/ncc1701kb/ncc1701kb.h14
-rw-r--r--keyboards/ncc1701kb/readme.md17
-rw-r--r--keyboards/ncc1701kb/rules.mk34
7 files changed, 182 insertions, 0 deletions
diff --git a/keyboards/ncc1701kb/config.h b/keyboards/ncc1701kb/config.h
new file mode 100644
index 000000000..71978858e
--- /dev/null
+++ b/keyboards/ncc1701kb/config.h
@@ -0,0 +1,53 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0xFEED
24#define PRODUCT_ID 0x1701
25#define DEVICE_VER 0x0001
26#define MANUFACTURER J2L Designs
27#define PRODUCT NCC1701KB
28#define DESCRIPTION J2L NCC1701KB
29
30/* key matrix size */
31#define MATRIX_ROWS 3
32#define MATRIX_COLS 3
33
34/* NCC-1701-KB PCB default pin-out */
35#define MATRIX_ROW_PINS { D4, D6, D7 }
36#define MATRIX_COL_PINS { B4, B5, B6 }
37#define UNUSED_PINS
38
39/* BackLight */
40#define BACKLIGHT_PIN B7
41#define BACKLIGHT_LEVELS 3
42#define BACKLIGHT_BREATHING
43#define BREATHING_PERIOD 6
44
45/*Encoders */
46#define ENCODERS_PAD_A { D0 }
47#define ENCODERS_PAD_B { D1 }
48
49
50/* COL2ROW or ROW2COL */
51#define DIODE_DIRECTION ROW2COL
52
53#define TAPPING_TERM 200
diff --git a/keyboards/ncc1701kb/info.json b/keyboards/ncc1701kb/info.json
new file mode 100644
index 000000000..bc0f04db1
--- /dev/null
+++ b/keyboards/ncc1701kb/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name": "NCC-1701-KB",
3 "url": "",
4 "maintainer": "jessel92",
5 "width": 3,
6 "height": 3,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [{"x":0, "y":0}, {"label":"Encoder", "x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}]
10 }
11 }
12}
diff --git a/keyboards/ncc1701kb/keymaps/default/keymap.c b/keyboards/ncc1701kb/keymaps/default/keymap.c
new file mode 100644
index 000000000..a3e3d819f
--- /dev/null
+++ b/keyboards/ncc1701kb/keymaps/default/keymap.c
@@ -0,0 +1,51 @@
1#include QMK_KEYBOARD_H
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4
5/* LAYER 0
6 * ,-----------------------.
7 * | << | MUTE | >> | ENCODER - PRESS (MUTE) / KNOB (VOLUME CONTROL)
8 * |-------+-------+-------|
9 * | STOP | PLAY | MEDIA |
10 * |-------+-------+-------|
11 * | CALC | MAIL | PC/FN |
12 * `-----------------------'
13 */
14[0] = LAYOUT(
15 KC_MPRV, KC_MUTE, KC_MNXT,
16 KC_MSTP, KC_MPLY, KC_MSEL,
17 KC_CALC, KC_MAIL, LT(1, KC_MYCM)
18),
19
20/* LAYER 1
21 * ,-----------------------.
22 * |BL TOG | | BREATH|
23 * |-------+-------+-------|
24 * | BL + | BL - |BL CYCL|
25 * |-------+-------+-------|
26 * | BL ON | BL OFF| |
27 * `-----------------------'
28 */
29[1] = LAYOUT(
30 BL_TOGG, KC_TRNS, BL_BRTG,
31 BL_INC, BL_DEC, BL_STEP,
32 BL_ON, BL_OFF, KC_TRNS
33)
34
35};
36
37void encoder_update_user(uint8_t index, bool clockwise) {
38 if (index == 0) { /* First encoder */
39 if (clockwise) {
40 tap_code(KC_VOLU);
41 } else {
42 tap_code(KC_VOLD);
43 }
44 } else if (index == 1) { /* Second encoder */
45 if (clockwise) {
46 tap_code(KC_VOLU);
47 } else {
48 tap_code(KC_VOLD);
49 }
50 }
51} \ No newline at end of file
diff --git a/keyboards/ncc1701kb/ncc1701kb.c b/keyboards/ncc1701kb/ncc1701kb.c
new file mode 100644
index 000000000..b654ece5a
--- /dev/null
+++ b/keyboards/ncc1701kb/ncc1701kb.c
@@ -0,0 +1 @@
#include "ncc1701kb.h"
diff --git a/keyboards/ncc1701kb/ncc1701kb.h b/keyboards/ncc1701kb/ncc1701kb.h
new file mode 100644
index 000000000..639adc409
--- /dev/null
+++ b/keyboards/ncc1701kb/ncc1701kb.h
@@ -0,0 +1,14 @@
1#pragma once
2
3#include "quantum.h"
4
5#define LAYOUT( \
6 k00, k01, k02, \
7 k10, k11, k12, \
8 k20, k21, k22 \
9) \
10{ \
11 { k00, k01, k02 }, \
12 { k10, k11, k12 }, \
13 { k20, k21, k22 } \
14}
diff --git a/keyboards/ncc1701kb/readme.md b/keyboards/ncc1701kb/readme.md
new file mode 100644
index 000000000..4e9ece753
--- /dev/null
+++ b/keyboards/ncc1701kb/readme.md
@@ -0,0 +1,17 @@
1# NCC-1701-KB Keypad with Encoder
2
3![NCC-1701-KB PCB](https://i.imgur.com/aXFgH52.jpg)
4![NCC-1701-KB](https://i.imgur.com/9hWyhcR.jpg)
5
6The NCC-1701-KB Keypad is a custom Star Trek-inspired 3x3 mechanical keypad with an encoder knob.
7
8* Keyboard Maintainer: [J2L Designs](https://github.com/jessel92)
9* Hardware Supported: NCC-1701-KB PCB, ATmega32U4
10* Hardware Availability: [J2L Designs Store](https://www.etsy.com/listing/752039967/ncc-1701-kb-custom-star-trek-inspired)
11
12Make example for this keyboard (after setting up your build environment):
13
14 make ncc1701kb:default
15
16See 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.
17Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
diff --git a/keyboards/ncc1701kb/rules.mk b/keyboards/ncc1701kb/rules.mk
new file mode 100644
index 000000000..791d82b40
--- /dev/null
+++ b/keyboards/ncc1701kb/rules.mk
@@ -0,0 +1,34 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5# Teensy halfkay
6# Pro Micro caterina
7# Atmel DFU atmel-dfu
8# LUFA DFU lufa-dfu
9# QMK DFU qmk-dfu
10# ATmega32A bootloadHID
11# ATmega328P USBasp
12BOOTLOADER = atmel-dfu
13
14# Build Options
15# change yes to no to disable
16#
17BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = yes # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug
21COMMAND_ENABLE = no # Commands for debug and configuration
22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
23SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
24# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
25NKRO_ENABLE = yes # USB Nkey Rollover
26BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
27RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
28MIDI_ENABLE = no # MIDI controls
29BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
30AUDIO_ENABLE = no # Audio output on port C6
31UNICODE_ENABLE = yes # Unicode
32API_SYSEX_ENABLE = yes
33TAP_DANCE_ENABLE = no
34ENCODER_ENABLE = yes \ No newline at end of file