diff --git a/keyboards/handwired/bdn9_ble/bdn9_ble.c b/keyboards/handwired/bdn9_ble/bdn9_ble.c new file mode 100644 index 00000000000..75fe7fff718 --- /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 00000000000..8a451132647 --- /dev/null +++ b/keyboards/handwired/bdn9_ble/bdn9_ble.h @@ -0,0 +1,37 @@ +/* Copyright 2019 Danny Nguyen + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + KA1, KA2, KA3, \ + KB1, KB2, KB3, \ + KC1, KC2, KC3 \ +) \ +{ \ + { KA1, KA2, KA3 }, \ + { KB1, KB2, KB3 }, \ + { KC1, KC2, KC3 } \ +} diff --git a/keyboards/handwired/bdn9_ble/config.h b/keyboards/handwired/bdn9_ble/config.h new file mode 100644 index 00000000000..8db9253dd45 --- /dev/null +++ b/keyboards/handwired/bdn9_ble/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2019 Danny Nguyen + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1134 +#define DEVICE_VER 0x0100 +#define MANUFACTURER KeyPCB/Keebio +#define PRODUCT BDN9-BLE +#define DESCRIPTION 3x3 Bluetooth Macropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ + { D1, D0, C6 }, \ + { D7, B5, B6 }, \ + { B7, D6, F7 } \ +} + +#define BACKLIGHT_PIN F6 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 +#define BACKLIGHT_ON_STATE 1 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#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 00000000000..49bf627197f --- /dev/null +++ b/keyboards/handwired/bdn9_ble/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "KeyPCB/Keeb.io BDN9-BLE", + "url": "", + "maintainer": "merlin04", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"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} + ] + } + } +} 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 00000000000..40684214677 --- /dev/null +++ b/keyboards/handwired/bdn9_ble/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 Danny Nguyen + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +// Enable test mode, which sets the keys to letters A-I. +//#define TESTMODE + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + #ifndef TESTMODE + // MEH - hold down ctrl, alt, shift, and press key + [0] = LAYOUT( + MEH(KC_1), MEH(KC_2), MEH(KC_3), + MEH(KC_4), MEH(KC_5), MEH(KC_6), + MEH(KC_7), MEH(KC_8), LT(1, MEH(KC_9)) + ), + #else + [0] = LAYOUT( + KC_A, KC_B, KC_C, + KC_D, KC_E, KC_F, + KC_G, KC_H, KC_I + ), + #endif + /* + * ------------------------------------------------------------------------ + * | | Automatic BLE output detection | Reset | + * | Backlight Step | Use USB port for output | | + * | Backlight Tgl | Use Bluetooth for output | (currently pressed) | + * ------------------------------------------------------------------------ + */ + [1] = LAYOUT( + _______, OUT_AUTO, RESET, + BL_STEP, OUT_USB, _______, + BL_TOGG, OUT_BT, _______ + ) +}; diff --git a/keyboards/handwired/bdn9_ble/readme.md b/keyboards/handwired/bdn9_ble/readme.md new file mode 100644 index 00000000000..eaeab59ad87 --- /dev/null +++ b/keyboards/handwired/bdn9_ble/readme.md @@ -0,0 +1,14 @@ +# BDN9-BLE + +![BDN9](https://cdn.shopify.com/s/files/1/1851/5125/products/image_bd8d9423-950e-4aad-bea5-665d896f879a_530x@2x.jpg?v=1547909493) + +A handwired modified version of the Keebio BDN9 macropad to support BLE through the Adafruit Feather 32u4 Bluefruit LE. + +* Keyboard Maintainer: [merlin04/KeyPCB](https://github.com/merlin04) +* Hardware Supported: Adafruit Feather 32u4 Bluefruit LE + +Make example for this keyboard (after setting up your build environment): + + make handwired/bdn9_ble: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). diff --git a/keyboards/handwired/bdn9_ble/rules.mk b/keyboards/handwired/bdn9_ble/rules.mk new file mode 100644 index 00000000000..4fabf1c89d0 --- /dev/null +++ b/keyboards/handwired/bdn9_ble/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # 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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH = AdafruitBLE # Enable Bluetooth +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs +ENCODER_ENABLE = no