From be919a95a9c7da53a0d9006c5df1d1d82b60849c Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Tue, 14 Feb 2023 20:45:42 +0800 Subject: [PATCH 01/19] Add erdnuss65 keyboard --- keyboards/citrus/erdnuss65/config.h | 38 +++++++++ keyboards/citrus/erdnuss65/erdnuss65.c | 1 + keyboards/citrus/erdnuss65/erdnuss65.h | 17 ++++ keyboards/citrus/erdnuss65/info.json | 83 +++++++++++++++++++ .../citrus/erdnuss65/keymaps/via/keymap.c | 56 +++++++++++++ .../citrus/erdnuss65/keymaps/via/rules.mk | 1 + keyboards/citrus/erdnuss65/readme.md | 14 ++++ keyboards/citrus/erdnuss65/rules.mk | 22 +++++ 8 files changed, 232 insertions(+) create mode 100644 keyboards/citrus/erdnuss65/config.h create mode 100644 keyboards/citrus/erdnuss65/erdnuss65.c create mode 100644 keyboards/citrus/erdnuss65/erdnuss65.h create mode 100644 keyboards/citrus/erdnuss65/info.json create mode 100644 keyboards/citrus/erdnuss65/keymaps/via/keymap.c create mode 100644 keyboards/citrus/erdnuss65/keymaps/via/rules.mk create mode 100644 keyboards/citrus/erdnuss65/readme.md create mode 100644 keyboards/citrus/erdnuss65/rules.mk diff --git a/keyboards/citrus/erdnuss65/config.h b/keyboards/citrus/erdnuss65/config.h new file mode 100644 index 000000000000..013336d93e34 --- /dev/null +++ b/keyboards/citrus/erdnuss65/config.h @@ -0,0 +1,38 @@ +// Copyright 2023 Citrus Lab +// SPDX-License-Identifier: GPL-2.0 +#pragma once + +#include "config_common.h" + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B10, B1, B0, A7, A6 } +#define MATRIX_COL_PINS { B12, B14, B15, A8, B13, B7, B8, B9, A1, A2, A0, A3, A4, A5, B11 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// The pin connected to the data pin of the LEDs +#define RGB_DI_PIN A15 +#define RGBLIGHT_LAYERS//允许您定义可打开或关闭的照明层。非常适合显示当前键盘层或大写锁定状态。 +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF//如果已定义,则即使 RGB 光源处于关闭状态,也会显示照明图层。 +#ifdef RGB_DI_PIN +// The number of LEDs connected +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 200 + +#endif + +#define FORCE_NKRO + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE//尝试使开关状态与键盘指示灯状态保持一致 + diff --git a/keyboards/citrus/erdnuss65/erdnuss65.c b/keyboards/citrus/erdnuss65/erdnuss65.c new file mode 100644 index 000000000000..fd955aa82206 --- /dev/null +++ b/keyboards/citrus/erdnuss65/erdnuss65.c @@ -0,0 +1 @@ +#include "erdnuss65.h" \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/erdnuss65.h b/keyboards/citrus/erdnuss65/erdnuss65.h new file mode 100644 index 000000000000..d306b16dc3fc --- /dev/null +++ b/keyboards/citrus/erdnuss65/erdnuss65.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3E, \ + K40, K41, K42, K43, K4A, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, XXX, XXX, XXX, XXX, XXX, XXX, K4A, XXX, K4C, K4D, K4E }, \ +} diff --git a/keyboards/citrus/erdnuss65/info.json b/keyboards/citrus/erdnuss65/info.json new file mode 100644 index 000000000000..1444c89ce38d --- /dev/null +++ b/keyboards/citrus/erdnuss65/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Erdnuss65", + "manufacturer": "Citrus Lab", + "url":"https://qmk.fm/keyboards/", + "maintainer": "ctt", + "usb": { + "vid": "0xCC12", + "pid": "0x1209", + "device_version": "0.0.1" + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "K00 (B10,B12)", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "K01 (B10,B14)", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "K02 (B10,B15)", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "K03 (B10,A8)", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "K04 (B10,B13)", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "K05 (B10,B7)", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "K06 (B10,B8)", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "K07 (B10,B9)", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "K08 (B10,A1)", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "K09 (B10,A2)", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "K0A (B10,A0)", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "K0B (B10,A3)", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "K0C (B10,A4)", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "K0D (B10,A5)", "matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"label": "K0E (B10,B11)", "matrix": [0, 14], "x": 15, "y": 0}, + {"label": "K10 (B1,B12)", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "K11 (B1,B14)", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "K12 (B1,B15)", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "K13 (B1,A8)", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "K14 (B1,B13)", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "K15 (B1,B7)", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "K16 (B1,B8)", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "K17 (B1,B9)", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "K18 (B1,A1)", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "K19 (B1,A2)", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "K1A (B1,A0)", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "K1B (B1,A3)", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "K1C (B1,A4)", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "K1D (B1,A5)", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"label": "K1E (B1,B11)", "matrix": [1, 14], "x": 15, "y": 1}, + {"label": "K20 (B0,B12)", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.25}, + {"label": "K21 (B0,B14)", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "K22 (B0,B15)", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "K23 (B0,A8)", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "K24 (B0,B13)", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "K25 (B0,B7)", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "K26 (B0,B8)", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "K27 (B0,B9)", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K28 (B0,A1)", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "K29 (B0,A2)", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": "K2A (B0,A0)", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "K2B (B0,A3)", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "K2D (B0,A5)", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"label": "K2E (B0,B11)", "matrix": [2, 14], "x": 15, "y": 2}, + {"label": "K30 (A7,B12)", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "K31 (A7,B14)", "matrix": [3, 1], "x": 2.25, "y": 3}, + {"label": "K32 (A7,B15)", "matrix": [3, 2], "x": 3.25, "y": 3}, + {"label": "K33 (A7,A8)", "matrix": [3, 3], "x": 4.25, "y": 3}, + {"label": "K34 (A7,B13)", "matrix": [3, 4], "x": 5.25, "y": 3}, + {"label": "K35 (A7,B7)", "matrix": [3, 5], "x": 6.25, "y": 3}, + {"label": "K36 (A7,B8)", "matrix": [3, 6], "x": 7.25, "y": 3}, + {"label": "K37 (A7,B9)", "matrix": [3, 7], "x": 8.25, "y": 3}, + {"label": "K38 (A7,A1)", "matrix": [3, 8], "x": 9.25, "y": 3}, + {"label": "K39 (A7,A2)", "matrix": [3, 9], "x": 10.25, "y": 3}, + {"label": "K3A (A7,A0)", "matrix": [3, 10], "x": 11.25, "y": 3}, + {"label": "K3C (A7,A4)", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "K3D (A7,A5)", "matrix": [3, 13], "x": 14, "y": 3}, + {"label": "K3E (A7,B11)", "matrix": [3, 14], "x": 15, "y": 3}, + {"label": "K40 (A6,B12)", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "K41 (A6,B14)", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "K42 (A6,B15)", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "K43 (A6,A8)", "matrix": [4, 3], "x": 4, "y": 4, "w": 7}, + {"label": "K4A (A6,A0)", "matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"label": "K4C (A6,A4)", "matrix": [4, 12], "x": 13, "y": 4}, + {"label": "K4D (A6,A5)", "matrix": [4, 13], "x": 14, "y": 4}, + {"label": "K4E (A6,B11)", "matrix": [4, 14], "x": 15, "y": 4} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c new file mode 100644 index 000000000000..591734f0cd19 --- /dev/null +++ b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +// Copyright 2023 Citrus Lab +// SPDX-License-Identifier: GPL-2.0 +#include QMK_KEYBOARD_H + +#define XXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, 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_INS, + 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_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + KC_GRV, 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_MPRV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, RESET, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MYCM, KC_VOLU, KC_END, + _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_MPLY + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [4] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0,1, HSV_WHITE} +); +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_capslock_layer +); + +void keyboard_post_init_user(void) { + // Enable the LED layers + rgblight_layers = my_rgb_layers; +} +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(0, led_state.caps_lock); + return true; +} diff --git a/keyboards/citrus/erdnuss65/keymaps/via/rules.mk b/keyboards/citrus/erdnuss65/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/citrus/erdnuss65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/readme.md b/keyboards/citrus/erdnuss65/readme.md new file mode 100644 index 000000000000..b99d62bb9844 --- /dev/null +++ b/keyboards/citrus/erdnuss65/readme.md @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/rules.mk b/keyboards/citrus/erdnuss65/rules.mk new file mode 100644 index 000000000000..741ca548286a --- /dev/null +++ b/keyboards/citrus/erdnuss65/rules.mk @@ -0,0 +1,22 @@ +# MCU name 主控型号 +MCU = STM32F103 + +# Bootloader selection +BOOTLOADER = stm32duino + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +KEYBOARD_SHARED_EP =no +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 = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output \ No newline at end of file From 705035c375487150587588f2bc67b01e40cc0b61 Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Sat, 18 Feb 2023 09:52:39 +0800 Subject: [PATCH 02/19] Modified part of the code --- keyboards/citrus/erdnuss65/config.h | 25 ---- keyboards/citrus/erdnuss65/erdnuss65.c | 22 +++- keyboards/citrus/erdnuss65/info.json | 123 ++++++++---------- .../citrus/erdnuss65/keymaps/default/keymap.c | 41 ++++++ .../citrus/erdnuss65/keymaps/via/keymap.c | 17 +-- keyboards/citrus/erdnuss65/readme.md | 35 +++-- keyboards/citrus/erdnuss65/rules.mk | 22 +--- keyboards/citrus/readme.md | 2 + 8 files changed, 142 insertions(+), 145 deletions(-) create mode 100644 keyboards/citrus/erdnuss65/keymaps/default/keymap.c create mode 100644 keyboards/citrus/readme.md diff --git a/keyboards/citrus/erdnuss65/config.h b/keyboards/citrus/erdnuss65/config.h index 013336d93e34..1a1265322eed 100644 --- a/keyboards/citrus/erdnuss65/config.h +++ b/keyboards/citrus/erdnuss65/config.h @@ -4,34 +4,9 @@ #include "config_common.h" -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -#define MATRIX_ROW_PINS { B10, B1, B0, A7, A6 } -#define MATRIX_COL_PINS { B12, B14, B15, A8, B13, B7, B8, B9, A1, A2, A0, A3, A4, A5, B11 } - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - // The pin connected to the data pin of the LEDs -#define RGB_DI_PIN A15 #define RGBLIGHT_LAYERS//允许您定义可打开或关闭的照明层。非常适合显示当前键盘层或大写锁定状态。 #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF//如果已定义,则即使 RGB 光源处于关闭状态,也会显示照明图层。 -#ifdef RGB_DI_PIN -// The number of LEDs connected -#define RGBLED_NUM 1 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_LIMIT_VAL 200 - -#endif - -#define FORCE_NKRO - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE//尝试使开关状态与键盘指示灯状态保持一致 diff --git a/keyboards/citrus/erdnuss65/erdnuss65.c b/keyboards/citrus/erdnuss65/erdnuss65.c index fd955aa82206..e1703df17889 100644 --- a/keyboards/citrus/erdnuss65/erdnuss65.c +++ b/keyboards/citrus/erdnuss65/erdnuss65.c @@ -1 +1,21 @@ -#include "erdnuss65.h" \ No newline at end of file +#include "erdnuss65.h" + +//Initialize all RGB indicators to 'off' +__attribute__((weak)) +void keyboard_post_init_user(void) { + rgblight_setrgb_at(0, 0, 0, 0); +} + +//Indicator light function +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + // writePin(A15, !led_state.caps_lock); //Un-comment this line to enable in-switch capslock indicator + if (led_state.caps_lock) { + rgblight_setrgb_at(255, 255, 255, 0); //white + } else { + rgblight_setrgb_at(0, 0, 0, 0); + } +} + return res; +} \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/info.json b/keyboards/citrus/erdnuss65/info.json index 1444c89ce38d..9a34e86be0b4 100644 --- a/keyboards/citrus/erdnuss65/info.json +++ b/keyboards/citrus/erdnuss65/info.json @@ -1,83 +1,64 @@ { "keyboard_name": "Erdnuss65", "manufacturer": "Citrus Lab", - "url":"https://qmk.fm/keyboards/", + "processor": "STM32F103", + "bootloader": "stm32duino", "maintainer": "ctt", "usb": { "vid": "0xCC12", "pid": "0x1209", "device_version": "0.0.1" }, - "layouts": { - "LAYOUT": { - "layout": [ - {"label": "K00 (B10,B12)", "matrix": [0, 0], "x": 0, "y": 0}, - {"label": "K01 (B10,B14)", "matrix": [0, 1], "x": 1, "y": 0}, - {"label": "K02 (B10,B15)", "matrix": [0, 2], "x": 2, "y": 0}, - {"label": "K03 (B10,A8)", "matrix": [0, 3], "x": 3, "y": 0}, - {"label": "K04 (B10,B13)", "matrix": [0, 4], "x": 4, "y": 0}, - {"label": "K05 (B10,B7)", "matrix": [0, 5], "x": 5, "y": 0}, - {"label": "K06 (B10,B8)", "matrix": [0, 6], "x": 6, "y": 0}, - {"label": "K07 (B10,B9)", "matrix": [0, 7], "x": 7, "y": 0}, - {"label": "K08 (B10,A1)", "matrix": [0, 8], "x": 8, "y": 0}, - {"label": "K09 (B10,A2)", "matrix": [0, 9], "x": 9, "y": 0}, - {"label": "K0A (B10,A0)", "matrix": [0, 10], "x": 10, "y": 0}, - {"label": "K0B (B10,A3)", "matrix": [0, 11], "x": 11, "y": 0}, - {"label": "K0C (B10,A4)", "matrix": [0, 12], "x": 12, "y": 0}, - {"label": "K0D (B10,A5)", "matrix": [0, 13], "x": 13, "y": 0, "w": 2}, - {"label": "K0E (B10,B11)", "matrix": [0, 14], "x": 15, "y": 0}, - {"label": "K10 (B1,B12)", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, - {"label": "K11 (B1,B14)", "matrix": [1, 1], "x": 1.5, "y": 1}, - {"label": "K12 (B1,B15)", "matrix": [1, 2], "x": 2.5, "y": 1}, - {"label": "K13 (B1,A8)", "matrix": [1, 3], "x": 3.5, "y": 1}, - {"label": "K14 (B1,B13)", "matrix": [1, 4], "x": 4.5, "y": 1}, - {"label": "K15 (B1,B7)", "matrix": [1, 5], "x": 5.5, "y": 1}, - {"label": "K16 (B1,B8)", "matrix": [1, 6], "x": 6.5, "y": 1}, - {"label": "K17 (B1,B9)", "matrix": [1, 7], "x": 7.5, "y": 1}, - {"label": "K18 (B1,A1)", "matrix": [1, 8], "x": 8.5, "y": 1}, - {"label": "K19 (B1,A2)", "matrix": [1, 9], "x": 9.5, "y": 1}, - {"label": "K1A (B1,A0)", "matrix": [1, 10], "x": 10.5, "y": 1}, - {"label": "K1B (B1,A3)", "matrix": [1, 11], "x": 11.5, "y": 1}, - {"label": "K1C (B1,A4)", "matrix": [1, 12], "x": 12.5, "y": 1}, - {"label": "K1D (B1,A5)", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, - {"label": "K1E (B1,B11)", "matrix": [1, 14], "x": 15, "y": 1}, - {"label": "K20 (B0,B12)", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.25}, - {"label": "K21 (B0,B14)", "matrix": [2, 1], "x": 1.75, "y": 2}, - {"label": "K22 (B0,B15)", "matrix": [2, 2], "x": 2.75, "y": 2}, - {"label": "K23 (B0,A8)", "matrix": [2, 3], "x": 3.75, "y": 2}, - {"label": "K24 (B0,B13)", "matrix": [2, 4], "x": 4.75, "y": 2}, - {"label": "K25 (B0,B7)", "matrix": [2, 5], "x": 5.75, "y": 2}, - {"label": "K26 (B0,B8)", "matrix": [2, 6], "x": 6.75, "y": 2}, - {"label": "K27 (B0,B9)", "matrix": [2, 7], "x": 7.75, "y": 2}, - {"label": "K28 (B0,A1)", "matrix": [2, 8], "x": 8.75, "y": 2}, - {"label": "K29 (B0,A2)", "matrix": [2, 9], "x": 9.75, "y": 2}, - {"label": "K2A (B0,A0)", "matrix": [2, 10], "x": 10.75, "y": 2}, - {"label": "K2B (B0,A3)", "matrix": [2, 11], "x": 11.75, "y": 2}, - {"label": "K2D (B0,A5)", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, - {"label": "K2E (B0,B11)", "matrix": [2, 14], "x": 15, "y": 2}, - {"label": "K30 (A7,B12)", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, - {"label": "K31 (A7,B14)", "matrix": [3, 1], "x": 2.25, "y": 3}, - {"label": "K32 (A7,B15)", "matrix": [3, 2], "x": 3.25, "y": 3}, - {"label": "K33 (A7,A8)", "matrix": [3, 3], "x": 4.25, "y": 3}, - {"label": "K34 (A7,B13)", "matrix": [3, 4], "x": 5.25, "y": 3}, - {"label": "K35 (A7,B7)", "matrix": [3, 5], "x": 6.25, "y": 3}, - {"label": "K36 (A7,B8)", "matrix": [3, 6], "x": 7.25, "y": 3}, - {"label": "K37 (A7,B9)", "matrix": [3, 7], "x": 8.25, "y": 3}, - {"label": "K38 (A7,A1)", "matrix": [3, 8], "x": 9.25, "y": 3}, - {"label": "K39 (A7,A2)", "matrix": [3, 9], "x": 10.25, "y": 3}, - {"label": "K3A (A7,A0)", "matrix": [3, 10], "x": 11.25, "y": 3}, - {"label": "K3C (A7,A4)", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, - {"label": "K3D (A7,A5)", "matrix": [3, 13], "x": 14, "y": 3}, - {"label": "K3E (A7,B11)", "matrix": [3, 14], "x": 15, "y": 3}, - {"label": "K40 (A6,B12)", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, - {"label": "K41 (A6,B14)", "matrix": [4, 1], "x": 1.5, "y": 4}, - {"label": "K42 (A6,B15)", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, - {"label": "K43 (A6,A8)", "matrix": [4, 3], "x": 4, "y": 4, "w": 7}, - {"label": "K4A (A6,A0)", "matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, - {"label": "K4C (A6,A4)", "matrix": [4, 12], "x": 13, "y": 4}, - {"label": "K4D (A6,A5)", "matrix": [4, 13], "x": 14, "y": 4}, - {"label": "K4E (A6,B11)", "matrix": [4, 14], "x": 15, "y": 4} - ] + + "matrix_pins": { + "rows": [ + "B10", + "B1", + "B0", + "A7", + "A6"], + "cols": [ + "B12", + "B14", + "B15", + "A8", + "B13", "B7", + "B8", + "B9", + "A1", + "A2", + "A0", + "A3", + "A4", + "A5", + "B11"] + }, + + "diode_direction": "COL2ROW", + + "debounce": 5, + + "features": { + "bootmagic": true, + "mousekey": true, + "extrakey": true, + "console": false, + "command": false, + "nkro": true, + "backlight": false, + "rgblight": true, + "audio": false + }, + "rgblight": { + "pin": "A15", + "led_count": 1, + "hue_steps": 8, + "saturation_steps": 8, + "brightness_steps": 8, + "max_brightness": 200, + "sleep": true, + "animations": { + "all": false } } } \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c new file mode 100644 index 000000000000..8b5ea4c3341b --- /dev/null +++ b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +// Copyright 2023 Citrus Lab +// SPDX-License-Identifier: GPL-2.0 +#include QMK_KEYBOARD_H + +#define XXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, 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_INS, + 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_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + KC_GRV, 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_MPRV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, RESET, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MYCM, KC_VOLU, KC_END, + _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_MPLY + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [4] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c index 591734f0cd19..8b5ea4c3341b 100644 --- a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c +++ b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c @@ -38,19 +38,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ), -}; -const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0,1, HSV_WHITE} -); -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - my_capslock_layer -); - -void keyboard_post_init_user(void) { - // Enable the LED layers - rgblight_layers = my_rgb_layers; -} -bool led_update_user(led_t led_state) { - rgblight_set_layer_state(0, led_state.caps_lock); - return true; -} +}; \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/readme.md b/keyboards/citrus/erdnuss65/readme.md index b99d62bb9844..e3720c93d7a6 100644 --- a/keyboards/citrus/erdnuss65/readme.md +++ b/keyboards/citrus/erdnuss65/readme.md @@ -1,14 +1,27 @@ - \ No newline at end of file +*A short description of the keyboard/project* + +* Keyboard Maintainer: [Citrus Lab](https://github.com/ctt-t) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make citrus/erdnuss65:default + +Flashing example for this keyboard: + + make citrus/erdnuss65: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 3 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 +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/rules.mk b/keyboards/citrus/erdnuss65/rules.mk index 741ca548286a..80b5a0b8f5a5 100644 --- a/keyboards/citrus/erdnuss65/rules.mk +++ b/keyboards/citrus/erdnuss65/rules.mk @@ -1,22 +1,2 @@ -# MCU name 主控型号 -MCU = STM32F103 - -# Bootloader selection -BOOTLOADER = stm32duino - # Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -KEYBOARD_SHARED_EP =no -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 = yes # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output \ No newline at end of file +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE \ No newline at end of file diff --git a/keyboards/citrus/readme.md b/keyboards/citrus/readme.md new file mode 100644 index 000000000000..bde8a9620f88 --- /dev/null +++ b/keyboards/citrus/readme.md @@ -0,0 +1,2 @@ +# Citrus Lab +QMK folders for PCB commissions. \ No newline at end of file From 8c3f64a48f6c3bf7339631dd6ebfdb60281f310c Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Sat, 18 Feb 2023 14:47:23 +0800 Subject: [PATCH 03/19] Modified part of the code --- keyboards/citrus/erdnuss65/chconf.h | 24 +++++++++ keyboards/citrus/erdnuss65/erdnuss65.h | 16 +----- keyboards/citrus/erdnuss65/info.json | 72 ++++++++++++++++++++++++++ keyboards/citrus/erdnuss65/mcuconf.h | 22 ++++++++ 4 files changed, 119 insertions(+), 15 deletions(-) create mode 100644 keyboards/citrus/erdnuss65/chconf.h create mode 100644 keyboards/citrus/erdnuss65/mcuconf.h diff --git a/keyboards/citrus/erdnuss65/chconf.h b/keyboards/citrus/erdnuss65/chconf.h new file mode 100644 index 000000000000..7dd32dc5f17d --- /dev/null +++ b/keyboards/citrus/erdnuss65/chconf.h @@ -0,0 +1,24 @@ +/* Copyright 2020 QMK + * + * 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 . + */ +#pragma once + +#define CH_CFG_ST_FREQUENCY 10000 + +#define CH_CFG_OPTIMIZE_SPEED FALSE + +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +#include_next diff --git a/keyboards/citrus/erdnuss65/erdnuss65.h b/keyboards/citrus/erdnuss65/erdnuss65.h index d306b16dc3fc..99b0ccee21b5 100644 --- a/keyboards/citrus/erdnuss65/erdnuss65.h +++ b/keyboards/citrus/erdnuss65/erdnuss65.h @@ -1,17 +1,3 @@ #pragma once -#include "quantum.h" - -#define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3E, \ - K40, K41, K42, K43, K4A, K4C, K4D, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, K3D, K3E }, \ - { K40, K41, K42, K43, XXX, XXX, XXX, XXX, XXX, XXX, K4A, XXX, K4C, K4D, K4E }, \ -} +#include "quantum.h" \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/info.json b/keyboards/citrus/erdnuss65/info.json index 9a34e86be0b4..6d386a355650 100644 --- a/keyboards/citrus/erdnuss65/info.json +++ b/keyboards/citrus/erdnuss65/info.json @@ -60,5 +60,77 @@ "animations": { "all": false } + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "K00 (B10,B12)", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "K01 (B10,B14)", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "K02 (B10,B15)", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "K03 (B10,A8)", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "K04 (B10,B13)", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "K05 (B10,B7)", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "K06 (B10,B8)", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "K07 (B10,B9)", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "K08 (B10,A1)", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "K09 (B10,A2)", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "K0A (B10,A0)", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "K0B (B10,A3)", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "K0C (B10,A4)", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "K0D (B10,A5)", "matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"label": "K0E (B10,B11)", "matrix": [0, 14], "x": 15, "y": 0}, + {"label": "K10 (B1,B12)", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "K11 (B1,B14)", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "K12 (B1,B15)", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "K13 (B1,A8)", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "K14 (B1,B13)", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "K15 (B1,B7)", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "K16 (B1,B8)", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "K17 (B1,B9)", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "K18 (B1,A1)", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "K19 (B1,A2)", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "K1A (B1,A0)", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "K1B (B1,A3)", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "K1C (B1,A4)", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "K1D (B1,A5)", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"label": "K1E (B1,B11)", "matrix": [1, 14], "x": 15, "y": 1}, + {"label": "K20 (B0,B12)", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.25}, + {"label": "K21 (B0,B14)", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "K22 (B0,B15)", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "K23 (B0,A8)", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "K24 (B0,B13)", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "K25 (B0,B7)", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "K26 (B0,B8)", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "K27 (B0,B9)", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K28 (B0,A1)", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "K29 (B0,A2)", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": "K2A (B0,A0)", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "K2B (B0,A3)", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "K2D (B0,A5)", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"label": "K2E (B0,B11)", "matrix": [2, 14], "x": 15, "y": 2}, + {"label": "K30 (A7,B12)", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "K31 (A7,B14)", "matrix": [3, 1], "x": 2.25, "y": 3}, + {"label": "K32 (A7,B15)", "matrix": [3, 2], "x": 3.25, "y": 3}, + {"label": "K33 (A7,A8)", "matrix": [3, 3], "x": 4.25, "y": 3}, + {"label": "K34 (A7,B13)", "matrix": [3, 4], "x": 5.25, "y": 3}, + {"label": "K35 (A7,B7)", "matrix": [3, 5], "x": 6.25, "y": 3}, + {"label": "K36 (A7,B8)", "matrix": [3, 6], "x": 7.25, "y": 3}, + {"label": "K37 (A7,B9)", "matrix": [3, 7], "x": 8.25, "y": 3}, + {"label": "K38 (A7,A1)", "matrix": [3, 8], "x": 9.25, "y": 3}, + {"label": "K39 (A7,A2)", "matrix": [3, 9], "x": 10.25, "y": 3}, + {"label": "K3A (A7,A0)", "matrix": [3, 10], "x": 11.25, "y": 3}, + {"label": "K3C (A7,A4)", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "K3D (A7,A5)", "matrix": [3, 13], "x": 14, "y": 3}, + {"label": "K3E (A7,B11)", "matrix": [3, 14], "x": 15, "y": 3}, + {"label": "K40 (A6,B12)", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "K41 (A6,B14)", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "K42 (A6,B15)", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "K43 (A6,A8)", "matrix": [4, 3], "x": 4, "y": 4, "w": 7}, + {"label": "K4A (A6,A0)", "matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"label": "K4C (A6,A4)", "matrix": [4, 12], "x": 13, "y": 4}, + {"label": "K4D (A6,A5)", "matrix": [4, 13], "x": 14, "y": 4}, + {"label": "K4E (A6,B11)", "matrix": [4, 14], "x": 15, "y": 4} + ] + } } } \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/mcuconf.h b/keyboards/citrus/erdnuss65/mcuconf.h new file mode 100644 index 000000000000..ce1e6ba1cbce --- /dev/null +++ b/keyboards/citrus/erdnuss65/mcuconf.h @@ -0,0 +1,22 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + +#pragma once + +#include_next + +#undef STM32_I2C_USE_DMA +#define STM32_I2C_USE_DMA FALSE From 1f47ddc20c06b1035c90b358319e7472405bf6da Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Sat, 18 Feb 2023 15:46:13 +0800 Subject: [PATCH 04/19] Modify some pins to be correct --- keyboards/citrus/erdnuss65/info.json | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/keyboards/citrus/erdnuss65/info.json b/keyboards/citrus/erdnuss65/info.json index 6d386a355650..b085cd55b325 100644 --- a/keyboards/citrus/erdnuss65/info.json +++ b/keyboards/citrus/erdnuss65/info.json @@ -11,27 +11,32 @@ }, "matrix_pins": { - "rows": [ + "rows": + [ "B10", "B1", "B0", "A7", - "A6"], - "cols": [ + "A6" + ], + "cols": + [ "B12", "B14", "B15", "A8", - "B13", "B7", - "B8", - "B9", + "B13", + "B3", + "B4", + "B5", "A1", "A2", "A0", "A3", "A4", "A5", - "B11"] + "B11" + ] }, "diode_direction": "COL2ROW", From f077a6d428d64667c9d4ad7db392fd1364c5af2d Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Sat, 18 Feb 2023 15:49:24 +0800 Subject: [PATCH 05/19] Modify some pins to be correct --- keyboards/citrus/erdnuss65/info.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboards/citrus/erdnuss65/info.json b/keyboards/citrus/erdnuss65/info.json index b085cd55b325..43121a408291 100644 --- a/keyboards/citrus/erdnuss65/info.json +++ b/keyboards/citrus/erdnuss65/info.json @@ -74,9 +74,9 @@ {"label": "K02 (B10,B15)", "matrix": [0, 2], "x": 2, "y": 0}, {"label": "K03 (B10,A8)", "matrix": [0, 3], "x": 3, "y": 0}, {"label": "K04 (B10,B13)", "matrix": [0, 4], "x": 4, "y": 0}, - {"label": "K05 (B10,B7)", "matrix": [0, 5], "x": 5, "y": 0}, - {"label": "K06 (B10,B8)", "matrix": [0, 6], "x": 6, "y": 0}, - {"label": "K07 (B10,B9)", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "K05 (B10,B3)", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "K06 (B10,B4)", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "K07 (B10,B5)", "matrix": [0, 7], "x": 7, "y": 0}, {"label": "K08 (B10,A1)", "matrix": [0, 8], "x": 8, "y": 0}, {"label": "K09 (B10,A2)", "matrix": [0, 9], "x": 9, "y": 0}, {"label": "K0A (B10,A0)", "matrix": [0, 10], "x": 10, "y": 0}, @@ -89,9 +89,9 @@ {"label": "K12 (B1,B15)", "matrix": [1, 2], "x": 2.5, "y": 1}, {"label": "K13 (B1,A8)", "matrix": [1, 3], "x": 3.5, "y": 1}, {"label": "K14 (B1,B13)", "matrix": [1, 4], "x": 4.5, "y": 1}, - {"label": "K15 (B1,B7)", "matrix": [1, 5], "x": 5.5, "y": 1}, - {"label": "K16 (B1,B8)", "matrix": [1, 6], "x": 6.5, "y": 1}, - {"label": "K17 (B1,B9)", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "K15 (B1,B3)", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "K16 (B1,B4)", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "K17 (B1,B5)", "matrix": [1, 7], "x": 7.5, "y": 1}, {"label": "K18 (B1,A1)", "matrix": [1, 8], "x": 8.5, "y": 1}, {"label": "K19 (B1,A2)", "matrix": [1, 9], "x": 9.5, "y": 1}, {"label": "K1A (B1,A0)", "matrix": [1, 10], "x": 10.5, "y": 1}, @@ -104,9 +104,9 @@ {"label": "K22 (B0,B15)", "matrix": [2, 2], "x": 2.75, "y": 2}, {"label": "K23 (B0,A8)", "matrix": [2, 3], "x": 3.75, "y": 2}, {"label": "K24 (B0,B13)", "matrix": [2, 4], "x": 4.75, "y": 2}, - {"label": "K25 (B0,B7)", "matrix": [2, 5], "x": 5.75, "y": 2}, - {"label": "K26 (B0,B8)", "matrix": [2, 6], "x": 6.75, "y": 2}, - {"label": "K27 (B0,B9)", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K25 (B0,B3)", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "K26 (B0,B4)", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "K27 (B0,B5)", "matrix": [2, 7], "x": 7.75, "y": 2}, {"label": "K28 (B0,A1)", "matrix": [2, 8], "x": 8.75, "y": 2}, {"label": "K29 (B0,A2)", "matrix": [2, 9], "x": 9.75, "y": 2}, {"label": "K2A (B0,A0)", "matrix": [2, 10], "x": 10.75, "y": 2}, @@ -118,9 +118,9 @@ {"label": "K32 (A7,B15)", "matrix": [3, 2], "x": 3.25, "y": 3}, {"label": "K33 (A7,A8)", "matrix": [3, 3], "x": 4.25, "y": 3}, {"label": "K34 (A7,B13)", "matrix": [3, 4], "x": 5.25, "y": 3}, - {"label": "K35 (A7,B7)", "matrix": [3, 5], "x": 6.25, "y": 3}, - {"label": "K36 (A7,B8)", "matrix": [3, 6], "x": 7.25, "y": 3}, - {"label": "K37 (A7,B9)", "matrix": [3, 7], "x": 8.25, "y": 3}, + {"label": "K35 (A7,B3)", "matrix": [3, 5], "x": 6.25, "y": 3}, + {"label": "K36 (A7,B4)", "matrix": [3, 6], "x": 7.25, "y": 3}, + {"label": "K37 (A7,B5)", "matrix": [3, 7], "x": 8.25, "y": 3}, {"label": "K38 (A7,A1)", "matrix": [3, 8], "x": 9.25, "y": 3}, {"label": "K39 (A7,A2)", "matrix": [3, 9], "x": 10.25, "y": 3}, {"label": "K3A (A7,A0)", "matrix": [3, 10], "x": 11.25, "y": 3}, From 9e3dade76780bedab152abef494e8af566059dc2 Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Tue, 21 Mar 2023 11:40:56 +0800 Subject: [PATCH 06/19] update --- keyboards/citrus/erdnuss65/chconf.h | 24 --- keyboards/citrus/erdnuss65/config.h | 17 +- keyboards/citrus/erdnuss65/erdnuss65.c | 21 --- keyboards/citrus/erdnuss65/erdnuss65.h | 3 - keyboards/citrus/erdnuss65/info.json | 162 ++++++++---------- .../citrus/erdnuss65/keymaps/via/keymap.c | 24 ++- keyboards/citrus/erdnuss65/mcuconf.h | 22 --- 7 files changed, 106 insertions(+), 167 deletions(-) delete mode 100644 keyboards/citrus/erdnuss65/chconf.h delete mode 100644 keyboards/citrus/erdnuss65/erdnuss65.c delete mode 100644 keyboards/citrus/erdnuss65/erdnuss65.h delete mode 100644 keyboards/citrus/erdnuss65/mcuconf.h diff --git a/keyboards/citrus/erdnuss65/chconf.h b/keyboards/citrus/erdnuss65/chconf.h deleted file mode 100644 index 7dd32dc5f17d..000000000000 --- a/keyboards/citrus/erdnuss65/chconf.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2020 QMK - * - * 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 . - */ -#pragma once - -#define CH_CFG_ST_FREQUENCY 10000 - -#define CH_CFG_OPTIMIZE_SPEED FALSE - -#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE - -#include_next diff --git a/keyboards/citrus/erdnuss65/config.h b/keyboards/citrus/erdnuss65/config.h index 1a1265322eed..79e579e6788c 100644 --- a/keyboards/citrus/erdnuss65/config.h +++ b/keyboards/citrus/erdnuss65/config.h @@ -1,5 +1,18 @@ -// Copyright 2023 Citrus Lab -// SPDX-License-Identifier: GPL-2.0 +/* Copyright 2023 Citrus Lab + * + * 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 . + */ #pragma once #include "config_common.h" diff --git a/keyboards/citrus/erdnuss65/erdnuss65.c b/keyboards/citrus/erdnuss65/erdnuss65.c deleted file mode 100644 index e1703df17889..000000000000 --- a/keyboards/citrus/erdnuss65/erdnuss65.c +++ /dev/null @@ -1,21 +0,0 @@ -#include "erdnuss65.h" - -//Initialize all RGB indicators to 'off' -__attribute__((weak)) -void keyboard_post_init_user(void) { - rgblight_setrgb_at(0, 0, 0, 0); -} - -//Indicator light function -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - // writePin(A15, !led_state.caps_lock); //Un-comment this line to enable in-switch capslock indicator - if (led_state.caps_lock) { - rgblight_setrgb_at(255, 255, 255, 0); //white - } else { - rgblight_setrgb_at(0, 0, 0, 0); - } -} - return res; -} \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/erdnuss65.h b/keyboards/citrus/erdnuss65/erdnuss65.h deleted file mode 100644 index 99b0ccee21b5..000000000000 --- a/keyboards/citrus/erdnuss65/erdnuss65.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include "quantum.h" \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/info.json b/keyboards/citrus/erdnuss65/info.json index 43121a408291..2c8be14ebdf7 100644 --- a/keyboards/citrus/erdnuss65/info.json +++ b/keyboards/citrus/erdnuss65/info.json @@ -5,38 +5,16 @@ "bootloader": "stm32duino", "maintainer": "ctt", "usb": { - "vid": "0xCC12", - "pid": "0x1209", + "vid": "0x636C", + "pid": "0x6374", "device_version": "0.0.1" }, "matrix_pins": { "rows": - [ - "B10", - "B1", - "B0", - "A7", - "A6" - ], + ["B10","B1", "B0","A7","A6"], "cols": - [ - "B12", - "B14", - "B15", - "A8", - "B13", - "B3", - "B4", - "B5", - "A1", - "A2", - "A0", - "A3", - "A4", - "A5", - "B11" - ] + ["B12","B14","B15","A8","B13","B3","B4","B5","A1","A2","A0","A3","A4","A5","B11"] }, "diode_direction": "COL2ROW", @@ -69,72 +47,72 @@ "layouts": { "LAYOUT": { "layout": [ - {"label": "K00 (B10,B12)", "matrix": [0, 0], "x": 0, "y": 0}, - {"label": "K01 (B10,B14)", "matrix": [0, 1], "x": 1, "y": 0}, - {"label": "K02 (B10,B15)", "matrix": [0, 2], "x": 2, "y": 0}, - {"label": "K03 (B10,A8)", "matrix": [0, 3], "x": 3, "y": 0}, - {"label": "K04 (B10,B13)", "matrix": [0, 4], "x": 4, "y": 0}, - {"label": "K05 (B10,B3)", "matrix": [0, 5], "x": 5, "y": 0}, - {"label": "K06 (B10,B4)", "matrix": [0, 6], "x": 6, "y": 0}, - {"label": "K07 (B10,B5)", "matrix": [0, 7], "x": 7, "y": 0}, - {"label": "K08 (B10,A1)", "matrix": [0, 8], "x": 8, "y": 0}, - {"label": "K09 (B10,A2)", "matrix": [0, 9], "x": 9, "y": 0}, - {"label": "K0A (B10,A0)", "matrix": [0, 10], "x": 10, "y": 0}, - {"label": "K0B (B10,A3)", "matrix": [0, 11], "x": 11, "y": 0}, - {"label": "K0C (B10,A4)", "matrix": [0, 12], "x": 12, "y": 0}, - {"label": "K0D (B10,A5)", "matrix": [0, 13], "x": 13, "y": 0, "w": 2}, - {"label": "K0E (B10,B11)", "matrix": [0, 14], "x": 15, "y": 0}, - {"label": "K10 (B1,B12)", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, - {"label": "K11 (B1,B14)", "matrix": [1, 1], "x": 1.5, "y": 1}, - {"label": "K12 (B1,B15)", "matrix": [1, 2], "x": 2.5, "y": 1}, - {"label": "K13 (B1,A8)", "matrix": [1, 3], "x": 3.5, "y": 1}, - {"label": "K14 (B1,B13)", "matrix": [1, 4], "x": 4.5, "y": 1}, - {"label": "K15 (B1,B3)", "matrix": [1, 5], "x": 5.5, "y": 1}, - {"label": "K16 (B1,B4)", "matrix": [1, 6], "x": 6.5, "y": 1}, - {"label": "K17 (B1,B5)", "matrix": [1, 7], "x": 7.5, "y": 1}, - {"label": "K18 (B1,A1)", "matrix": [1, 8], "x": 8.5, "y": 1}, - {"label": "K19 (B1,A2)", "matrix": [1, 9], "x": 9.5, "y": 1}, - {"label": "K1A (B1,A0)", "matrix": [1, 10], "x": 10.5, "y": 1}, - {"label": "K1B (B1,A3)", "matrix": [1, 11], "x": 11.5, "y": 1}, - {"label": "K1C (B1,A4)", "matrix": [1, 12], "x": 12.5, "y": 1}, - {"label": "K1D (B1,A5)", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, - {"label": "K1E (B1,B11)", "matrix": [1, 14], "x": 15, "y": 1}, - {"label": "K20 (B0,B12)", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.25}, - {"label": "K21 (B0,B14)", "matrix": [2, 1], "x": 1.75, "y": 2}, - {"label": "K22 (B0,B15)", "matrix": [2, 2], "x": 2.75, "y": 2}, - {"label": "K23 (B0,A8)", "matrix": [2, 3], "x": 3.75, "y": 2}, - {"label": "K24 (B0,B13)", "matrix": [2, 4], "x": 4.75, "y": 2}, - {"label": "K25 (B0,B3)", "matrix": [2, 5], "x": 5.75, "y": 2}, - {"label": "K26 (B0,B4)", "matrix": [2, 6], "x": 6.75, "y": 2}, - {"label": "K27 (B0,B5)", "matrix": [2, 7], "x": 7.75, "y": 2}, - {"label": "K28 (B0,A1)", "matrix": [2, 8], "x": 8.75, "y": 2}, - {"label": "K29 (B0,A2)", "matrix": [2, 9], "x": 9.75, "y": 2}, - {"label": "K2A (B0,A0)", "matrix": [2, 10], "x": 10.75, "y": 2}, - {"label": "K2B (B0,A3)", "matrix": [2, 11], "x": 11.75, "y": 2}, - {"label": "K2D (B0,A5)", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, - {"label": "K2E (B0,B11)", "matrix": [2, 14], "x": 15, "y": 2}, - {"label": "K30 (A7,B12)", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, - {"label": "K31 (A7,B14)", "matrix": [3, 1], "x": 2.25, "y": 3}, - {"label": "K32 (A7,B15)", "matrix": [3, 2], "x": 3.25, "y": 3}, - {"label": "K33 (A7,A8)", "matrix": [3, 3], "x": 4.25, "y": 3}, - {"label": "K34 (A7,B13)", "matrix": [3, 4], "x": 5.25, "y": 3}, - {"label": "K35 (A7,B3)", "matrix": [3, 5], "x": 6.25, "y": 3}, - {"label": "K36 (A7,B4)", "matrix": [3, 6], "x": 7.25, "y": 3}, - {"label": "K37 (A7,B5)", "matrix": [3, 7], "x": 8.25, "y": 3}, - {"label": "K38 (A7,A1)", "matrix": [3, 8], "x": 9.25, "y": 3}, - {"label": "K39 (A7,A2)", "matrix": [3, 9], "x": 10.25, "y": 3}, - {"label": "K3A (A7,A0)", "matrix": [3, 10], "x": 11.25, "y": 3}, - {"label": "K3C (A7,A4)", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, - {"label": "K3D (A7,A5)", "matrix": [3, 13], "x": 14, "y": 3}, - {"label": "K3E (A7,B11)", "matrix": [3, 14], "x": 15, "y": 3}, - {"label": "K40 (A6,B12)", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, - {"label": "K41 (A6,B14)", "matrix": [4, 1], "x": 1.5, "y": 4}, - {"label": "K42 (A6,B15)", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, - {"label": "K43 (A6,A8)", "matrix": [4, 3], "x": 4, "y": 4, "w": 7}, - {"label": "K4A (A6,A0)", "matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, - {"label": "K4C (A6,A4)", "matrix": [4, 12], "x": 13, "y": 4}, - {"label": "K4D (A6,A5)", "matrix": [4, 13], "x": 14, "y": 4}, - {"label": "K4E (A6,B11)", "matrix": [4, 14], "x": 15, "y": 4} + {"label": "ESC K00 (B10,B12)", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "1 K01 (B10,B14)", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "2 K02 (B10,B15)", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "3 K03 (B10,A8)", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "4 K04 (B10,B13)", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "5 K05 (B10,B3)", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "6 K06 (B10,B4)", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "7 K07 (B10,B5)", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "8 K08 (B10,A1)", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "9 K09 (B10,A2)", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": "0 K0A (B10,A0)", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "- K0B (B10,A3)", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "= K0C (B10,A4)", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "BACKSPACE K0D (B10,A5)", "matrix": [0, 13], "x": 13, "y": 0, "w": 2}, + {"label": "INS (B10,B11)", "matrix": [0, 14], "x": 15, "y": 0}, + {"label": "TAB (B1,B12)", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q (B1,B14)", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W (B1,B15)", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E (B1,A8)", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R (B1,B13)", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T (B1,B3)", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y (B1,B4)", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U (B1,B5)", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I (B1,A1)", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O (B1,A2)", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P (B1,A0)", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "[ (B1,A3)", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "] (B1,A4)", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "\" (B1,A5)", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"label": "DEL (B1,B11)", "matrix": [1, 14], "x": 15, "y": 1}, + {"label": "CAPSLOCK (B0,B12)", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.25}, + {"label": "A (B0,B14)", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S (B0,B15)", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D (B0,A8)", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F (B0,B13)", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G (B0,B3)", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H (B0,B4)", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J (B0,B5)", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K (B0,A1)", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L (B0,A2)", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": "; (B0,A0)", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "' (B0,A3)", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "ENTER (B0,A5)", "matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"label": "PGUP (B0,B11)", "matrix": [2, 14], "x": 15, "y": 2}, + {"label": "LSHIFT (A7,B12)", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z (A7,B14)", "matrix": [3, 1], "x": 2.25, "y": 3}, + {"label": "X (A7,B15)", "matrix": [3, 2], "x": 3.25, "y": 3}, + {"label": "C (A7,A8)", "matrix": [3, 3], "x": 4.25, "y": 3}, + {"label": "V (A7,B13)", "matrix": [3, 4], "x": 5.25, "y": 3}, + {"label": "B (A7,B3)", "matrix": [3, 5], "x": 6.25, "y": 3}, + {"label": "N (A7,B4)", "matrix": [3, 6], "x": 7.25, "y": 3}, + {"label": "M (A7,B5)", "matrix": [3, 7], "x": 8.25, "y": 3}, + {"label": ", (A7,A1)", "matrix": [3, 8], "x": 9.25, "y": 3}, + {"label": ". (A7,A2)", "matrix": [3, 9], "x": 10.25, "y": 3}, + {"label": "/ (A7,A0)", "matrix": [3, 10], "x": 11.25, "y": 3}, + {"label": "RSHIFT (A7,A4)", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "UP (A7,A5)", "matrix": [3, 13], "x": 14, "y": 3}, + {"label": "PGDN (A7,B11)", "matrix": [3, 14], "x": 15, "y": 3}, + {"label": "LCTRL (A6,B12)", "matrix": [4, 0], "x": 0, "y": 4, "w": 1.5}, + {"label": "WIN (A6,B14)", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "ALT (A6,B15)", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "SPACE (A6,A8)", "matrix": [4, 3], "x": 4, "y": 4, "w": 7}, + {"label": "FN (A6,A0)", "matrix": [4, 10], "x": 11, "y": 4, "w": 1.5}, + {"label": "LEFT (A6,A4)", "matrix": [4, 12], "x": 13, "y": 4}, + {"label": "DOWN (A6,A5)", "matrix": [4, 13], "x": 14, "y": 4}, + {"label": "RIGHT (A6,B11)", "matrix": [4, 14], "x": 15, "y": 4} ] } } diff --git a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c index 8b5ea4c3341b..4c857eece9d0 100644 --- a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c +++ b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_MPLY ), - [3] = LAYOUT( + [2] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ), - [4] = LAYOUT( + [3] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -38,4 +38,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ), -}; \ No newline at end of file +}; +//Initialize all RGB indicators to 'off'初始化rgb +__attribute__((weak)) +void keyboard_post_inti_user(void) { + rgblight_setrgb_at(0, 0, 0, 0); +} + +//Indicator light function +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + if (led_state.caps_lock) { + rgblight_setrgb_at(255, 255, 255, 0); //white + } else { + rgblight_setrgb_at(0, 0, 0, 0); + } +} + return res; +} diff --git a/keyboards/citrus/erdnuss65/mcuconf.h b/keyboards/citrus/erdnuss65/mcuconf.h deleted file mode 100644 index ce1e6ba1cbce..000000000000 --- a/keyboards/citrus/erdnuss65/mcuconf.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright 2020 QMK - * - * 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 . - */ - -#pragma once - -#include_next - -#undef STM32_I2C_USE_DMA -#define STM32_I2C_USE_DMA FALSE From 7771bd9c2317862fae30de1922cc20c74bcc3cb4 Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Tue, 21 Mar 2023 11:49:23 +0800 Subject: [PATCH 07/19] update --- .../citrus/erdnuss65/keymaps/default/keymap.c | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c index 8b5ea4c3341b..4c857eece9d0 100644 --- a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c +++ b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_MPLY ), - [3] = LAYOUT( + [2] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ), - [4] = LAYOUT( + [3] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -38,4 +38,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ), -}; \ No newline at end of file +}; +//Initialize all RGB indicators to 'off'初始化rgb +__attribute__((weak)) +void keyboard_post_inti_user(void) { + rgblight_setrgb_at(0, 0, 0, 0); +} + +//Indicator light function +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + if (led_state.caps_lock) { + rgblight_setrgb_at(255, 255, 255, 0); //white + } else { + rgblight_setrgb_at(0, 0, 0, 0); + } +} + return res; +} From 57fb0f8f8cf3d2bf0785e498effb432a87dc064c Mon Sep 17 00:00:00 2001 From: cttt <57359810+ctt-t@users.noreply.github.com> Date: Tue, 21 Mar 2023 14:59:09 +0800 Subject: [PATCH 08/19] Create config.h From 95976c8dc45f24403393e83fba35612a4bf9046b Mon Sep 17 00:00:00 2001 From: cttt <57359810+ctt-t@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:01:09 +0800 Subject: [PATCH 09/19] Update info.json --- keyboards/citrus/erdnuss65/info.json | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/keyboards/citrus/erdnuss65/info.json b/keyboards/citrus/erdnuss65/info.json index 2c8be14ebdf7..882dcc7c2125 100644 --- a/keyboards/citrus/erdnuss65/info.json +++ b/keyboards/citrus/erdnuss65/info.json @@ -18,8 +18,6 @@ }, "diode_direction": "COL2ROW", - - "debounce": 5, "features": { "bootmagic": true, @@ -34,15 +32,7 @@ }, "rgblight": { "pin": "A15", - "led_count": 1, - "hue_steps": 8, - "saturation_steps": 8, - "brightness_steps": 8, - "max_brightness": 200, - "sleep": true, - "animations": { - "all": false - } + "led_count": 1 }, "layouts": { "LAYOUT": { @@ -116,4 +106,4 @@ ] } } -} \ No newline at end of file +} From 8e90005122e67baf354074770e17f41ee113a09a Mon Sep 17 00:00:00 2001 From: cttt <57359810+ctt-t@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:03:09 +0800 Subject: [PATCH 10/19] =?UTF-8?q?Update=20and=20rename=20keyboards/citrus/?= =?UTF-8?q?erdnuss65/keymaps/default/keymap.c=20to=20=E9=94=AE=E7=9B=98/?= =?UTF-8?q?=E6=9F=91=E6=A9=98/=E5=8E=84=E5=BE=B7=E5=8A=AA=E6=96=AF65/?= =?UTF-8?q?=E9=94=AE=E7=9B=98=E6=98=A0=E5=B0=84/=E8=BF=9D=E7=BA=A6/keymap.?= =?UTF-8?q?c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\350\277\235\347\272\246/keymap.c" | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) rename keyboards/citrus/erdnuss65/keymaps/default/keymap.c => "\351\224\256\347\233\230/\346\237\221\346\251\230/\345\216\204\345\276\267\345\212\252\346\226\25765/\351\224\256\347\233\230\346\230\240\345\260\204/\350\277\235\347\272\246/keymap.c" (91%) diff --git a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c "b/\351\224\256\347\233\230/\346\237\221\346\251\230/\345\216\204\345\276\267\345\212\252\346\226\25765/\351\224\256\347\233\230\346\230\240\345\260\204/\350\277\235\347\272\246/keymap.c" similarity index 91% rename from keyboards/citrus/erdnuss65/keymaps/default/keymap.c rename to "\351\224\256\347\233\230/\346\237\221\346\251\230/\345\216\204\345\276\267\345\212\252\346\226\25765/\351\224\256\347\233\230\346\230\240\345\260\204/\350\277\235\347\272\246/keymap.c" index 4c857eece9d0..f08e3dcabcb3 100644 --- a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c +++ "b/\351\224\256\347\233\230/\346\237\221\346\251\230/\345\216\204\345\276\267\345\212\252\346\226\25765/\351\224\256\347\233\230\346\230\240\345\260\204/\350\277\235\347\272\246/keymap.c" @@ -39,21 +39,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -//Initialize all RGB indicators to 'off'初始化rgb -__attribute__((weak)) -void keyboard_post_inti_user(void) { - rgblight_setrgb_at(0, 0, 0, 0); -} - //Indicator light function -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { +bool led_update_user(led_t led_state) { if (led_state.caps_lock) { rgblight_setrgb_at(255, 255, 255, 0); //white } else { rgblight_setrgb_at(0, 0, 0, 0); } -} - return res; + return true; } From 7fb911e2d32443b299febae141716e39c039dd5a Mon Sep 17 00:00:00 2001 From: cttt <57359810+ctt-t@users.noreply.github.com> Date: Tue, 21 Mar 2023 15:07:26 +0800 Subject: [PATCH 11/19] Delete keymap.c --- .../\350\277\235\347\272\246/keymap.c" | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 "\351\224\256\347\233\230/\346\237\221\346\251\230/\345\216\204\345\276\267\345\212\252\346\226\25765/\351\224\256\347\233\230\346\230\240\345\260\204/\350\277\235\347\272\246/keymap.c" diff --git "a/\351\224\256\347\233\230/\346\237\221\346\251\230/\345\216\204\345\276\267\345\212\252\346\226\25765/\351\224\256\347\233\230\346\230\240\345\260\204/\350\277\235\347\272\246/keymap.c" "b/\351\224\256\347\233\230/\346\237\221\346\251\230/\345\216\204\345\276\267\345\212\252\346\226\25765/\351\224\256\347\233\230\346\230\240\345\260\204/\350\277\235\347\272\246/keymap.c" deleted file mode 100644 index f08e3dcabcb3..000000000000 --- "a/\351\224\256\347\233\230/\346\237\221\346\251\230/\345\216\204\345\276\267\345\212\252\346\226\25765/\351\224\256\347\233\230\346\230\240\345\260\204/\350\277\235\347\272\246/keymap.c" +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2023 Citrus Lab -// SPDX-License-Identifier: GPL-2.0 -#include QMK_KEYBOARD_H - -#define XXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT( - KC_ESC, 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_INS, - 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_DEL, - 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_PGUP, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), - - [1] = LAYOUT( - KC_GRV, 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_MPRV, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, RESET, KC_MNXT, - _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, KC_HOME, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MYCM, KC_VOLU, KC_END, - _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_MPLY - ), - - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ - ), - -}; -//Indicator light function -bool led_update_user(led_t led_state) { - if (led_state.caps_lock) { - rgblight_setrgb_at(255, 255, 255, 0); //white - } else { - rgblight_setrgb_at(0, 0, 0, 0); - } - return true; -} From 8fb411877df465cc5dd24273ccb7262be2457d1c Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Tue, 21 Mar 2023 15:10:25 +0800 Subject: [PATCH 12/19] update --- keyboards/citrus/erdnuss65/config.h | 5 +---- keyboards/citrus/erdnuss65/info.json | 12 +----------- keyboards/citrus/erdnuss65/keymaps/default/keymap.c | 12 ++---------- keyboards/citrus/erdnuss65/keymaps/via/keymap.c | 13 ++----------- 4 files changed, 6 insertions(+), 36 deletions(-) diff --git a/keyboards/citrus/erdnuss65/config.h b/keyboards/citrus/erdnuss65/config.h index 79e579e6788c..5e4a88b9e23f 100644 --- a/keyboards/citrus/erdnuss65/config.h +++ b/keyboards/citrus/erdnuss65/config.h @@ -15,12 +15,9 @@ */ #pragma once -#include "config_common.h" - // The pin connected to the data pin of the LEDs #define RGBLIGHT_LAYERS//允许您定义可打开或关闭的照明层。非常适合显示当前键盘层或大写锁定状态。 #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF//如果已定义,则即使 RGB 光源处于关闭状态,也会显示照明图层。 #define LOCKING_SUPPORT_ENABLE -#define LOCKING_RESYNC_ENABLE//尝试使开关状态与键盘指示灯状态保持一致 - +#define LOCKING_RESYNC_ENABLE//尝试使开关状态与键盘指示灯状态保持一致 \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/info.json b/keyboards/citrus/erdnuss65/info.json index 2c8be14ebdf7..9f56c1e6f588 100644 --- a/keyboards/citrus/erdnuss65/info.json +++ b/keyboards/citrus/erdnuss65/info.json @@ -19,8 +19,6 @@ "diode_direction": "COL2ROW", - "debounce": 5, - "features": { "bootmagic": true, "mousekey": true, @@ -34,15 +32,7 @@ }, "rgblight": { "pin": "A15", - "led_count": 1, - "hue_steps": 8, - "saturation_steps": 8, - "brightness_steps": 8, - "max_brightness": 200, - "sleep": true, - "animations": { - "all": false - } + "led_count": 1 }, "layouts": { "LAYOUT": { diff --git a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c index 4c857eece9d0..0fcdbdfa1b71 100644 --- a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c +++ b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c @@ -39,21 +39,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -//Initialize all RGB indicators to 'off'初始化rgb -__attribute__((weak)) -void keyboard_post_inti_user(void) { - rgblight_setrgb_at(0, 0, 0, 0); -} //Indicator light function -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { +bool led_update_user(led_t led_state) { if (led_state.caps_lock) { rgblight_setrgb_at(255, 255, 255, 0); //white } else { rgblight_setrgb_at(0, 0, 0, 0); } -} - return res; + return true; } diff --git a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c index 4c857eece9d0..f08e3dcabcb3 100644 --- a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c +++ b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c @@ -39,21 +39,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -//Initialize all RGB indicators to 'off'初始化rgb -__attribute__((weak)) -void keyboard_post_inti_user(void) { - rgblight_setrgb_at(0, 0, 0, 0); -} - //Indicator light function -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { +bool led_update_user(led_t led_state) { if (led_state.caps_lock) { rgblight_setrgb_at(255, 255, 255, 0); //white } else { rgblight_setrgb_at(0, 0, 0, 0); } -} - return res; + return true; } From e23158705f92d05602728327ccbe6dad122e1108 Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Tue, 21 Mar 2023 15:14:30 +0800 Subject: [PATCH 13/19] Create keymap.c --- .../citrus/erdnuss65/keymaps/default/keymap.c | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 keyboards/citrus/erdnuss65/keymaps/default/keymap.c diff --git a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c new file mode 100644 index 000000000000..f08e3dcabcb3 --- /dev/null +++ b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c @@ -0,0 +1,50 @@ +// Copyright 2023 Citrus Lab +// SPDX-License-Identifier: GPL-2.0 +#include QMK_KEYBOARD_H + +#define XXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, 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_INS, + 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_DEL, + 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + KC_GRV, 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_MPRV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______, _______, RESET, KC_MNXT, + _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MYCM, KC_VOLU, KC_END, + _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_MPLY + ), + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; +//Indicator light function +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { + rgblight_setrgb_at(255, 255, 255, 0); //white + } else { + rgblight_setrgb_at(0, 0, 0, 0); + } + return true; +} From 43829a1276a44e318aca51c37defe20f07dffaeb Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Tue, 21 Mar 2023 15:21:18 +0800 Subject: [PATCH 14/19] Update readme.md --- keyboards/citrus/erdnuss65/readme.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/keyboards/citrus/erdnuss65/readme.md b/keyboards/citrus/erdnuss65/readme.md index e3720c93d7a6..0bb952c1115f 100644 --- a/keyboards/citrus/erdnuss65/readme.md +++ b/keyboards/citrus/erdnuss65/readme.md @@ -1,12 +1,7 @@ # Erdnuss65 - - -*A short description of the keyboard/project* - * Keyboard Maintainer: [Citrus Lab](https://github.com/ctt-t) -* Hardware Supported: *The PCBs, controllers supported* -* Hardware Availability: *Links to where you can find this hardware* +* Hardware Supported: STM32F103C8T6 Make example for this keyboard (after setting up your build environment): From 612c1c74fe777441d340b2f86a61598c6f53b2f4 Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Wed, 22 Mar 2023 11:48:42 +0800 Subject: [PATCH 15/19] Simplify the same code --- keyboards/citrus/erdnuss65/erdnuss65.c | 26 +++++++++++++++++++ keyboards/citrus/erdnuss65/erdnuss65.h | 18 +++++++++++++ .../citrus/erdnuss65/keymaps/via/keymap.c | 9 ------- 3 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 keyboards/citrus/erdnuss65/erdnuss65.c create mode 100644 keyboards/citrus/erdnuss65/erdnuss65.h diff --git a/keyboards/citrus/erdnuss65/erdnuss65.c b/keyboards/citrus/erdnuss65/erdnuss65.c new file mode 100644 index 000000000000..db3029afadbf --- /dev/null +++ b/keyboards/citrus/erdnuss65/erdnuss65.c @@ -0,0 +1,26 @@ +/* Copyright 2023 Citrus Lab + * + * 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 . + */ +#include "erdnuss65.h" + +//Indicator light function +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { + rgblight_setrgb_at(255, 255, 255, 0); //white + } else { + rgblight_setrgb_at(0, 0, 0, 0); + } + return true; +} \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/erdnuss65.h b/keyboards/citrus/erdnuss65/erdnuss65.h new file mode 100644 index 000000000000..6af8e7513d50 --- /dev/null +++ b/keyboards/citrus/erdnuss65/erdnuss65.h @@ -0,0 +1,18 @@ +/* Copyright 2023 Citrus Lab + * + * 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 . + */ +#pragma once + +#include "quantum.h" diff --git a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c index f08e3dcabcb3..4c1d3c15b5f7 100644 --- a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c +++ b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c @@ -39,12 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -//Indicator light function -bool led_update_user(led_t led_state) { - if (led_state.caps_lock) { - rgblight_setrgb_at(255, 255, 255, 0); //white - } else { - rgblight_setrgb_at(0, 0, 0, 0); - } - return true; -} From ce5f4287decddd838a1455a9faef9cc94ed09fbd Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Wed, 22 Mar 2023 12:20:56 +0800 Subject: [PATCH 16/19] Update keymap.c --- keyboards/citrus/erdnuss65/keymaps/default/keymap.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c index f08e3dcabcb3..287f7a7215fc 100644 --- a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c +++ b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c @@ -39,12 +39,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -//Indicator light function -bool led_update_user(led_t led_state) { - if (led_state.caps_lock) { - rgblight_setrgb_at(255, 255, 255, 0); //white - } else { - rgblight_setrgb_at(0, 0, 0, 0); - } - return true; -} + From afb0965b9b5c40d05294f5cf609999a396791280 Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Thu, 23 Mar 2023 01:13:43 +0800 Subject: [PATCH 17/19] Change some code --- keyboards/citrus/erdnuss65/erdnuss65.c | 14 ++++++++------ keyboards/citrus/erdnuss65/erdnuss65.h | 18 ------------------ 2 files changed, 8 insertions(+), 24 deletions(-) delete mode 100644 keyboards/citrus/erdnuss65/erdnuss65.h diff --git a/keyboards/citrus/erdnuss65/erdnuss65.c b/keyboards/citrus/erdnuss65/erdnuss65.c index db3029afadbf..d10f476c66d1 100644 --- a/keyboards/citrus/erdnuss65/erdnuss65.c +++ b/keyboards/citrus/erdnuss65/erdnuss65.c @@ -13,14 +13,16 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "erdnuss65.h" +#include "quantum.h" //Indicator light function -bool led_update_user(led_t led_state) { - if (led_state.caps_lock) { - rgblight_setrgb_at(255, 255, 255, 0); //white - } else { - rgblight_setrgb_at(0, 0, 0, 0); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + if (led_state.caps_lock) { + rgblight_setrgb_at(255, 255, 255, 0); //white + } else { + rgblight_setrgb_at(0, 0, 0, 0); + } } return true; } \ No newline at end of file diff --git a/keyboards/citrus/erdnuss65/erdnuss65.h b/keyboards/citrus/erdnuss65/erdnuss65.h deleted file mode 100644 index 6af8e7513d50..000000000000 --- a/keyboards/citrus/erdnuss65/erdnuss65.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2023 Citrus Lab - * - * 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 . - */ -#pragma once - -#include "quantum.h" From 31566fd6ee8a6f8ea6587851bd8618fcfb5e3d98 Mon Sep 17 00:00:00 2001 From: cttt <1219008126@qq.com> Date: Thu, 23 Mar 2023 16:09:11 +0800 Subject: [PATCH 18/19] update keymap.c --- keyboards/citrus/erdnuss65/keymaps/default/keymap.c | 2 -- keyboards/citrus/erdnuss65/keymaps/via/keymap.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c index 287f7a7215fc..93aee246b01f 100644 --- a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c +++ b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c @@ -2,8 +2,6 @@ // SPDX-License-Identifier: GPL-2.0 #include QMK_KEYBOARD_H -#define XXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( diff --git a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c index 4c1d3c15b5f7..0f1bf9525e66 100644 --- a/keyboards/citrus/erdnuss65/keymaps/via/keymap.c +++ b/keyboards/citrus/erdnuss65/keymaps/via/keymap.c @@ -2,8 +2,6 @@ // SPDX-License-Identifier: GPL-2.0 #include QMK_KEYBOARD_H -#define XXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( From 1b8e1e497a19614e970f7b7d19f0902dd29613cb Mon Sep 17 00:00:00 2001 From: jack <0x6a73@protonmail.com> Date: Sun, 2 Apr 2023 11:54:51 -0600 Subject: [PATCH 19/19] Update keyboards/citrus/erdnuss65/keymaps/default/keymap.c --- .../citrus/erdnuss65/keymaps/default/keymap.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c index 93aee246b01f..0daef5af6461 100644 --- a/keyboards/citrus/erdnuss65/keymaps/default/keymap.c +++ b/keyboards/citrus/erdnuss65/keymaps/default/keymap.c @@ -18,23 +18,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MYCM, KC_VOLU, KC_END, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_MPLY - ), - - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ - ), - + ) };