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

add banime40 keyboard to keyboards #16694

Merged
merged 5 commits into from
Apr 13, 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
18 changes: 18 additions & 0 deletions keyboards/sporewoh/banime40/banime40.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
Copyright 2022 sporewoh

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "banime40.h"
drashna marked this conversation as resolved.
Show resolved Hide resolved
33 changes: 33 additions & 0 deletions keyboards/sporewoh/banime40/banime40.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
Copyright 2022 sporewoh

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once
drashna marked this conversation as resolved.
Show resolved Hide resolved

#include "quantum.h"

#define LAYOUT_ortho_4x10( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 \
) \
{ \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29}, \
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39} \
}
42 changes: 42 additions & 0 deletions keyboards/sporewoh/banime40/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
Copyright 2022 sporewoh

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xBEAF
#define PRODUCT_ID 0x0001
#define DEVICE_VER 0x0000
#define MANUFACTURER sporewoh
#define PRODUCT banime40

/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 10

/* pin-out for PCB */
#define MATRIX_ROW_PINS { E6, D7, C6, D4 }
#define MATRIX_COL_PINS { B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 }

#define UNUSED_PINS

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

#define DYNAMIC_KEYMAP_LAYER_COUNT 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is set to 10, then you need to have 10 layers defined for the VIA keymap. This way that all of the layers are populated proper on initialization, rather than filled with random junk.

That or, this needs to be set to 4 (or removed, as 4 is the default)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I've added the 6 missing layers (I might need more than 4 layers for a keyboard of this size 😳)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This board appears to be using an atmega32u4, which, at best is pushing the 1kb of eeprom space that the controller has.

Does the VIA keymap even compile?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the VIA keymap compiles and is fully usable in VIAL. I'm guessing one of the reasons why I can get away with it, despite using an ATmega32U4, is just due to the key count of the board

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. ~800 bytes for, plus ~35 for QMK stuff, leaving ~150 for macros. A close fit, but ...

50 changes: 50 additions & 0 deletions keyboards/sporewoh/banime40/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"keyboard_name": "banime40",
"url": "https://github.com/ChrisChrisLoLo/banime40",
"maintainer": "sporewoh",
"layouts": {
"LAYOUT_ortho_4x10": {
"layout": [
{"w":1, "x":0, "y":0},
{"w":1, "x":1, "y":0},
{"w":1, "x":2, "y":0},
{"w":1, "x":3, "y":0},
{"w":1, "x":4, "y":0},
{"w":1, "x":5, "y":0},
{"w":1, "x":6, "y":0},
{"w":1, "x":7, "y":0},
{"w":1, "x":8, "y":0},
{"w":1, "x":9, "y":0},
{"w":1, "x":0, "y":1},
{"w":1, "x":1, "y":1},
{"w":1, "x":2, "y":1},
{"w":1, "x":3, "y":1},
{"w":1, "x":4, "y":1},
{"w":1, "x":5, "y":1},
{"w":1, "x":6, "y":1},
{"w":1, "x":7, "y":1},
{"w":1, "x":8, "y":1},
{"w":1, "x":9, "y":1},
{"w":1, "x":0, "y":2},
{"w":1, "x":1, "y":2},
{"w":1, "x":2, "y":2},
{"w":1, "x":3, "y":2},
{"w":1, "x":4, "y":2},
{"w":1, "x":5, "y":2},
{"w":1, "x":6, "y":2},
{"w":1, "x":7, "y":2},
{"w":1, "x":8, "y":2},
{"w":1, "x":9, "y":2},
{"w":1, "x":0, "y":3},
{"w":1, "x":1, "y":3},
{"w":1, "x":2, "y":3},
{"w":1, "x":3, "y":3},
{"w":1, "x":4, "y":3},
{"w":1, "x":5, "y":3},
{"w":1, "x":6, "y":3},
{"w":1, "x":7, "y":3},
{"w":1, "x":8, "y":3},
{"w":1, "x":9, "y":3}]
}
}
}
41 changes: 41 additions & 0 deletions keyboards/sporewoh/banime40/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
Copyright 2022 sporewoh

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H
drashna marked this conversation as resolved.
Show resolved Hide resolved

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x10(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3,KC_MINS),
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(4,KC_SLSH),
KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, LT(2,KC_BSPC), LT(1,KC_SPC), KC_ENT, KC_APP, KC_DEL, KC_ESC),
[1] = LAYOUT_ortho_4x10(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_TAB, KC_NO, KC_NO, KC_GRV, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_MINS,
KC_NO, KC_NO, KC_NO, KC_NO, KC_EQL, KC_MINS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_ortho_4x10(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
KC_TAB, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NLCK, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
[3] = LAYOUT_ortho_4x10(
KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_DEL,
KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)
};
41 changes: 41 additions & 0 deletions keyboards/sporewoh/banime40/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
Copyright 2022 sporewoh

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H
drashna marked this conversation as resolved.
Show resolved Hide resolved

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x10(
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3,KC_MINS),
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(4,KC_SLSH),
KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, LT(2,KC_BSPC), LT(1,KC_SPC), KC_ENT, KC_APP, KC_DEL, KC_ESC),
[1] = LAYOUT_ortho_4x10(
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
KC_TAB, KC_NO, KC_NO, KC_GRV, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_MINS,
KC_NO, KC_NO, KC_NO, KC_NO, KC_EQL, KC_MINS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[2] = LAYOUT_ortho_4x10(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
KC_TAB, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NLCK, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
[3] = LAYOUT_ortho_4x10(
KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_DEL,
KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)
};
2 changes: 2 additions & 0 deletions keyboards/sporewoh/banime40/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
27 changes: 27 additions & 0 deletions keyboards/sporewoh/banime40/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# banime40

<img src="https://raw.githubusercontent.com/ChrisChrisLoLo/banime40/master/docs/images/IMG_20220319_144006.jpg" width="500">
fauxpark marked this conversation as resolved.
Show resolved Hide resolved

A hotswap gasket mount 4x10 that can support multiple layouts.

* Keyboard Maintainer: [sporewoh](https://github.com/ChrisChrisLoLo)
* Hardware Supported: Open source PCB files, Pro Micro compatible
* Hardware Availability: PCBs and Case files available [here](https://github.com/ChrisChrisLoLo/banime40)

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

make sporewoh/banime40:default

Flashing example for this keyboard:

make sporewoh/banime40: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 2 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
20 changes: 20 additions & 0 deletions keyboards/sporewoh/banime40/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
BOOTLOADER = caterina

# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output

LAYOUTS = ortho_4x10