diff options
| author | Danny <nooges@users.noreply.github.com> | 2019-01-23 20:58:04 -0500 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-01-23 17:58:04 -0800 |
| commit | 87ab49e4033db5afe835863c4ebab8858cbe3e2d (patch) | |
| tree | 77f3c1d7119742a6d61c7df17bd9e5338f93524a | |
| parent | fafb33d9ddbc38335b4488efbc47ed29fc279d1a (diff) | |
| download | qmk_firmware-87ab49e4033db5afe835863c4ebab8858cbe3e2d.tar.gz qmk_firmware-87ab49e4033db5afe835863c4ebab8858cbe3e2d.zip | |
[Keyboard] Add BDN9 (#4919)
| -rw-r--r-- | keyboards/bdn9/bdn9.c | 1 | ||||
| -rw-r--r-- | keyboards/bdn9/bdn9.h | 35 | ||||
| -rw-r--r-- | keyboards/bdn9/config.h | 74 | ||||
| -rw-r--r-- | keyboards/bdn9/info.json | 0 | ||||
| -rw-r--r-- | keyboards/bdn9/keymaps/default/keymap.c | 41 | ||||
| -rw-r--r-- | keyboards/bdn9/readme.md | 15 | ||||
| -rw-r--r-- | keyboards/bdn9/rules.mk | 50 |
7 files changed, 216 insertions, 0 deletions
diff --git a/keyboards/bdn9/bdn9.c b/keyboards/bdn9/bdn9.c new file mode 100644 index 000000000..0ff55fd6d --- /dev/null +++ b/keyboards/bdn9/bdn9.c | |||
| @@ -0,0 +1 @@ | |||
| #include "bdn9.h" | |||
diff --git a/keyboards/bdn9/bdn9.h b/keyboards/bdn9/bdn9.h new file mode 100644 index 000000000..26b043560 --- /dev/null +++ b/keyboards/bdn9/bdn9.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | /* Copyright 2019 Danny Nguyen <danny@keeb.io> | ||
| 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 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | /* This a shortcut to help you visually see your layout. | ||
| 21 | * | ||
| 22 | * The first section contains all of the arguments representing the physical | ||
| 23 | * layout of the board and position of the keys. | ||
| 24 | * | ||
| 25 | * The second converts the arguments into a two-dimensional array which | ||
| 26 | * represents the switch matrix. | ||
| 27 | */ | ||
| 28 | #define LAYOUT( \ | ||
| 29 | KA1, KA2, KA3, \ | ||
| 30 | KB1, KB2, KB3, \ | ||
| 31 | KC1, KC2, KC3 \ | ||
| 32 | ) \ | ||
| 33 | { \ | ||
| 34 | { KA1, KA2, KA3, KB1, KB2, KB3, KC1, KC2, KC3 } \ | ||
| 35 | } | ||
diff --git a/keyboards/bdn9/config.h b/keyboards/bdn9/config.h new file mode 100644 index 000000000..604da5ef4 --- /dev/null +++ b/keyboards/bdn9/config.h | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2019 Danny Nguyen <danny@keeb.io> | ||
| 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 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0xCB10 | ||
| 24 | #define PRODUCT_ID 0x1133 | ||
| 25 | #define DEVICE_VER 0x0100 | ||
| 26 | #define MANUFACTURER Keebio | ||
| 27 | #define PRODUCT BDN9 | ||
| 28 | #define DESCRIPTION 3x3 Macropad with Rotary Encoders | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 1 | ||
| 32 | #define MATRIX_COLS 9 | ||
| 33 | |||
| 34 | /* Keyboard Matrix Assignments */ | ||
| 35 | #define NO_PIN (~0) | ||
| 36 | #define MATRIX_ROW_PINS { NO_PIN } | ||
| 37 | #define MATRIX_COL_PINS { D2, D4, F4, D7, B1, B3, E6, B4, B2 } | ||
| 38 | |||
| 39 | /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ | ||
| 40 | #define DIODE_DIRECTION COL2ROW | ||
| 41 | |||
| 42 | #define NUMBER_OF_ENCODERS 2 | ||
| 43 | #define ENCODERS_PAD_A { D1, F5 } | ||
| 44 | #define ENCODERS_PAD_B { D0, F6 } | ||
| 45 | |||
| 46 | |||
| 47 | #define BACKLIGHT_PIN B5 | ||
| 48 | // #define BACKLIGHT_BREATHING | ||
| 49 | #define BACKLIGHT_LEVELS 7 | ||
| 50 | |||
| 51 | #define RGB_DI_PIN D3 | ||
| 52 | #ifdef RGB_DI_PIN | ||
| 53 | #define RGBLED_NUM 3 | ||
| 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 | #endif | ||
| 62 | |||
| 63 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 64 | #define DEBOUNCING_DELAY 5 | ||
| 65 | |||
| 66 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 67 | #define LOCKING_SUPPORT_ENABLE | ||
| 68 | /* Locking resynchronize hack */ | ||
| 69 | #define LOCKING_RESYNC_ENABLE | ||
| 70 | |||
| 71 | /* key combination for magic key command */ | ||
| 72 | #define IS_COMMAND() ( \ | ||
| 73 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 74 | ) | ||
diff --git a/keyboards/bdn9/info.json b/keyboards/bdn9/info.json new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/keyboards/bdn9/info.json | |||
diff --git a/keyboards/bdn9/keymaps/default/keymap.c b/keyboards/bdn9/keymaps/default/keymap.c new file mode 100644 index 000000000..66b9a3eb6 --- /dev/null +++ b/keyboards/bdn9/keymaps/default/keymap.c | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* Copyright 2019 Danny Nguyen <danny@keeb.io> | ||
| 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_A, KC_B, KC_C, \ | ||
| 21 | BL_STEP, KC_UP, RGB_MOD, \ | ||
| 22 | KC_LEFT, KC_DOWN, KC_RGHT \ | ||
| 23 | ), | ||
| 24 | }; | ||
| 25 | |||
| 26 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 27 | if (index == 0) { | ||
| 28 | if (clockwise) { | ||
| 29 | tap_code(KC_PGDN); | ||
| 30 | } else { | ||
| 31 | tap_code(KC_PGUP); | ||
| 32 | } | ||
| 33 | } | ||
| 34 | else if (index == 1) { | ||
| 35 | if (clockwise) { | ||
| 36 | tap_code(KC_DOWN); | ||
| 37 | } else { | ||
| 38 | tap_code(KC_UP); | ||
| 39 | } | ||
| 40 | } | ||
| 41 | } | ||
diff --git a/keyboards/bdn9/readme.md b/keyboards/bdn9/readme.md new file mode 100644 index 000000000..c9d5ed0b3 --- /dev/null +++ b/keyboards/bdn9/readme.md | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # BDN9 | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A 3x3 macropad with support for a rotary encoder at the upper two corners. | ||
| 6 | |||
| 7 | Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) | ||
| 8 | Hardware Supported: Pro Micro, Elite-C, Proton C | ||
| 9 | Hardware Availability: [Keebio - BDN9](https://keeb.io/products/bdn9-3x3-9-key-macropad-rotary-encoder-support) | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make bdn9:default | ||
| 14 | |||
| 15 | 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/bdn9/rules.mk b/keyboards/bdn9/rules.mk new file mode 100644 index 000000000..3ab849108 --- /dev/null +++ b/keyboards/bdn9/rules.mk | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | MCU = atmega32u4 | ||
| 2 | F_CPU = 16000000 | ||
| 3 | ARCH = AVR8 | ||
| 4 | F_USB = $(F_CPU) | ||
| 5 | |||
| 6 | # Interrupt driven control endpoint task(+60) | ||
| 7 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 8 | |||
| 9 | |||
| 10 | # Bootloader selection | ||
| 11 | # Teensy halfkay | ||
| 12 | # Pro Micro caterina | ||
| 13 | # Atmel DFU atmel-dfu | ||
| 14 | # LUFA DFU lufa-dfu | ||
| 15 | # QMK DFU qmk-dfu | ||
| 16 | # atmega32a bootloadHID | ||
| 17 | BOOTLOADER = caterina | ||
| 18 | |||
| 19 | |||
| 20 | # If you don't know the bootloader type, then you can specify the | ||
| 21 | # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | ||
| 22 | # Teensy halfKay 512 | ||
| 23 | # Teensy++ halfKay 1024 | ||
| 24 | # Atmel DFU loader 4096 | ||
| 25 | # LUFA bootloader 4096 | ||
| 26 | # USBaspLoader 2048 | ||
| 27 | # OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 28 | |||
| 29 | |||
| 30 | # Build Options | ||
| 31 | # change yes to no to disable | ||
| 32 | # | ||
| 33 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 34 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 35 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 36 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
| 37 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 38 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 39 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 40 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 41 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 42 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default | ||
| 43 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 44 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
| 45 | UNICODE_ENABLE = no # Unicode | ||
| 46 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 47 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 48 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
| 49 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | ||
| 50 | ENCODER_ENABLE = yes | ||
