summaryrefslogtreecommitdiff
path: root/keyboards/binepad
diff options
context:
space:
mode:
authorVino Rodrigues <366673+vinorodrigues@users.noreply.github.com>2023-02-10 08:01:21 +1100
committerGitHub <noreply@github.com>2023-02-09 13:01:21 -0800
commit989f2476b6053fbb970a1560094b04b88d337891 (patch)
tree2a8a73b13748a2211312ea340dbbb44d80172f7f /keyboards/binepad
parent9c6b8fae404f4e31a898b01e47e9d53d9c0c8a45 (diff)
[Keyboard] Add Binepad BNR1 v2 rotary encoder (#19770)
Diffstat (limited to 'keyboards/binepad')
-rwxr-xr-xkeyboards/binepad/bnr1/info.json4
-rw-r--r--keyboards/binepad/bnr1/keymaps/default/rules.mk2
-rw-r--r--keyboards/binepad/bnr1/keymaps/via/rules.mk1
-rwxr-xr-xkeyboards/binepad/bnr1/readme.md8
-rwxr-xr-xkeyboards/binepad/bnr1/rules.mk4
-rw-r--r--keyboards/binepad/bnr1/v1/info.json10
-rw-r--r--keyboards/binepad/bnr1/v1/rules.mk4
-rw-r--r--keyboards/binepad/bnr1/v2/config.h9
-rwxr-xr-xkeyboards/binepad/bnr1/v2/info.json22
-rwxr-xr-xkeyboards/binepad/bnr1/v2/rules.mk7
10 files changed, 60 insertions, 11 deletions
diff --git a/keyboards/binepad/bnr1/info.json b/keyboards/binepad/bnr1/info.json
index c5f1c05cce..880209f6f1 100755
--- a/keyboards/binepad/bnr1/info.json
+++ b/keyboards/binepad/bnr1/info.json
@@ -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": {
diff --git a/keyboards/binepad/bnr1/keymaps/default/rules.mk b/keyboards/binepad/bnr1/keymaps/default/rules.mk
index 7f80bd39c6..1148b627d9 100644
--- a/keyboards/binepad/bnr1/keymaps/default/rules.mk
+++ b/keyboards/binepad/bnr1/keymaps/default/rules.mk
@@ -1,6 +1,4 @@
# Copyright 2022 Binepad (@binpad)
# SPDX-License-Identifier: GPL-2.0-or-later
-LTO_ENABLE = yes
-
ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/binepad/bnr1/keymaps/via/rules.mk b/keyboards/binepad/bnr1/keymaps/via/rules.mk
index 746edfaa56..254ffa32e8 100644
--- a/keyboards/binepad/bnr1/keymaps/via/rules.mk
+++ b/keyboards/binepad/bnr1/keymaps/via/rules.mk
@@ -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
diff --git a/keyboards/binepad/bnr1/readme.md b/keyboards/binepad/bnr1/readme.md
index 5a8afe2be9..7acc09127b 100755
--- a/keyboards/binepad/bnr1/readme.md
+++ b/keyboards/binepad/bnr1/readme.md
@@ -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).
diff --git a/keyboards/binepad/bnr1/rules.mk b/keyboards/binepad/bnr1/rules.mk
index b1b1126ff4..9719de29b8 100755
--- a/keyboards/binepad/bnr1/rules.mk
+++ b/keyboards/binepad/bnr1/rules.mk
@@ -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
diff --git a/keyboards/binepad/bnr1/v1/info.json b/keyboards/binepad/bnr1/v1/info.json
index 44edbf87d3..1797755549 100644
--- a/keyboards/binepad/bnr1/v1/info.json
+++ b/keyboards/binepad/bnr1/v1/info.json
@@ -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"
+ }
]
}
}
diff --git a/keyboards/binepad/bnr1/v1/rules.mk b/keyboards/binepad/bnr1/v1/rules.mk
index 6e7633bfe0..ac022b38ca 100644
--- a/keyboards/binepad/bnr1/v1/rules.mk
+++ b/keyboards/binepad/bnr1/v1/rules.mk
@@ -1 +1,3 @@
-# This file intentionally left blank
+# This file is mostly left blank
+
+LTO_ENABLE = yes
diff --git a/keyboards/binepad/bnr1/v2/config.h b/keyboards/binepad/bnr1/v2/config.h
new file mode 100644
index 0000000000..7fbf1cfab1
--- /dev/null
+++ b/keyboards/binepad/bnr1/v2/config.h
@@ -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)
diff --git a/keyboards/binepad/bnr1/v2/info.json b/keyboards/binepad/bnr1/v2/info.json
new file mode 100755
index 0000000000..03cee81b99
--- /dev/null
+++ b/keyboards/binepad/bnr1/v2/info.json
@@ -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"
+ }
+ ]
+ }
+}
diff --git a/keyboards/binepad/bnr1/v2/rules.mk b/keyboards/binepad/bnr1/v2/rules.mk
new file mode 100755
index 0000000000..a9a826d49f
--- /dev/null
+++ b/keyboards/binepad/bnr1/v2/rules.mk
@@ -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