[Keyboard] add tofu_ii keyboard (#19118)
Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Ryan <fauxpark@gmail.com>master
parent
7578daaf16
commit
7cf3dd7b8d
@ -0,0 +1,5 @@ |
|||||||
|
{ |
||||||
|
"keyboard_name": "TOFU_II", |
||||||
|
"manufacturer": "DZTECH", |
||||||
|
"maintainer": "DZTECH" |
||||||
|
} |
@ -0,0 +1,32 @@ |
|||||||
|
/* Copyright 2022 DZTECH <moyi4681@live.cn>
|
||||||
|
* |
||||||
|
* 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] = { |
||||||
|
[0] = LAYOUT( |
||||||
|
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, |
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, |
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, |
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, |
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), |
||||||
|
[1] = LAYOUT( |
||||||
|
QK_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, |
||||||
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGUP, |
||||||
|
KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_PGDN, |
||||||
|
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), |
||||||
|
}; |
@ -0,0 +1,44 @@ |
|||||||
|
/* Copyright 2022 DZTECH <moyi4681@live.cn>
|
||||||
|
* |
||||||
|
* 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] = { |
||||||
|
[0] = LAYOUT( |
||||||
|
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, |
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, |
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, |
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, |
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), |
||||||
|
[1] = LAYOUT( |
||||||
|
QK_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, |
||||||
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS, QK_BOOT, KC_PGUP, |
||||||
|
KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EE_CLR, KC_PGDN, |
||||||
|
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), |
||||||
|
[2] = LAYOUT( |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), |
||||||
|
[3] = LAYOUT( |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), |
||||||
|
}; |
@ -0,0 +1 @@ |
|||||||
|
VIA_ENABLE = yes
|
@ -0,0 +1,22 @@ |
|||||||
|
# TOFU_II |
||||||
|
A customizable 66 key RGB keyboard. |
||||||
|
|
||||||
|
* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) |
||||||
|
* Hardware Supported: TOFU_II |
||||||
|
* Hardware Availability: [KBDfans](https://kbdfans.com/) |
||||||
|
|
||||||
|
## Bootloader mode |
||||||
|
|
||||||
|
Enter the bootloader in 3 ways: |
||||||
|
|
||||||
|
* Bootmagic reset: Hold down the left top key then plug in the USB cable. |
||||||
|
* Physical reset button: Double tap the reset button. |
||||||
|
* Keycode in layout: Press the key mapped to QK_BOOT if it is available. |
||||||
|
|
||||||
|
## Making firmware |
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment): |
||||||
|
|
||||||
|
make dztech/tofu/ii/v1: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). |
@ -0,0 +1 @@ |
|||||||
|
DEFAULT_FOLDER = dztech/tofu/ii/v1
|
@ -0,0 +1,88 @@ |
|||||||
|
/* Copyright 2022 DZTECH <moyi4681@live.cn>
|
||||||
|
* |
||||||
|
* 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 I2C1_SDA_PIN GP2 |
||||||
|
#define I2C1_SCL_PIN GP3 |
||||||
|
#define I2C_DRIVER I2CD2 |
||||||
|
|
||||||
|
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET |
||||||
|
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U |
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE |
||||||
|
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||||
|
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||||
|
# define USB_SUSPEND_WAKEUP_DELAY 5000 |
||||||
|
# define RGB_MATRIX_KEYPRESSES |
||||||
|
# define RGB_MATRIX_LED_PROCESS_LIMIT 4 |
||||||
|
# define RGB_MATRIX_LED_FLUSH_LIMIT 26 |
||||||
|
// RGB Matrix Animation modes. Explicitly enabled
|
||||||
|
// For full list of effects, see:
|
||||||
|
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
|
||||||
|
# define ENABLE_RGB_MATRIX_ALPHAS_MODS |
||||||
|
# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN |
||||||
|
# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT |
||||||
|
# define ENABLE_RGB_MATRIX_BREATHING |
||||||
|
# define ENABLE_RGB_MATRIX_BAND_SAT |
||||||
|
# define ENABLE_RGB_MATRIX_BAND_VAL |
||||||
|
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT |
||||||
|
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL |
||||||
|
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT |
||||||
|
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL |
||||||
|
# define ENABLE_RGB_MATRIX_CYCLE_ALL |
||||||
|
# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT |
||||||
|
# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN |
||||||
|
# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON |
||||||
|
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN |
||||||
|
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL |
||||||
|
# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL |
||||||
|
# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL |
||||||
|
# define ENABLE_RGB_MATRIX_DUAL_BEACON |
||||||
|
# define ENABLE_RGB_MATRIX_RAINBOW_BEACON |
||||||
|
# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS |
||||||
|
# define ENABLE_RGB_MATRIX_RAINDROPS |
||||||
|
# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS |
||||||
|
# define ENABLE_RGB_MATRIX_HUE_BREATHING |
||||||
|
# define ENABLE_RGB_MATRIX_HUE_PENDULUM |
||||||
|
# define ENABLE_RGB_MATRIX_HUE_WAVE |
||||||
|
# define ENABLE_RGB_MATRIX_PIXEL_RAIN |
||||||
|
# define ENABLE_RGB_MATRIX_PIXEL_FLOW |
||||||
|
# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL |
||||||
|
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
|
||||||
|
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP |
||||||
|
# define ENABLE_RGB_MATRIX_DIGITAL_RAIN |
||||||
|
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
|
||||||
|
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE |
||||||
|
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE |
||||||
|
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE |
||||||
|
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE |
||||||
|
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS |
||||||
|
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS |
||||||
|
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS |
||||||
|
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS |
||||||
|
# define ENABLE_RGB_MATRIX_SPLASH |
||||||
|
# define ENABLE_RGB_MATRIX_MULTISPLASH |
||||||
|
# define ENABLE_RGB_MATRIX_SOLID_SPLASH |
||||||
|
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH |
||||||
|
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||||
|
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_ALL |
||||||
|
# define DRIVER_ADDR_1 0b1010000 |
||||||
|
# define DRIVER_ADDR_2 0b1011111 |
||||||
|
# define DRIVER_COUNT 2 |
||||||
|
# define DRIVER_1_LED_TOTAL 46 |
||||||
|
# define DRIVER_2_LED_TOTAL 20 |
||||||
|
# define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) |
||||||
|
#endif |
@ -0,0 +1,21 @@ |
|||||||
|
/* Copyright 2022 DZTECH <moyi4681@live.cn>
|
||||||
|
* |
||||||
|
* 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 HAL_USE_I2C TRUE |
||||||
|
|
||||||
|
#include_next <halconf.h> |
@ -0,0 +1,167 @@ |
|||||||
|
{ |
||||||
|
"bootloader": "rp2040", |
||||||
|
"debounce": 5, |
||||||
|
"diode_direction": "COL2ROW", |
||||||
|
"features": { |
||||||
|
"bootmagic": true, |
||||||
|
"command": false, |
||||||
|
"console": false, |
||||||
|
"extrakey": true, |
||||||
|
"mousekey": true, |
||||||
|
"nkro": true, |
||||||
|
"rgb_matrix": true |
||||||
|
}, |
||||||
|
"matrix_pins": { |
||||||
|
"cols": ["GP25", "GP24", "GP23", "GP1", "GP7", "GP21", "GP20", "GP19", "GP18", "GP17", "GP16", "GP15", "GP14", "GP13", "GP12"], |
||||||
|
"rows": ["GP0", "GP28", "GP27", "GP26", "GP22"] |
||||||
|
}, |
||||||
|
"processor": "RP2040", |
||||||
|
"rgb_matrix": { |
||||||
|
"driver": "IS31FL3737", |
||||||
|
"layout": [ |
||||||
|
{ "flags": 1, "matrix": [0, 0], "x": 0, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 1], "x": 15, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 2], "x": 30, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 3], "x": 45, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 4], "x": 60, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 5], "x": 75, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 6], "x": 90, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 7], "x": 105, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 8], "x": 120, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 9], "x": 135, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 10], "x": 150, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 11], "x": 165, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 12], "x": 180, "y": 0 }, |
||||||
|
{ "flags": 4, "matrix": [0, 13], "x": 203, "y": 0 }, |
||||||
|
{ "flags": 1, "matrix": [0, 14], "x": 224, "y": 0 }, |
||||||
|
{ "flags": 1, "matrix": [1, 0], "x": 4, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 1], "x": 23, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 2], "x": 38, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 3], "x": 53, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 4], "x": 68, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 5], "x": 83, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 6], "x": 98, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 7], "x": 113, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 8], "x": 128, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 9], "x": 143, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 10], "x": 158, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 11], "x": 173, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 12], "x": 188, "y": 16 }, |
||||||
|
{ "flags": 4, "matrix": [1, 13], "x": 206, "y": 16 }, |
||||||
|
{ "flags": 1, "matrix": [1, 14], "x": 224, "y": 16 }, |
||||||
|
{ "flags": 1, "matrix": [2, 0], "x": 6, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 1], "x": 26, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 2], "x": 41, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 3], "x": 56, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 4], "x": 71, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 5], "x": 86, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 6], "x": 101, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 7], "x": 116, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 8], "x": 131, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 9], "x": 146, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 10], "x": 161, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 11], "x": 176, "y": 32 }, |
||||||
|
{ "flags": 4, "matrix": [2, 12], "x": 201, "y": 32 }, |
||||||
|
{ "flags": 1, "matrix": [2, 14], "x": 224, "y": 32 }, |
||||||
|
{ "flags": 1, "matrix": [3, 0], "x": 9, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 1], "x": 34, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 2], "x": 49, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 3], "x": 64, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 4], "x": 79, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 5], "x": 94, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 6], "x": 109, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 7], "x": 124, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 8], "x": 139, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 9], "x": 154, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 10], "x": 169, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 11], "x": 189, "y": 48 }, |
||||||
|
{ "flags": 4, "matrix": [3, 13], "x": 210, "y": 48 }, |
||||||
|
{ "flags": 1, "matrix": [4, 0], "x": 2, "y": 64 }, |
||||||
|
{ "flags": 1, "matrix": [4, 1], "x": 21, "y": 64 }, |
||||||
|
{ "flags": 1, "matrix": [4, 2], "x": 39, "y": 64 }, |
||||||
|
{ "flags": 4, "matrix": [4, 6], "x": 96, "y": 64 }, |
||||||
|
{ "flags": 1, "matrix": [4, 8], "x": 151, "y": 64 }, |
||||||
|
{ "flags": 1, "matrix": [4, 10], "x": 170, "y": 64 }, |
||||||
|
{ "flags": 1, "matrix": [4, 12], "x": 195, "y": 64 }, |
||||||
|
{ "flags": 1, "matrix": [4, 13], "x": 210, "y": 64 }, |
||||||
|
{ "flags": 1, "matrix": [4, 14], "x": 224, "y": 64 } |
||||||
|
] |
||||||
|
}, |
||||||
|
"usb": { |
||||||
|
"device_version": "1.0.0", |
||||||
|
"pid": "0x1427", |
||||||
|
"vid": "0x445A" |
||||||
|
}, |
||||||
|
"layouts": { |
||||||
|
"LAYOUT": { |
||||||
|
"layout": [ |
||||||
|
{ "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, |
||||||
|
{ "matrix": [0, 1], "w": 1, "x": 1, "y": 0 }, |
||||||
|
{ "matrix": [0, 2], "w": 1, "x": 2, "y": 0 }, |
||||||
|
{ "matrix": [0, 3], "w": 1, "x": 3, "y": 0 }, |
||||||
|
{ "matrix": [0, 4], "w": 1, "x": 4, "y": 0 }, |
||||||
|
{ "matrix": [0, 5], "w": 1, "x": 5, "y": 0 }, |
||||||
|
{ "matrix": [0, 6], "w": 1, "x": 6, "y": 0 }, |
||||||
|
{ "matrix": [0, 7], "w": 1, "x": 7, "y": 0 }, |
||||||
|
{ "matrix": [0, 8], "w": 1, "x": 8, "y": 0 }, |
||||||
|
{ "matrix": [0, 9], "w": 1, "x": 9, "y": 0 }, |
||||||
|
{ "matrix": [0, 10], "w": 1, "x": 10, "y": 0 }, |
||||||
|
{ "matrix": [0, 11], "w": 1, "x": 11, "y": 0 }, |
||||||
|
{ "matrix": [0, 12], "w": 1, "x": 12, "y": 0 }, |
||||||
|
{ "matrix": [0, 13], "w": 2, "x": 13, "y": 0 }, |
||||||
|
{ "matrix": [0, 14], "w": 1, "x": 15, "y": 0 }, |
||||||
|
{ "matrix": [1, 0], "w": 1.5, "x": 0, "y": 1 }, |
||||||
|
{ "matrix": [1, 1], "w": 1, "x": 1.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 2], "w": 1, "x": 2.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 3], "w": 1, "x": 3.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 4], "w": 1, "x": 4.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 5], "w": 1, "x": 5.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 6], "w": 1, "x": 6.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 7], "w": 1, "x": 7.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 8], "w": 1, "x": 8.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 9], "w": 1, "x": 9.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 10], "w": 1, "x": 10.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 11], "w": 1, "x": 11.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 12], "w": 1, "x": 12.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 13], "w": 1.5, "x": 13.5, "y": 1 }, |
||||||
|
{ "matrix": [1, 14], "w": 1, "x": 15, "y": 1 }, |
||||||
|
{ "matrix": [2, 0], "w": 1.75, "x": 0, "y": 2 }, |
||||||
|
{ "matrix": [2, 1], "w": 1, "x": 1.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 2], "w": 1, "x": 2.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 3], "w": 1, "x": 3.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 4], "w": 1, "x": 4.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 5], "w": 1, "x": 5.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 6], "w": 1, "x": 6.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 7], "w": 1, "x": 7.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 8], "w": 1, "x": 8.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 9], "w": 1, "x": 9.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 10], "w": 1, "x": 10.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 11], "w": 1, "x": 11.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 12], "w": 2.25, "x": 12.75, "y": 2 }, |
||||||
|
{ "matrix": [2, 14], "w": 1, "x": 15, "y": 2 }, |
||||||
|
{ "matrix": [3, 0], "w": 2.25, "x": 0, "y": 3 }, |
||||||
|
{ "matrix": [3, 1], "w": 1, "x": 2.25, "y": 3 }, |
||||||
|
{ "matrix": [3, 2], "w": 1, "x": 3.25, "y": 3 }, |
||||||
|
{ "matrix": [3, 3], "w": 1, "x": 4.25, "y": 3 }, |
||||||
|
{ "matrix": [3, 4], "w": 1, "x": 5.25, "y": 3 }, |
||||||
|
{ "matrix": [3, 5], "w": 1, "x": 6.25, "y": 3 }, |
||||||
|
{ "matrix": [3, 6], "w": 1, "x": 7.25, "y": 3 }, |
||||||
|
{ "matrix": [3, 7], "w": 1, "x": 8.25, "y": 3 }, |
||||||
|
{ "matrix": [3, 8], "w": 1, "x": 9.25, "y": 3 }, |
||||||
|
{ "matrix": [3, 9], "w": 1, "x": 10.25, "y": 3 }, |
||||||
|
{ "matrix": [3, 10], "w": 1, "x": 11.25, "y": 3 }, |
||||||
|
{ "matrix": [3, 11], "w": 1.75, "x": 12.25, "y": 3 }, |
||||||
|
{ "matrix": [3, 13], "w": 1, "x": 14, "y": 3 }, |
||||||
|
{ "matrix": [4, 0], "w": 1.25, "x": 0, "y": 4 }, |
||||||
|
{ "matrix": [4, 1], "w": 1.25, "x": 1.25, "y": 4 }, |
||||||
|
{ "matrix": [4, 2], "w": 1.25, "x": 2.5, "y": 4 }, |
||||||
|
{ "matrix": [4, 6], "w": 6.25, "x": 3.75, "y": 4 }, |
||||||
|
{ "matrix": [4, 8], "w": 1.25, "x":10, "y":4 }, |
||||||
|
{ "matrix": [4, 10], "w": 1.25, "x": 11.25, "y": 4 }, |
||||||
|
{ "matrix": [4, 12], "w": 1, "x": 13, "y": 4 }, |
||||||
|
{ "matrix": [4, 13], "w": 1, "x": 14, "y": 4 }, |
||||||
|
{ "matrix": [4, 14], "w": 1, "x": 15, "y": 4 } |
||||||
|
] |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,22 @@ |
|||||||
|
/* Copyright 2022 DZTECH <moyi4681@live.cn>
|
||||||
|
* |
||||||
|
* 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_next <mcuconf.h> |
||||||
|
|
||||||
|
#undef RP_I2C_USE_I2C1 |
||||||
|
#define RP_I2C_USE_I2C1 TRUE |
@ -0,0 +1,22 @@ |
|||||||
|
# TOFU_II |
||||||
|
A customizable 66 key RGB keyboard. |
||||||
|
|
||||||
|
* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681) |
||||||
|
* Hardware Supported: TOFU_II |
||||||
|
* Hardware Availability: [KBDfans](https://kbdfans.com/) |
||||||
|
|
||||||
|
## Bootloader mode |
||||||
|
|
||||||
|
Enter the bootloader in 3 ways: |
||||||
|
|
||||||
|
* Bootmagic reset: Hold down the left top key then plug in the USB cable. |
||||||
|
* Physical reset button: Double tap the reset button. |
||||||
|
* Keycode in layout: Press the key mapped to QK_BOOT if it is available. |
||||||
|
|
||||||
|
## Making firmware |
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment): |
||||||
|
|
||||||
|
make dztech/tofu/ii: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). |
@ -0,0 +1,103 @@ |
|||||||
|
/* Copyright 2022 DZTECH <moyi4681@live.cn>
|
||||||
|
* |
||||||
|
* 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" |
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE |
||||||
|
|
||||||
|
const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { |
||||||
|
{ 1, K_12, J_12, L_12 }, |
||||||
|
{ 1, K_11, J_11, L_11 }, |
||||||
|
{ 1, K_10, J_10, L_10 }, |
||||||
|
{ 1, K_9, J_9, L_9 }, |
||||||
|
{ 1, K_8, J_8, L_8 }, |
||||||
|
{ 1, K_7, J_7, L_7 }, |
||||||
|
{ 1, K_6, J_6, L_6 }, |
||||||
|
{ 1, K_5, J_5, L_5 }, |
||||||
|
{ 1, K_4, J_4, L_4 }, |
||||||
|
{ 1, K_3, J_3, L_3 }, |
||||||
|
{ 1, K_2, J_2, L_2 }, |
||||||
|
{ 1, K_1, J_1, L_1 }, |
||||||
|
{ 1, H_1, G_1, I_1 }, |
||||||
|
{ 1, H_2, G_2, I_2 }, |
||||||
|
{ 1, H_3, G_3, I_3 }, |
||||||
|
|
||||||
|
{ 0, B_12, A_12, C_12 }, |
||||||
|
{ 0, B_11, A_11, C_11 }, |
||||||
|
{ 0, B_10, A_10, C_10 }, |
||||||
|
{ 0, B_9, A_9, C_9 }, |
||||||
|
{ 0, B_8, A_8, C_8 }, |
||||||
|
{ 0, B_7, A_7, C_7 }, |
||||||
|
{ 0, B_6, A_6, C_6 }, |
||||||
|
{ 0, B_5, A_5, C_5 }, |
||||||
|
{ 0, B_4, A_4, C_4 }, |
||||||
|
{ 0, B_3, A_3, C_3 }, |
||||||
|
{ 0, B_2, A_2, C_2 }, |
||||||
|
{ 0, B_1, A_1, C_1 }, |
||||||
|
{ 1, H_6, G_6, I_6 }, |
||||||
|
{ 1, H_5, G_5, I_5 }, |
||||||
|
{ 1, H_4, G_4, I_4 }, |
||||||
|
|
||||||
|
{ 0, E_12, D_12, F_12 }, |
||||||
|
{ 0, E_11, D_11, F_11 }, |
||||||
|
{ 0, E_10, D_10, F_10 }, |
||||||
|
{ 0, E_9, D_9, F_9 }, |
||||||
|
{ 0, E_8, D_8, F_8 }, |
||||||
|
{ 0, E_7, D_7, F_7 }, |
||||||
|
{ 0, E_6, D_6, F_6 }, |
||||||
|
{ 0, E_5, D_5, F_5 }, |
||||||
|
{ 0, E_4, D_4, F_4 }, |
||||||
|
{ 0, E_3, D_3, F_3 }, |
||||||
|
{ 0, E_2, D_2, F_2 }, |
||||||
|
{ 0, E_1, D_1, F_1 }, |
||||||
|
{ 1, H_7, G_7, I_7 }, |
||||||
|
{ 1, H_8, G_8, I_8 }, |
||||||
|
|
||||||
|
{ 0, H_12, G_12, I_12 }, |
||||||
|
{ 0, H_11, G_11, I_11 }, |
||||||
|
{ 0, H_10, G_10, I_10 }, |
||||||
|
{ 0, H_9, G_9, I_9 }, |
||||||
|
{ 0, H_8, G_8, I_8 }, |
||||||
|
{ 0, H_7, G_7, I_7 }, |
||||||
|
{ 0, H_6, G_6, I_6 }, |
||||||
|
{ 0, H_5, G_5, I_5 }, |
||||||
|
{ 0, H_4, G_4, I_4 }, |
||||||
|
{ 0, H_3, G_3, I_3 }, |
||||||
|
{ 0, H_2, G_2, I_2 }, |
||||||
|
{ 0, H_1, G_1, I_1 }, |
||||||
|
{ 0, K_9, J_9, L_9 }, |
||||||
|
|
||||||
|
{ 0, K_12, J_12, L_12 }, |
||||||
|
{ 0, K_11, J_11, L_11 }, |
||||||
|
{ 0, K_10, J_10, L_10 }, |
||||||
|
{ 0, K_7, J_7, L_7 }, |
||||||
|
{ 0, K_4, J_4, L_4 }, |
||||||
|
{ 0, K_2, J_2, L_2 }, |
||||||
|
{ 0, K_1, J_1, L_1 }, |
||||||
|
{ 0, K_6, J_6, L_6 }, |
||||||
|
{ 0, K_5, J_5, L_5 }, |
||||||
|
}; |
||||||
|
|
||||||
|
bool rgb_matrix_indicators_kb(void) { |
||||||
|
if (!rgb_matrix_indicators_user()) { |
||||||
|
return false; |
||||||
|
} |
||||||
|
if (host_keyboard_led_state().caps_lock) { |
||||||
|
rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); |
||||||
|
} |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
#endif |
Loading…
Reference in new issue