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

Addition of the Binepad BNR1 rotary encoder #18809

Merged
merged 6 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
40 changes: 40 additions & 0 deletions keyboards/binepad/bnr1/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"manufacturer": "Binepad",
"keyboard_name": "BNR1",
"maintainer": "Binpad",
"bootloader": "atmel-dfu",
"debounce": 5,
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": false,
"encoder": true
},
"matrix_pins": {
"cols": ["B0"],
"rows": ["E6"]
},
"encoder": {
"rotary": [
{ "pin_a": "D6", "pin_b": "D7" }
]
},
"processor": "atmega32u4",
"url": "http://binepad.com",
"usb": {
"vid": "0x4249",
"pid": "0x4231",
"device_version": "1.0.0"
},
"layouts": {
"LAYOUT_all": {
silvinor marked this conversation as resolved.
Show resolved Hide resolved
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0, "w": 2, "h": 2}
]
}
}
}
10 changes: 10 additions & 0 deletions keyboards/binepad/bnr1/keymaps/binepad/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* Copyright 2022 Binepad (@binpad) */
silvinor marked this conversation as resolved.
Show resolved Hide resolved
/* SPDX-License-Identifier: GPL-2.0-or-later */

#pragma once

#define VIAL_KEYBOARD_UID {0xA8, 0xC7, 0x17, 0xD6, 0x19, 0xAB, 0x33, 0xB4}
#define VIAL_UNLOCK_COMBO_ROWS { 0 }
#define VIAL_UNLOCK_COMBO_COLS { 0 }

// #define TAPPING_TERM 175
38 changes: 38 additions & 0 deletions keyboards/binepad/bnr1/keymaps/binepad/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* Copyright 2022 Binepad (@binpad) */
/* SPDX-License-Identifier: GPL-2.0-or-later */

#include QMK_KEYBOARD_H

enum {
_L0,
_L1,
_L2,
_L3
} keyboard_layers;

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_L0] = LAYOUT_all(
LT(_L1, KC_MUTE)
),

[_L1] = LAYOUT_all(
_______
),

[_L2] = LAYOUT_all(
_______
),

[_L3] = LAYOUT_all(
_______
)
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[_L0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU ) },
[_L1] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP) },
[_L2] = { ENCODER_CCW_CW(_______, _______) },
[_L3] = { ENCODER_CCW_CW(_______, _______) }
};
#endif
12 changes: 12 additions & 0 deletions keyboards/binepad/bnr1/keymaps/binepad/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2022 Binepad (@binpad)
# SPDX-License-Identifier: GPL-2.0-or-later

LTO_ENABLE = yes
VIA_ENABLE = yes
VIAL_ENABLE = yes

ENCODER_MAP_ENABLE = yes

QMK_SETTINGS = no
KEY_OVERRIDE_ENABLE = no
COMBO_ENABLE = no
silvinor marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 9 additions & 0 deletions keyboards/binepad/bnr1/keymaps/binepad/vial.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
silvinor marked this conversation as resolved.
Show resolved Hide resolved
"lighting": "none",
"matrix":{ "rows":1, "cols":1 },
"layouts":{
"keymap":[
[{"c":"#777777"},"0,0\n\n\n\n\n\n\n\n\ne",{"x":0.25,"c":"#cccccc","w":2,"h":2},"0,0",{"x":0.25,"c":"#777777"},"0,1\n\n\n\n\n\n\n\n\ne"]
]
}
}
28 changes: 28 additions & 0 deletions keyboards/binepad/bnr1/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright 2022 Binepad (@binpad) */
/* SPDX-License-Identifier: GPL-2.0-or-later */

#include QMK_KEYBOARD_H

enum {
_L0,
_L1
} keyboard_layers;

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_L0] = LAYOUT_all(
LT(_L1, KC_MUTE)
),

[_L1] = LAYOUT_all(
_______
)
};

#if defined(ENCODER_MAP_ENABLE)

const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[_L0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_L1] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP) }
};

#endif
7 changes: 7 additions & 0 deletions keyboards/binepad/bnr1/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2022 Binepad (@binpad)
# SPDX-License-Identifier: GPL-2.0-or-later

LTO_ENABLE = yes
VIA_ENABLE = yes
silvinor marked this conversation as resolved.
Show resolved Hide resolved

ENCODER_MAP_ENABLE = yes
11 changes: 11 additions & 0 deletions keyboards/binepad/bnr1/keymaps/via/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* Copyright 2022 Binepad (@binpad) */
/* SPDX-License-Identifier: GPL-2.0-or-later */

#pragma once

#define TAPPING_TERM 175

#ifdef DYNAMIC_KEYMAP_LAYER_COUNT
#undef DYNAMIC_KEYMAP_LAYER_COUNT
#endif
#define DYNAMIC_KEYMAP_LAYER_COUNT 2
28 changes: 28 additions & 0 deletions keyboards/binepad/bnr1/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Copyright 2022 Binepad (@binpad) */
/* SPDX-License-Identifier: GPL-2.0-or-later */

#include QMK_KEYBOARD_H

enum {
_L0,
_L1
} keyboard_layers;

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_L0] = LAYOUT_all(
LT(_L1, KC_MUTE)
),

[_L1] = LAYOUT_all(
_______
)
};

#if defined(ENCODER_MAP_ENABLE)

const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[_L0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_L1] = { ENCODER_CCW_CW(KC_MS_WH_DOWN, KC_MS_WH_UP) }
};

#endif
7 changes: 7 additions & 0 deletions keyboards/binepad/bnr1/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2022 Binepad (@binpad)
# SPDX-License-Identifier: GPL-2.0-or-later

LTO_ENABLE = yes
VIA_ENABLE = yes

ENCODER_MAP_ENABLE = yes
23 changes: 23 additions & 0 deletions keyboards/binepad/bnr1/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# BINEPAD BNR1

The BNR1 is a multifunction knob, which can be rotated, pressed, and rotated while pressed.

* Keyboard Maintainer: [Binpad](https://github.com/binepad)
* Hardware Supported: BNR1 & BNR1 R2
* Hardware Availability: [Binepad.com](https://www.binepad.com/bnr1)

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

make binepad/bnr1: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).


## Bootloader

Enter the bootloader in 3 ways:

* **Bootmagic reset**: Hold down the knob while plugging in the keyboard's USB cable
* **Physical reset button**: Briefly press the button on the underside of the PCB
* **Keycode in layout**: Press the key mapped to `QK_BOOT` *(or `RESET`)* if it is available
2 changes: 2 additions & 0 deletions keyboards/binepad/bnr1/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# settings aree now in info.json
# .. or in keymap specific rules.mk
silvinor marked this conversation as resolved.
Show resolved Hide resolved