Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Keyboard] Add handwired BDN9-BLE #8192

Merged
merged 5 commits into from
Apr 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions keyboards/handwired/bdn9_ble/bdn9_ble.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "bdn9_ble.h"
37 changes: 37 additions & 0 deletions keyboards/handwired/bdn9_ble/bdn9_ble.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* Copyright 2019 Danny Nguyen <[email protected]>
*
* 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 "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 } \
}
52 changes: 52 additions & 0 deletions keyboards/handwired/bdn9_ble/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
Copyright 2019 Danny Nguyen <[email protected]>

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 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
22 changes: 22 additions & 0 deletions keyboards/handwired/bdn9_ble/info.json
Original file line number Diff line number Diff line change
@@ -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}
]
}
}
}
50 changes: 50 additions & 0 deletions keyboards/handwired/bdn9_ble/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/* Copyright 2019 Danny Nguyen <[email protected]>
*
* 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/>.
*/
#include QMK_KEYBOARD_H

#define ______ KC_TRNS
Merlin04 marked this conversation as resolved.
Show resolved Hide resolved

// 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,
Merlin04 marked this conversation as resolved.
Show resolved Hide resolved
BL_STEP, OUT_USB, ______,
Merlin04 marked this conversation as resolved.
Show resolved Hide resolved
BL_TOGG, OUT_BT, ______
Merlin04 marked this conversation as resolved.
Show resolved Hide resolved
)
};
14 changes: 14 additions & 0 deletions keyboards/handwired/bdn9_ble/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# BDN9-BLE

![BDN9](https://cdn.shopify.com/s/files/1/1851/5125/products/[email protected]?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)
Merlin04 marked this conversation as resolved.
Show resolved Hide resolved
Hardware Supported: Adafruit Feather 32u4 Bluefruit LE
Merlin04 marked this conversation as resolved.
Show resolved Hide resolved

Make example for this keyboard (after setting up your build environment):

make handwired/bdn9-ble:default
Merlin04 marked this conversation as resolved.
Show resolved Hide resolved

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).
35 changes: 35 additions & 0 deletions keyboards/handwired/bdn9_ble/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
Merlin04 marked this conversation as resolved.
Show resolved Hide resolved
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = caterina
F_CPU = 8000000
Merlin04 marked this conversation as resolved.
Show resolved Hide resolved

# 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 on B7 by default
Merlin04 marked this conversation as resolved.
Show resolved Hide resolved
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