Skip to content

Commit

Permalink
Addition of the Binpad BN009 R2 3x3 macropad (vial-kb#387)
Browse files Browse the repository at this point in the history
* Add Binepad BN009 v2

* Align code to qmk upstream

* Merge R1 and R2 sources into one common source base
  • Loading branch information
silvinor authored and bclarke123 committed Mar 10, 2023
1 parent cdccca1 commit c3fb983
Show file tree
Hide file tree
Showing 23 changed files with 207 additions and 240 deletions.
16 changes: 0 additions & 16 deletions keyboards/binepad/bn009/bn009.c

This file was deleted.

28 changes: 0 additions & 28 deletions keyboards/binepad/bn009/bn009.h

This file was deleted.

70 changes: 0 additions & 70 deletions keyboards/binepad/bn009/config.h

This file was deleted.

43 changes: 30 additions & 13 deletions keyboards/binepad/bn009/info.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
{
"keyboard_name": "BN009",
"manufacturer": "Binepad",
"url": "https://binepad.com",
"maintainer": "binepad",
"usb": {
"vid": "0x4249",
"pid": "0x4295",
"device_version": "0.0.1"
},
"layouts": {
"LAYOUT": {
"layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}]
"manufacturer": "Binepad",
"keyboard_name": "BN009",
"maintainer": "binepad",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": false
},
"url": "http://binepad.com",
"usb": {
"vid": "0x4249",
"pid": "0x4295"
},
"layouts": {
"LAYOUT_ortho_3x3": {
"layout": [
{ "matrix": [0, 0], "x": 0, "y": 0, "label": "k00" },
{ "matrix": [0, 1], "x": 1, "y": 0, "label": "k01" },
{ "matrix": [0, 2], "x": 2, "y": 0, "label": "k02" },
{ "matrix": [1, 0], "x": 0, "y": 1, "label": "k10" },
{ "matrix": [1, 1], "x": 1, "y": 1, "label": "k11" },
{ "matrix": [1, 2], "x": 2, "y": 1, "label": "k12" },
{ "matrix": [2, 0], "x": 0, "y": 2, "label": "k20" },
{ "matrix": [2, 1], "x": 1, "y": 2, "label": "k21" },
{ "matrix": [2, 2], "x": 2, "y": 2, "label": "k22" }
]
}
}
}
}
42 changes: 0 additions & 42 deletions keyboards/binepad/bn009/keymaps/default/keymap.c

This file was deleted.

15 changes: 15 additions & 0 deletions keyboards/binepad/bn009/keymaps/default/keymap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"keyboard": "binepad/bn009",
"version": 1,
"author": "binepad",
"notes": "This file is a keymap.json file for binepad/bn009",
"keymap": "default",
"layout": "LAYOUT_ortho_3x3",
"layers": [
[
"KC_7", "KC_8", "KC_9",
"KC_4", "KC_5", "KC_6",
"KC_1", "KC_2", "KC_3"
]
]
}
1 change: 0 additions & 1 deletion keyboards/binepad/bn009/keymaps/default/readme.md

This file was deleted.

44 changes: 0 additions & 44 deletions keyboards/binepad/bn009/keymaps/via/keymap.c

This file was deleted.

1 change: 0 additions & 1 deletion keyboards/binepad/bn009/keymaps/via/rules.mk

This file was deleted.

13 changes: 13 additions & 0 deletions keyboards/binepad/bn009/keymaps/vial/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright 2023 Binepad
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#if defined(KEYBOARD_binepad_bn009_r1)
#define VIAL_KEYBOARD_UID {0x48, 0x7D, 0x01, 0xAC, 0xB2, 0x33, 0x46, 0x83}
#else // KEYBOARD_binepad_bn009_r2
#define VIAL_KEYBOARD_UID {0x48, 0x7D, 0x01, 0xAC, 0xB2, 0x33, 0x46, 0x84}
#endif

#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 }
#define VIAL_UNLOCK_COMBO_COLS { 0, 2 }
39 changes: 39 additions & 0 deletions keyboards/binepad/bn009/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright 2023 Binepad
// 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
)
};
5 changes: 5 additions & 0 deletions keyboards/binepad/bn009/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2022 Binepad (@binpad)
# SPDX-License-Identifier: GPL-2.0-or-later

VIA_ENABLE = yes
VIAL_ENABLE = yes
11 changes: 11 additions & 0 deletions keyboards/binepad/bn009/keymaps/vial/vial.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"lighting": "none",
"matrix": {"rows": 3, "cols": 3},
"layouts": {
"keymap": [
["0,0", "0,1", "0,2"],
["1,0", "1,1", "1,2"],
["2,0", "2,1", "2,2"]
]
}
}
11 changes: 11 additions & 0 deletions keyboards/binepad/bn009/r1/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2020 Binepad (@binepad)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "config_common.h"

/* 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
13 changes: 13 additions & 0 deletions keyboards/binepad/bn009/r1/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"keyboard_name": "BN009 R1",
"bootloader": "atmel-dfu",
"diode_direction": "COL2ROW",
"matrix_pins": {
"cols": ["D2", "D1", "D0"],
"rows": ["B6", "B5", "B4"]
},
"processor": "atmega32u4",
"usb": {
"device_version": "0.0.1"
}
}
3 changes: 3 additions & 0 deletions keyboards/binepad/bn009/r1/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# BINEPAD BN009 R1

* Hardware Supported: BN009 R1 *(ft. ATmega32U4)*
4 changes: 4 additions & 0 deletions keyboards/binepad/bn009/r1/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2020 Binepad (@binpad)
# SPDX-License-Identifier: GPL-2.0-or-later

LTO_ENABLE = yes
11 changes: 11 additions & 0 deletions keyboards/binepad/bn009/r2/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2023 Binepad (@binepad)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

/*
* 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.
Loading

0 comments on commit c3fb983

Please sign in to comment.