KBDMini refactor (#12850)
This commit is contained in:
parent
5c924efa04
commit
4fa32f0f04
7 changed files with 188 additions and 117 deletions
|
@ -7,17 +7,32 @@
|
|||
#define PRODUCT_ID 0x2001
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER DZTECH
|
||||
|
||||
#define PRODUCT KBDMINI
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 13
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { B7, E6, F5, F4 }
|
||||
#define MATRIX_COL_PINS { B3, B2, B1, B0, F1, F0, C6, B6, B5, B4, D7, D6, D4 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 3
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
|
@ -44,3 +59,7 @@
|
|||
#define DRIVER_1_LED_TOTAL 52
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
|
||||
#endif
|
||||
|
||||
/* disable these deprecated features by default */
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
|
68
keyboards/kbdfans/kbdmini/info.json
Normal file
68
keyboards/kbdfans/kbdmini/info.json
Normal file
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"keyboard_name": "KBDMini",
|
||||
"url": "",
|
||||
"maintainer": "KBDFans",
|
||||
"width": 13,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x": 0, "y": 0},
|
||||
{"x": 1, "y": 0},
|
||||
{"x": 2, "y": 0},
|
||||
{"x": 3, "y": 0},
|
||||
{"x": 4, "y": 0},
|
||||
{"x": 5, "y": 0},
|
||||
{"x": 6, "y": 0},
|
||||
{"x": 7, "y": 0},
|
||||
{"x": 8, "y": 0},
|
||||
{"x": 9, "y": 0},
|
||||
{"x": 10, "y": 0},
|
||||
{"x": 11, "y": 0},
|
||||
{"x": 12, "y": 0},
|
||||
|
||||
{"x": 0, "y": 1},
|
||||
{"x": 1, "y": 1},
|
||||
{"x": 2, "y": 1},
|
||||
{"x": 3, "y": 1},
|
||||
{"x": 4, "y": 1},
|
||||
{"x": 5, "y": 1},
|
||||
{"x": 6, "y": 1},
|
||||
{"x": 7, "y": 1},
|
||||
{"x": 8, "y": 1},
|
||||
{"x": 9, "y": 1},
|
||||
{"x": 10, "y": 1},
|
||||
{"x": 11, "y": 1},
|
||||
{"x": 12, "y": 1},
|
||||
|
||||
{"x": 0, "y": 2},
|
||||
{"x": 1, "y": 2},
|
||||
{"x": 2, "y": 2},
|
||||
{"x": 3, "y": 2},
|
||||
{"x": 4, "y": 2},
|
||||
{"x": 5, "y": 2},
|
||||
{"x": 6, "y": 2},
|
||||
{"x": 7, "y": 2},
|
||||
{"x": 8, "y": 2},
|
||||
{"x": 9, "y": 2},
|
||||
{"x": 10, "y": 2},
|
||||
{"x": 11, "y": 2},
|
||||
{"x": 12, "y": 2},
|
||||
|
||||
{"x": 0, "y": 3},
|
||||
{"x": 1, "y": 3},
|
||||
{"x": 2, "y": 3},
|
||||
{"x": 3, "y": 3},
|
||||
{"x": 4, "y": 3},
|
||||
{"x": 5, "y": 3},
|
||||
{"x": 6, "y": 3},
|
||||
{"x": 7, "y": 3},
|
||||
{"x": 8, "y": 3},
|
||||
{"x": 9, "y": 3},
|
||||
{"x": 10, "y": 3},
|
||||
{"x": 11, "y": 3},
|
||||
{"x": 12, "y": 3}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
#include "kbdmini.h"
|
||||
#include "config.h"
|
||||
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{ 0, B_9, A_9, C_9 }, //LA33
|
||||
{ 0, B_10, A_10, C_10 }, //LA37
|
||||
|
@ -58,7 +58,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||
{ 0, K_1, J_1, L_1 } //LA4
|
||||
};
|
||||
|
||||
led_config_t g_led_config = { {
|
||||
led_config_t g_led_config = {
|
||||
{
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 },
|
||||
{ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
|
||||
{ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38 },
|
||||
|
@ -73,24 +74,15 @@ led_config_t g_led_config = { {
|
|||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
} };
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
void suspend_power_down_kb(void)
|
||||
{
|
||||
};
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void)
|
||||
{
|
||||
void suspend_wakeup_init_kb(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
|
@ -12,4 +13,3 @@
|
|||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C } \
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
#define _LAYER0 0
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_LAYER0] = LAYOUT(
|
||||
[0] = LAYOUT(
|
||||
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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSPC,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_ENT,
|
||||
KC_F5, KC_CAPS, KC_LCTL, KC_LGUI, KC_F1, KC_SPC,KC_F2, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
KC_F5, KC_CAPS, KC_LCTL, KC_LGUI, KC_F1, KC_SPC, KC_F2, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
)
|
||||
};
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
![KBDMINI](imgur.com image replace me!)
|
||||
|
||||
Keyboard Maintainer: [DZTECH](https://github.com/moyi4681)
|
||||
Hardware Supported: KBDMINI
|
||||
Hardware Availability: [KBDFans](https://kbdfans.cn/)
|
||||
* Keyboard Maintainer: [DZTECH](https://github.com/moyi4681)
|
||||
* Hardware Supported: KBDMINI
|
||||
* Hardware Availability: [KBDFans](https://kbdfans.cn/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
|
|
|
@ -2,13 +2,6 @@
|
|||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# ATmega32A bootloadHID
|
||||
# ATmega328P USBasp
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
|
@ -24,10 +17,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
RGB_MATRIX_ENABLE = yes # Use RGB matrix
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = IS31FL3733
|
||||
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
|
||||
|
|
Loading…
Reference in a new issue