diff options
| author | Cory Shaw <cory.shaw.dev@gmail.com> | 2017-08-22 21:26:45 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-08-22 23:09:12 -0400 |
| commit | d8fd33dd5e6ea43cbffc2a512db7a2ac2419b435 (patch) | |
| tree | 6be3cf112a0a7f98c896a2af7913f1941e224605 | |
| parent | bd484f18bd6092a3c3cb489cc0798904f187a64f (diff) | |
| download | qmk_firmware-d8fd33dd5e6ea43cbffc2a512db7a2ac2419b435.tar.gz qmk_firmware-d8fd33dd5e6ea43cbffc2a512db7a2ac2419b435.zip | |
Add support for 9key by Bishop Keyboards
| -rw-r--r-- | keyboards/9key/9key.c | 5 | ||||
| -rw-r--r-- | keyboards/9key/9key.h | 17 | ||||
| -rw-r--r-- | keyboards/9key/Makefile | 3 | ||||
| -rw-r--r-- | keyboards/9key/config.h | 52 | ||||
| -rw-r--r-- | keyboards/9key/keymaps/default/Makefile | 3 | ||||
| -rw-r--r-- | keyboards/9key/keymaps/default/keymap.c | 47 | ||||
| -rw-r--r-- | keyboards/9key/rules.mk | 69 |
7 files changed, 196 insertions, 0 deletions
diff --git a/keyboards/9key/9key.c b/keyboards/9key/9key.c new file mode 100644 index 000000000..ed8e91e73 --- /dev/null +++ b/keyboards/9key/9key.c | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | #include "9key.h" | ||
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | matrix_init_user(); | ||
| 5 | } \ No newline at end of file | ||
diff --git a/keyboards/9key/9key.h b/keyboards/9key/9key.h new file mode 100644 index 000000000..f1cb30628 --- /dev/null +++ b/keyboards/9key/9key.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #ifndef NINEKEY_H | ||
| 2 | #define NINEKEY_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | #define KEYMAP( \ | ||
| 7 | k00, k01, k02, \ | ||
| 8 | k10, k11, k12, \ | ||
| 9 | k20, k21, k22 \ | ||
| 10 | ) \ | ||
| 11 | { \ | ||
| 12 | { k00, k01, k02 }, \ | ||
| 13 | { k10, k11, k12 }, \ | ||
| 14 | { k20, k21, k22 } \ | ||
| 15 | } | ||
| 16 | |||
| 17 | #endif | ||
diff --git a/keyboards/9key/Makefile b/keyboards/9key/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/9key/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef MAKEFILE_INCLUDED | ||
| 2 | include ../../Makefile | ||
| 3 | endif \ No newline at end of file | ||
diff --git a/keyboards/9key/config.h b/keyboards/9key/config.h new file mode 100644 index 000000000..c0a7eb355 --- /dev/null +++ b/keyboards/9key/config.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef CONFIG_H | ||
| 19 | #define CONFIG_H | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0xFEED | ||
| 25 | #define PRODUCT_ID 0x0007 | ||
| 26 | #define DEVICE_VER 0x0001 | ||
| 27 | #define MANUFACTURER Bishop Keyboards | ||
| 28 | #define PRODUCT 9Key | ||
| 29 | #define DESCRIPTION Bishop Keyboards 9Key // Charleston, SC Meetup Handout | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | #define MATRIX_ROWS 3 | ||
| 33 | #define MATRIX_COLS 3 | ||
| 34 | |||
| 35 | /* 9Key PCB default pin-out */ | ||
| 36 | #define MATRIX_ROW_PINS { D1, D0, D4 } | ||
| 37 | #define MATRIX_COL_PINS { F4, F5, F6 } | ||
| 38 | #define UNUSED_PINS | ||
| 39 | |||
| 40 | /* ws2812 RGB LED */ | ||
| 41 | #define RGB_DI_PIN F7 | ||
| 42 | #define RGBLIGHT_TIMER | ||
| 43 | #define RGBLED_NUM 1 // Number of LEDs | ||
| 44 | #define ws2812_PORTREG PORTD | ||
| 45 | #define ws2812_DDRREG DDRD | ||
| 46 | |||
| 47 | /* COL2ROW or ROW2COL */ | ||
| 48 | #define DIODE_DIRECTION COL2ROW | ||
| 49 | |||
| 50 | #define TAPPING_TERM 150 | ||
| 51 | |||
| 52 | #endif | ||
diff --git a/keyboards/9key/keymaps/default/Makefile b/keyboards/9key/keymaps/default/Makefile new file mode 100644 index 000000000..457a3d01d --- /dev/null +++ b/keyboards/9key/keymaps/default/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef QUANTUM_DIR | ||
| 2 | include ../../../../Makefile | ||
| 3 | endif | ||
diff --git a/keyboards/9key/keymaps/default/keymap.c b/keyboards/9key/keymaps/default/keymap.c new file mode 100644 index 000000000..23364e853 --- /dev/null +++ b/keyboards/9key/keymaps/default/keymap.c | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | #include "9key.h" | ||
| 2 | |||
| 3 | // Tap Dance Declarations | ||
| 4 | enum { | ||
| 5 | ENT_5 = 0 | ||
| 6 | }; | ||
| 7 | |||
| 8 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 9 | |||
| 10 | /* LAYER 0 | ||
| 11 | * ,-----------------. | ||
| 12 | * | 1 | 2 | 3 | | ||
| 13 | * |-----+-----+-----| | ||
| 14 | * | 4 |5/ENT| 6 | Dbl Tap 5 for Enter | ||
| 15 | * |-----+-----+-----| | ||
| 16 | * | 7 | 8 | FN | | ||
| 17 | * `-----------------' | ||
| 18 | */ | ||
| 19 | [0] = KEYMAP( \ | ||
| 20 | KC_1, KC_2, KC_3, \ | ||
| 21 | KC_4, TD(ENT_5), KC_6, \ | ||
| 22 | KC_7, KC_8, MO(1) \ | ||
| 23 | ), | ||
| 24 | |||
| 25 | /* LAYER 1 | ||
| 26 | * ,-----------------. | ||
| 27 | * | 9 | 0 | - | | ||
| 28 | * |-----+-----+-----| | ||
| 29 | * | + | * | / | | ||
| 30 | * |-----+-----+-----| | ||
| 31 | * | F1 | F2 | | | ||
| 32 | * `-----------------' | ||
| 33 | */ | ||
| 34 | [1] = KEYMAP( \ | ||
| 35 | KC_9, KC_0, KC_MINS, \ | ||
| 36 | KC_PLUS, KC_ASTR, KC_SLSH, \ | ||
| 37 | KC_F1, KC_F2, KC_TRNS \ | ||
| 38 | ) | ||
| 39 | |||
| 40 | }; | ||
| 41 | |||
| 42 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 43 | [ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT) | ||
| 44 | }; | ||
| 45 | |||
| 46 | void matrix_init_user(void) { | ||
| 47 | } \ No newline at end of file | ||
diff --git a/keyboards/9key/rules.mk b/keyboards/9key/rules.mk new file mode 100644 index 000000000..e252640f7 --- /dev/null +++ b/keyboards/9key/rules.mk | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | # MCU name | ||
| 2 | #MCU = at90usb1287 | ||
| 3 | MCU = atmega32u4 | ||
| 4 | |||
| 5 | # Processor frequency. | ||
| 6 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 7 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 8 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 9 | # automatically to create a 32-bit value in your source code. | ||
| 10 | # | ||
| 11 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 12 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 13 | # does not *change* the processor frequency - it should merely be updated to | ||
| 14 | # reflect the processor speed set externally so that the code can use accurate | ||
| 15 | # software delays. | ||
| 16 | F_CPU = 16000000 | ||
| 17 | |||
| 18 | # | ||
| 19 | # LUFA specific | ||
| 20 | # | ||
| 21 | # Target architecture (see library "Board Types" documentation). | ||
| 22 | ARCH = AVR8 | ||
| 23 | |||
| 24 | # Input clock frequency. | ||
| 25 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 26 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 27 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 28 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 29 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 30 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 31 | # source code. | ||
| 32 | # | ||
| 33 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 34 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 35 | F_USB = $(F_CPU) | ||
| 36 | |||
| 37 | # Interrupt driven control endpoint task(+60) | ||
| 38 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 39 | |||
| 40 | |||
| 41 | # Boot Section Size in *bytes* | ||
| 42 | # Teensy halfKay 512 | ||
| 43 | # Teensy++ halfKay 1024 | ||
| 44 | # Atmel DFU loader 4096 | ||
| 45 | # LUFA bootloader 4096 | ||
| 46 | # USBaspLoader 2048 | ||
| 47 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 48 | |||
| 49 | # Build Options | ||
| 50 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 51 | # the appropriate keymap folder that will get included automatically | ||
| 52 | # | ||
| 53 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 54 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 55 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 56 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 57 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 58 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 59 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 60 | MIDI_ENABLE = no # MIDI controls | ||
| 61 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 62 | UNICODE_ENABLE = yes # Unicode | ||
| 63 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 64 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | ||
| 65 | API_SYSEX_ENABLE = yes | ||
| 66 | TAP_DANCE_ENABLE = yes | ||
| 67 | |||
| 68 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 69 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
