Add Doio KB04 (#22754)

Co-authored-by: Joel Challis <git@zvecr.com>
This commit is contained in:
adophoxia 2024-01-31 23:46:08 -08:00 committed by GitHub
parent 276130bdef
commit 382c3bd0bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 238 additions and 0 deletions

View File

@ -0,0 +1,111 @@
{
"manufacturer": "DOIO",
"keyboard_name": "KB04-01",
"maintainer": "filmstarr",
"bootloader": "stm32duino",
"build": {
"lto": true
},
"diode_direction": "COL2ROW",
"encoder": {
"rotary": [
{"pin_a": "B5", "pin_b": "B6"}
]
},
"features": {
"bootmagic": true,
"command": false,
"console": false,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": false,
"rgb_matrix": true
},
"matrix_pins": {
"cols": ["B14", "B13", "B12", "B0", "A7"],
"rows": ["B3"]
},
"processor": "STM32F103",
"rgb_matrix": {
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
"gradient_left_right": true,
"breathing": true,
"band_sat": true,
"band_val": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"rainbow_moving_chevron": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"dual_beacon": true,
"rainbow_beacon": true,
"rainbow_pinwheels": true,
"raindrops": true,
"jellybean_raindrops": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"pixel_fractal": true,
"pixel_flow": true,
"pixel_rain": true,
"typing_heatmap": true,
"digital_rain": true,
"solid_reactive_simple": true,
"solid_reactive": true,
"solid_reactive_wide": true,
"solid_reactive_multiwide": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_nexus": true,
"solid_reactive_multinexus": true,
"splash": true,
"multisplash": true,
"solid_splash": true,
"solid_multisplash": true
},
"driver": "ws2812",
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 1},
{"matrix": [0, 1], "x": 75, "y": 0, "flags": 1},
{"matrix": [0, 2], "x": 149, "y": 0, "flags": 1},
{"matrix": [0, 3], "x": 224, "y": 0, "flags": 1},
{"x": 112, "y": 64, "flags": 1},
{"x": 112, "y": 64, "flags": 1},
{"x": 112, "y": 64, "flags": 1},
{"x": 112, "y": 64, "flags": 1}
],
"max_brightness": 200,
"sleep": true
},
"url": "https://www.keebmonkey.com/products/megalodon-macro-pad-with-a-knob",
"usb": {
"device_version": "0.0.1",
"pid": "0x0401",
"vid": "0xD010"
},
"ws2812": {
"pin": "A10"
},
"layouts": {
"LAYOUT": {
"layout": [
{"label": "1!", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "2@", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "3#", "matrix": [0, 2], "x": 2, "y": 0},
{"label": "4$", "matrix": [0, 3], "x": 3, "y": 0},
{"label": "Encoder", "matrix": [0, 4], "x": 1.5, "y": 1}
]
}
}
}

View File

@ -0,0 +1,48 @@
/* Copyright 2022 filmstarr <https://github.com/filmstarr>
*
* 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
enum layer_names {
_LAY0,
_LAY1
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
L0:
MO1PrvPlyNxt Mut
L1:
HudTogMod
*/
[_LAY0] = LAYOUT(
MO(_LAY1), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE
),
[_LAY1] = LAYOUT(
KC_TRNS, RGB_HUD, RGB_TOG, RGB_MOD, KC_TRNS
)
};
#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_LAY0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_LAY1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
};
#endif

View File

@ -0,0 +1 @@
ENCODER_MAP_ENABLE = yes

View File

@ -0,0 +1,48 @@
/* Copyright 2022 filmstarr <https://github.com/filmstarr>
*
* 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
enum layer_names {
_LAY0,
_LAY1
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
L0:
MO1PrvPlyNxt Mut
L1:
HudTogMod
*/
[_LAY0] = LAYOUT(
MO(_LAY1), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE
),
[_LAY1] = LAYOUT(
KC_TRNS, RGB_HUD, RGB_TOG, RGB_MOD, KC_TRNS
)
};
#ifdef ENCODER_MAP_ENABLE
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[_LAY0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[_LAY1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
};
#endif

View File

@ -0,0 +1,2 @@
VIA_ENABLE = yes
ENCODER_MAP_ENABLE = yes

View File

@ -0,0 +1,27 @@
# doio/kb04
![doio/kb04](https://i.imgur.com/lqABZw4h.png)
A macropad that have 4-key keyboard made by DOIO, which controlled by an APM32F103CBT6 chipset. The keyboard features per-key RGB and 1 encoder.
* Keyboard Maintainer: [filmstarr](https://github.com/filmstarr)
* Hardware Supported: DOIO Knob Board - KB04
* Hardware Availability: [keebmonkey.com](https://www.keebmonkey.com/products/megalodon-macro-pad-with-a-knob)
Make example for this keyboard (after setting up your build environment):
qmk compile -kb doio/kb04 -km default
Flashing example for this keyboard:
qmk flash -kb doio/kb04 -km 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).
## Bootloader
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (1! key) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available

View File

@ -0,0 +1 @@
# This file intentionally left blank