Skip to content

Commit

Permalink
[Keyboard] Add Binepad BNR1 v2 rotary encoder (qmk#19770)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinorodrigues authored Feb 9, 2023
1 parent 9c6b8fa commit 989f247
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 11 deletions.
4 changes: 1 addition & 3 deletions keyboards/binepad/bnr1/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
},
"url": "http://binepad.com",
"usb": {
"vid": "0x4249",
"pid": "0x4231",
"device_version": "1.0.0"
"vid": "0x4249"
},
"community_layouts": ["ortho_1x1"],
"layouts": {
Expand Down
2 changes: 0 additions & 2 deletions keyboards/binepad/bnr1/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Copyright 2022 Binepad (@binpad)
# SPDX-License-Identifier: GPL-2.0-or-later

LTO_ENABLE = yes

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

LTO_ENABLE = yes
VIA_ENABLE = yes

ENCODER_MAP_ENABLE = yes
8 changes: 7 additions & 1 deletion keyboards/binepad/bnr1/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
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** *("V1" ft. ATMega32u4 MCU)*
* Hardware Supported:
* **BNR1** & **BNR1 R2** *("V1" ft. ATMega32u4 MCU)*
* **BNR1 V2** *("V2" ft. STM32F103 MCU)*
* Hardware Availability: [Binepad.com](https://www.binepad.com/bnr1)

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

make binepad/bnr1/v1:default

..or..

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

Expand Down
4 changes: 2 additions & 2 deletions keyboards/binepad/bnr1/rules.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This file intentionally left blank
# This file is mostly left blank

DEFAULT_FOLDER = binepad/bnr1/v1
DEFAULT_FOLDER = binepad/bnr1/v2
10 changes: 9 additions & 1 deletion keyboards/binepad/bnr1/v1/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
"bootloader": "atmel-dfu",
"processor": "atmega32u4",
"diode_direction": "COL2ROW",
"usb": {
"pid": "0x4231",
"device_version": "1.0.0"
},
"matrix_pins": {
"cols": ["B0"],
"rows": ["E6"]
},
"encoder": {
"enabled": true,
"rotary": [
{ "pin_a": "D6", "pin_b": "D7" }
{
"pin_a": "D6",
"pin_b": "D7"
}
]
}
}
4 changes: 3 additions & 1 deletion keyboards/binepad/bnr1/v1/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# This file intentionally left blank
# This file is mostly left blank

LTO_ENABLE = yes
9 changes: 9 additions & 0 deletions keyboards/binepad/bnr1/v2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2022 BINEPAD (@binepad)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "config_common.h"

#define WEAR_LEVELING_LOGICAL_SIZE 1024
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
22 changes: 22 additions & 0 deletions keyboards/binepad/bnr1/v2/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"bootloader": "stm32duino",
"processor": "STM32F103",
"diode_direction": "COL2ROW",
"usb": {
"pid": "0x4241",
"device_version": "2.0.0"
},
"matrix_pins": {
"cols": ["A15"],
"rows": ["A8"]
},
"encoder": {
"enabled": true,
"rotary": [
{
"pin_a": "B3",
"pin_b": "B4"
}
]
}
}
7 changes: 7 additions & 0 deletions keyboards/binepad/bnr1/v2/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file only contains EFL/WL settings and enables F103 low-power mode

EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = embedded_flash

# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE

0 comments on commit 989f247

Please sign in to comment.