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 Binpad BN009 R2 3x3 macropad #19992

Merged
merged 9 commits into from
Mar 11, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
13 changes: 13 additions & 0 deletions keyboards/binepad/bn009r2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright 2023 Binepad (@binepad)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define HOLD_ON_OTHER_KEY_PRESS
vinorodrigues marked this conversation as resolved.
Show resolved Hide resolved

/*
* Wear Leveling EEPROM Emulation
*/

#define WEAR_LEVELING_LOGICAL_SIZE 2048 // Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2) // Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
42 changes: 42 additions & 0 deletions keyboards/binepad/bn009r2/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"manufacturer": "Binepad",
"keyboard_name": "BN009 R2",
"maintainer": "binepad",
"bootloader": "stm32duino",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": false
},
"matrix_pins": {
"cols": ["A1", "A2", "A6"],
"rows": ["B6", "B7", "B2"]
},
"processor": "STM32F103",
"url": "http://binepad.com",
"usb": {
"vid": "0x4249",
"pid": "0x4295",
"device_version": "2.0.0"
},
"community_layouts": ["ortho_3x3"],
"layouts": {
"LAYOUT_ortho_3x3": {
"layout": [
{ "matrix": [0, 0], "x": 0, "y": 0 },
{ "matrix": [0, 1], "x": 1, "y": 0 },
{ "matrix": [0, 2], "x": 2, "y": 0 },
{ "matrix": [1, 0], "x": 0, "y": 1 },
{ "matrix": [1, 1], "x": 1, "y": 1 },
{ "matrix": [1, 2], "x": 2, "y": 1 },
{ "matrix": [2, 0], "x": 0, "y": 2 },
{ "matrix": [2, 1], "x": 1, "y": 2 },
{ "matrix": [2, 2], "x": 2, "y": 2 }
]
}
}
}
15 changes: 15 additions & 0 deletions keyboards/binepad/bn009r2/keymaps/default/keymap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"keyboard": "binepad/bn009r2",
"version": 1,
"author": "binepad",
"notes": "This file is a keymap.json file for binepad/bn009r2",
"keymap": "default_json",
vinorodrigues marked this conversation as resolved.
Show resolved Hide resolved
"layout": "LAYOUT_ortho_3x3",
"layers": [
[
"KC_7", "KC_8", "KC_9",
"KC_4", "KC_5", "KC_6",
"KC_1", "KC_2", "KC_3"
]
]
}
39 changes: 39 additions & 0 deletions keyboards/binepad/bn009r2/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright 2023 Binepad
vinorodrigues marked this conversation as resolved.
Show resolved Hide resolved
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌───┬───┬───┐
* │ A │ B │ C │
* ├───┼───┼───┤
* │ D │ E │ F │
* ├───┼───┼───┤
* │ G │ H │ I │
* └───┴───┴───┘
*/
[0] = LAYOUT_ortho_3x3(
KC_7, KC_8, KC_9,
KC_4, KC_5, KC_6,
KC_1, KC_2, KC_3
),

[1] = LAYOUT_ortho_3x3(
KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO
),

[2] = LAYOUT_ortho_3x3(
KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO
),

[3] = LAYOUT_ortho_3x3(
KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO
)
};
4 changes: 4 additions & 0 deletions keyboards/binepad/bn009r2/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2022 Binepad (@binpad)
# SPDX-License-Identifier: GPL-2.0-or-later

VIA_ENABLE = yes
27 changes: 27 additions & 0 deletions keyboards/binepad/bn009r2/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# BINEPAD BN009 R2

![BINEPAD BN009](https://imgur.com/fu0iXD0h.jpg)

*A 9% macropad*

* Keyboard Maintainer: [binepad](https://github.com/binepad)
* Hardware Supported: BN009 *(ft. STM32F103)*
* Hardware Availability: [binepad.com](https://www.binepad.com/bn009)

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

make binepad/bn009r2:default

Flashing example for this keyboard:

make binepad/bn009r2:default:flash

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 key at (0,0) in the matrix (usually the top left key) and plug in the keyboard
* **Physical reset button**: Briefly press the button under the small hole on the back of the macropad
* **Keycode in layout**: Press the key mapped to `QK_BOOT` or `RESET` if it is available
5 changes: 5 additions & 0 deletions keyboards/binepad/bn009r2/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2022 Binepad (@binpad)
vinorodrigues marked this conversation as resolved.
Show resolved Hide resolved
# SPDX-License-Identifier: GPL-2.0-or-later

EPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = embedded_flash