mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 03:19:24 +00:00
[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
This commit is contained in:
parent
b69457a192
commit
0c86cfeaed
53
keyboards/ncc1701kb/config.h
Normal file
53
keyboards/ncc1701kb/config.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x1701
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER J2L Designs
|
||||
#define PRODUCT NCC1701KB
|
||||
#define DESCRIPTION J2L NCC1701KB
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 3
|
||||
#define MATRIX_COLS 3
|
||||
|
||||
/* NCC-1701-KB PCB default pin-out */
|
||||
#define MATRIX_ROW_PINS { D4, D6, D7 }
|
||||
#define MATRIX_COL_PINS { B4, B5, B6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* BackLight */
|
||||
#define BACKLIGHT_PIN B7
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BREATHING_PERIOD 6
|
||||
|
||||
/*Encoders */
|
||||
#define ENCODERS_PAD_A { D0 }
|
||||
#define ENCODERS_PAD_B { D1 }
|
||||
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
#define TAPPING_TERM 200
|
12
keyboards/ncc1701kb/info.json
Normal file
12
keyboards/ncc1701kb/info.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "NCC-1701-KB",
|
||||
"url": "",
|
||||
"maintainer": "jessel92",
|
||||
"width": 3,
|
||||
"height": 3,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"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}]
|
||||
}
|
||||
}
|
||||
}
|
51
keyboards/ncc1701kb/keymaps/default/keymap.c
Normal file
51
keyboards/ncc1701kb/keymaps/default/keymap.c
Normal file
@ -0,0 +1,51 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* LAYER 0
|
||||
* ,-----------------------.
|
||||
* | << | MUTE | >> | ENCODER - PRESS (MUTE) / KNOB (VOLUME CONTROL)
|
||||
* |-------+-------+-------|
|
||||
* | STOP | PLAY | MEDIA |
|
||||
* |-------+-------+-------|
|
||||
* | CALC | MAIL | PC/FN |
|
||||
* `-----------------------'
|
||||
*/
|
||||
[0] = LAYOUT(
|
||||
KC_MPRV, KC_MUTE, KC_MNXT,
|
||||
KC_MSTP, KC_MPLY, KC_MSEL,
|
||||
KC_CALC, KC_MAIL, LT(1, KC_MYCM)
|
||||
),
|
||||
|
||||
/* LAYER 1
|
||||
* ,-----------------------.
|
||||
* |BL TOG | | BREATH|
|
||||
* |-------+-------+-------|
|
||||
* | BL + | BL - |BL CYCL|
|
||||
* |-------+-------+-------|
|
||||
* | BL ON | BL OFF| |
|
||||
* `-----------------------'
|
||||
*/
|
||||
[1] = LAYOUT(
|
||||
BL_TOGG, KC_TRNS, BL_BRTG,
|
||||
BL_INC, BL_DEC, BL_STEP,
|
||||
BL_ON, BL_OFF, KC_TRNS
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
} else if (index == 1) { /* Second encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
}
|
1
keyboards/ncc1701kb/ncc1701kb.c
Normal file
1
keyboards/ncc1701kb/ncc1701kb.c
Normal file
@ -0,0 +1 @@
|
||||
#include "ncc1701kb.h"
|
14
keyboards/ncc1701kb/ncc1701kb.h
Normal file
14
keyboards/ncc1701kb/ncc1701kb.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
k00, k01, k02, \
|
||||
k10, k11, k12, \
|
||||
k20, k21, k22 \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02 }, \
|
||||
{ k10, k11, k12 }, \
|
||||
{ k20, k21, k22 } \
|
||||
}
|
17
keyboards/ncc1701kb/readme.md
Normal file
17
keyboards/ncc1701kb/readme.md
Normal file
@ -0,0 +1,17 @@
|
||||
# NCC-1701-KB Keypad with Encoder
|
||||
|
||||
![NCC-1701-KB PCB](https://i.imgur.com/aXFgH52.jpg)
|
||||
![NCC-1701-KB](https://i.imgur.com/9hWyhcR.jpg)
|
||||
|
||||
The NCC-1701-KB Keypad is a custom Star Trek-inspired 3x3 mechanical keypad with an encoder knob.
|
||||
|
||||
* Keyboard Maintainer: [J2L Designs](https://github.com/jessel92)
|
||||
* Hardware Supported: NCC-1701-KB PCB, ATmega32U4
|
||||
* Hardware Availability: [J2L Designs Store](https://www.etsy.com/listing/752039967/ncc-1701-kb-custom-star-trek-inspired)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make ncc1701kb: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).
|
34
keyboards/ncc1701kb/rules.mk
Normal file
34
keyboards/ncc1701kb/rules.mk
Normal file
@ -0,0 +1,34 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
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
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = yes # Unicode
|
||||
API_SYSEX_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = no
|
||||
ENCODER_ENABLE = yes
|
Loading…
Reference in New Issue
Block a user