aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Smith <Merlin04@users.noreply.github.com>2020-04-12 09:15:31 -0700
committerGitHub <noreply@github.com>2020-04-12 09:15:31 -0700
commit6265b783073e943b8f5b2f7118a2ec8df1fd2ebc (patch)
treedd7be0c9f758d62686f9aae56cb7f76a5e4df398
parent23124b9fd1d667b3457410b771153361e22ae133 (diff)
downloadqmk_firmware-6265b783073e943b8f5b2f7118a2ec8df1fd2ebc.tar.gz
qmk_firmware-6265b783073e943b8f5b2f7118a2ec8df1fd2ebc.zip
[Keyboard] Add handwired BDN9-BLE (#8192)
* Add handwired BDN9-BLE * Apply suggestions from code review Co-Authored-By: Ryan <fauxpark@gmail.com> * Update keyboards/handwired/bdn9_ble/rules.mk Co-Authored-By: Ryan <fauxpark@gmail.com> * Update keyboards/handwired/bdn9_ble/rules.mk Co-Authored-By: Ryan <fauxpark@gmail.com> * Update keyboards/handwired/bdn9_ble/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
-rw-r--r--keyboards/handwired/bdn9_ble/bdn9_ble.c1
-rw-r--r--keyboards/handwired/bdn9_ble/bdn9_ble.h37
-rw-r--r--keyboards/handwired/bdn9_ble/config.h52
-rw-r--r--keyboards/handwired/bdn9_ble/info.json22
-rw-r--r--keyboards/handwired/bdn9_ble/keymaps/default/keymap.c49
-rw-r--r--keyboards/handwired/bdn9_ble/readme.md14
-rw-r--r--keyboards/handwired/bdn9_ble/rules.mk37
7 files changed, 212 insertions, 0 deletions
diff --git a/keyboards/handwired/bdn9_ble/bdn9_ble.c b/keyboards/handwired/bdn9_ble/bdn9_ble.c
new file mode 100644
index 000000000..75fe7fff7
--- /dev/null
+++ b/keyboards/handwired/bdn9_ble/bdn9_ble.c
@@ -0,0 +1 @@
#include "bdn9_ble.h"
diff --git a/keyboards/handwired/bdn9_ble/bdn9_ble.h b/keyboards/handwired/bdn9_ble/bdn9_ble.h
new file mode 100644
index 000000000..8a4511326
--- /dev/null
+++ b/keyboards/handwired/bdn9_ble/bdn9_ble.h
@@ -0,0 +1,37 @@
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 }, \
35 { KB1, KB2, KB3 }, \
36 { KC1, KC2, KC3 } \
37}
diff --git a/keyboards/handwired/bdn9_ble/config.h b/keyboards/handwired/bdn9_ble/config.h
new file mode 100644
index 000000000..8db9253dd
--- /dev/null
+++ b/keyboards/handwired/bdn9_ble/config.h
@@ -0,0 +1,52 @@
1/*
2Copyright 2019 Danny Nguyen <danny@keeb.io>
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 0xCB10
24#define PRODUCT_ID 0x1134
25#define DEVICE_VER 0x0100
26#define MANUFACTURER KeyPCB/Keebio
27#define PRODUCT BDN9-BLE
28#define DESCRIPTION 3x3 Bluetooth Macropad
29
30/* key matrix size */
31#define MATRIX_ROWS 3
32#define MATRIX_COLS 3
33
34/* Keyboard Matrix Assignments */
35#define DIRECT_PINS { \
36 { D1, D0, C6 }, \
37 { D7, B5, B6 }, \
38 { B7, D6, F7 } \
39}
40
41#define BACKLIGHT_PIN F6
42// #define BACKLIGHT_BREATHING
43#define BACKLIGHT_LEVELS 5
44#define BACKLIGHT_ON_STATE 1
45
46/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
47#define DEBOUNCE 5
48
49/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
50#define LOCKING_SUPPORT_ENABLE
51/* Locking resynchronize hack */
52#define LOCKING_RESYNC_ENABLE
diff --git a/keyboards/handwired/bdn9_ble/info.json b/keyboards/handwired/bdn9_ble/info.json
new file mode 100644
index 000000000..49bf62719
--- /dev/null
+++ b/keyboards/handwired/bdn9_ble/info.json
@@ -0,0 +1,22 @@
1{
2 "keyboard_name": "KeyPCB/Keeb.io BDN9-BLE",
3 "url": "",
4 "maintainer": "merlin04",
5 "width": 3,
6 "height": 3,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {"x":0, "y":0},
11 {"x":1, "y":0},
12 {"x":2, "y":0},
13 {"x":0, "y":1},
14 {"x":1, "y":1},
15 {"x":2, "y":1},
16 {"x":0, "y":2},
17 {"x":1, "y":2},
18 {"x":2, "y":2}
19 ]
20 }
21 }
22}
diff --git a/keyboards/handwired/bdn9_ble/keymaps/default/keymap.c b/keyboards/handwired/bdn9_ble/keymaps/default/keymap.c
new file mode 100644
index 000000000..406842146
--- /dev/null
+++ b/keyboards/handwired/bdn9_ble/keymaps/default/keymap.c
@@ -0,0 +1,49 @@
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
19// Enable test mode, which sets the keys to letters A-I.
20//#define TESTMODE
21
22const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
23 #ifndef TESTMODE
24 // MEH - hold down ctrl, alt, shift, and press key
25 [0] = LAYOUT(
26 MEH(KC_1), MEH(KC_2), MEH(KC_3),
27 MEH(KC_4), MEH(KC_5), MEH(KC_6),
28 MEH(KC_7), MEH(KC_8), LT(1, MEH(KC_9))
29 ),
30 #else
31 [0] = LAYOUT(
32 KC_A, KC_B, KC_C,
33 KC_D, KC_E, KC_F,
34 KC_G, KC_H, KC_I
35 ),
36 #endif
37 /*
38 * ------------------------------------------------------------------------
39 * | | Automatic BLE output detection | Reset |
40 * | Backlight Step | Use USB port for output | |
41 * | Backlight Tgl | Use Bluetooth for output | (currently pressed) |
42 * ------------------------------------------------------------------------
43 */
44 [1] = LAYOUT(
45 _______, OUT_AUTO, RESET,
46 BL_STEP, OUT_USB, _______,
47 BL_TOGG, OUT_BT, _______
48 )
49};
diff --git a/keyboards/handwired/bdn9_ble/readme.md b/keyboards/handwired/bdn9_ble/readme.md
new file mode 100644
index 000000000..eaeab59ad
--- /dev/null
+++ b/keyboards/handwired/bdn9_ble/readme.md
@@ -0,0 +1,14 @@
1# BDN9-BLE
2
3![BDN9](https://cdn.shopify.com/s/files/1/1851/5125/products/image_bd8d9423-950e-4aad-bea5-665d896f879a_530x@2x.jpg?v=1547909493)
4
5A handwired modified version of the Keebio BDN9 macropad to support BLE through the Adafruit Feather 32u4 Bluefruit LE.
6
7* Keyboard Maintainer: [merlin04/KeyPCB](https://github.com/merlin04)
8* Hardware Supported: Adafruit Feather 32u4 Bluefruit LE
9
10Make example for this keyboard (after setting up your build environment):
11
12 make handwired/bdn9_ble:default
13
14See 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/handwired/bdn9_ble/rules.mk b/keyboards/handwired/bdn9_ble/rules.mk
new file mode 100644
index 000000000..4fabf1c89
--- /dev/null
+++ b/keyboards/handwired/bdn9_ble/rules.mk
@@ -0,0 +1,37 @@
1# MCU name
2MCU = atmega32u4
3
4# Processor frequency
5F_CPU = 8000000
6
7# Bootloader selection
8# Teensy halfkay
9# Pro Micro caterina
10# Atmel DFU atmel-dfu
11# LUFA DFU lufa-dfu
12# QMK DFU qmk-dfu
13# ATmega32A bootloadHID
14# ATmega328P USBasp
15BOOTLOADER = caterina
16
17# Build Options
18# change yes to no to disable
19#
20BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
21MOUSEKEY_ENABLE = no # Mouse keys
22EXTRAKEY_ENABLE = yes # Audio control and System control
23CONSOLE_ENABLE = yes # Console for debug
24COMMAND_ENABLE = yes # Commands for debug and configuration
25# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
26SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
27# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
28NKRO_ENABLE = no # USB Nkey Rollover
29BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
30RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
31MIDI_ENABLE = no # MIDI support
32UNICODE_ENABLE = no # Unicode
33BLUETOOTH = AdafruitBLE # Enable Bluetooth
34AUDIO_ENABLE = no # Audio output on port C6
35FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
36HD44780_ENABLE = no # Enable support for HD44780 based LCDs
37ENCODER_ENABLE = no