[Keyboard] Add tiny board 16 rgb keyboard (#20158)
Co-authored-by: jack <0x6a73@protonmail.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
parent
650a0b8ad4
commit
ac75242132
28
keyboards/ning/tiny_board/tb16_rgb/config.h
Normal file
28
keyboards/ning/tiny_board/tb16_rgb/config.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/* Copyright 2023 Ning (@ningjx)
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
#define RGB_DI_PIN B5
|
||||||
|
#define RGB_MATRIX_LED_COUNT 16
|
||||||
|
|
||||||
|
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||||
|
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||||
|
|
||||||
|
#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_TYPING_HEATMAP
|
||||||
|
#define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
|
||||||
|
|
||||||
|
|
48
keyboards/ning/tiny_board/tb16_rgb/info.json
Normal file
48
keyboards/ning/tiny_board/tb16_rgb/info.json
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"manufacturer": "Ning",
|
||||||
|
"keyboard_name": "TB16 RGB",
|
||||||
|
"maintainer": "ningjx",
|
||||||
|
"diode_direction": "COL2ROW",
|
||||||
|
"features": {
|
||||||
|
"bootmagic": true,
|
||||||
|
"command": false,
|
||||||
|
"console": false,
|
||||||
|
"extrakey": true,
|
||||||
|
"mousekey": true,
|
||||||
|
"nkro": true,
|
||||||
|
"rgb_matrix": true
|
||||||
|
},
|
||||||
|
"matrix_pins": {
|
||||||
|
"cols": ["B6", "B1", "B3", "B2"],
|
||||||
|
"rows": ["F7", "F6", "F5", "F4"]
|
||||||
|
},
|
||||||
|
"development_board": "promicro",
|
||||||
|
"url": "",
|
||||||
|
"usb": {
|
||||||
|
"device_version": "1.0.0",
|
||||||
|
"pid": "0x0000",
|
||||||
|
"vid": "0xFEED"
|
||||||
|
},
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_ortho_4x4": {
|
||||||
|
"layout": [
|
||||||
|
{ "matrix": [0, 0], "x": 0, "y": 0 },
|
||||||
|
{ "matrix": [0, 1], "x": 1, "y": 0 },
|
||||||
|
{ "matrix": [0, 2], "x": 2, "y": 0 },
|
||||||
|
{ "matrix": [0, 3], "x": 3, "y": 0 },
|
||||||
|
{ "matrix": [1, 0], "x": 0, "y": 1 },
|
||||||
|
{ "matrix": [1, 1], "x": 1, "y": 1 },
|
||||||
|
{ "matrix": [1, 2], "x": 2, "y": 1 },
|
||||||
|
{ "matrix": [1, 3], "x": 3, "y": 1 },
|
||||||
|
{ "matrix": [2, 0], "x": 0, "y": 2 },
|
||||||
|
{ "matrix": [2, 1], "x": 1, "y": 2 },
|
||||||
|
{ "matrix": [2, 2], "x": 2, "y": 2 },
|
||||||
|
{ "matrix": [2, 3], "x": 3, "y": 2 },
|
||||||
|
{ "matrix": [3, 0], "x": 0, "y": 3 },
|
||||||
|
{ "matrix": [3, 1], "x": 1, "y": 3 },
|
||||||
|
{ "matrix": [3, 2], "x": 2, "y": 3 },
|
||||||
|
{ "matrix": [3, 3], "x": 3, "y": 3 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
37
keyboards/ning/tiny_board/tb16_rgb/keymaps/default/keymap.c
Normal file
37
keyboards/ning/tiny_board/tb16_rgb/keymaps/default/keymap.c
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/* Copyright 2023 Ning (@ningjx)
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
* ┌───┬───┬───┬───┐
|
||||||
|
* │ 7 │ 8 │ 9 │RGB│
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ 4 │ 5 │ 6 │MOD│
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ 1 │ 2 │ 3 │ - │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ 0 │ . │Ent│ + │
|
||||||
|
* └───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_ortho_4x4(
|
||||||
|
KC_P7, KC_P8, KC_P9, RGB_TOG,
|
||||||
|
KC_P4, KC_P5, KC_P6, RGB_MODE_FORWARD,
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_PMNS,
|
||||||
|
KC_P0, KC_PDOT, KC_PENT, KC_PPLS
|
||||||
|
)
|
||||||
|
};
|
37
keyboards/ning/tiny_board/tb16_rgb/keymaps/ningjx/keymap.c
Normal file
37
keyboards/ning/tiny_board/tb16_rgb/keymaps/ningjx/keymap.c
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/* Copyright 2023 Ning (@ningjx)
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
* ┌───┬───┬───┬───┐
|
||||||
|
* │ 7 │ 8 │ 9 │RGB│
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ 4 │ 5 │ 6 │MOD│
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ 1 │ 2 │ 3 │ - │
|
||||||
|
* ├───┼───┼───┼───┤
|
||||||
|
* │ 0 │ . │Ent│ + │
|
||||||
|
* └───┴───┴───┴───┘
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT_ortho_4x4(
|
||||||
|
KC_P7, KC_P8, KC_P9, RGB_TOG,
|
||||||
|
KC_P4, KC_P5, KC_P6, RGB_MODE_FORWARD,
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_PMNS,
|
||||||
|
KC_P0, KC_PDOT, KC_PENT, KC_PPLS
|
||||||
|
)
|
||||||
|
};
|
26
keyboards/ning/tiny_board/tb16_rgb/readme.md
Normal file
26
keyboards/ning/tiny_board/tb16_rgb/readme.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# ning/tiny_board/tb16_rgb
|
||||||
|
|
||||||
|
|
||||||
|
A 4*4 tiny keyboard whith rgb lights.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Ning](https://github.com/ningjx)
|
||||||
|
* Hardware Supported: The PCB is designed by [Ning](https://github.com/ningjx),with ATMega32U4.
|
||||||
|
* Hardware Availability: https://oshwhub.com/iqirtryi/atmega32a-kb40
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make ning/tiny_board/tb16_rgb:default
|
||||||
|
|
||||||
|
Flashing example for this keyboard:
|
||||||
|
|
||||||
|
make ning/tiny_board/tb16_rgb: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:
|
||||||
|
|
||||||
|
* **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
|
||||||
|
|
1
keyboards/ning/tiny_board/tb16_rgb/rules.mk
Normal file
1
keyboards/ning/tiny_board/tb16_rgb/rules.mk
Normal file
@ -0,0 +1 @@
|
|||||||
|
RGB_MATRIX_DRIVER = WS2812
|
31
keyboards/ning/tiny_board/tb16_rgb/tb16_rgb.c
Normal file
31
keyboards/ning/tiny_board/tb16_rgb/tb16_rgb.c
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* Copyright 2023 Ning (@ningjx)
|
||||||
|
*
|
||||||
|
* 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 "quantum.h"
|
||||||
|
|
||||||
|
led_config_t g_led_config = { {
|
||||||
|
{ 0, 1, 2, 3 },
|
||||||
|
{ 4, 5, 6, 7 },
|
||||||
|
{ 8, 9, 10, 11 },
|
||||||
|
{ 12, 13, 14, 15 }
|
||||||
|
}, {
|
||||||
|
{0,0},{75,0},{150,0},{224,0},
|
||||||
|
{0,21},{75,21},{150,21},{224,21},
|
||||||
|
{0,42},{75,42},{150,42},{224,42},
|
||||||
|
{0,64},{75,64},{150,64},{224,64}
|
||||||
|
}, {
|
||||||
|
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
|
||||||
|
} };
|
Loading…
Reference in New Issue
Block a user