From 71531d53fb448ecb9dd61b42cdd3d7423cb39585 Mon Sep 17 00:00:00 2001
From: JackyJia73 <128167503+JackyJia73@users.noreply.github.com>
Date: Tue, 13 Aug 2024 18:12:34 +0800
Subject: [PATCH 01/35] Add al68 keyboard
---
keyboards/yunzii/al68/al68.c | 55 +++++
keyboards/yunzii/al68/al68.h | 27 +++
keyboards/yunzii/al68/config.h | 23 ++
keyboards/yunzii/al68/halconf.h | 23 ++
keyboards/yunzii/al68/keyboard.json | 207 ++++++++++++++++++
.../yunzii/al68/keymaps/default/keymap.c | 39 ++++
keyboards/yunzii/al68/keymaps/via/keymap.c | 28 +++
keyboards/yunzii/al68/keymaps/via/rules.mk | 2 +
keyboards/yunzii/al68/mcuconf.h | 25 +++
keyboards/yunzii/al68/readme.md | 22 ++
keyboards/yunzii/al68/rules.mk | 3 +
keyboards/yunzii/common/smart_ble.c | 117 ++++++++++
keyboards/yunzii/common/smart_ble.h | 22 ++
13 files changed, 593 insertions(+)
create mode 100644 keyboards/yunzii/al68/al68.c
create mode 100644 keyboards/yunzii/al68/al68.h
create mode 100644 keyboards/yunzii/al68/config.h
create mode 100644 keyboards/yunzii/al68/halconf.h
create mode 100644 keyboards/yunzii/al68/keyboard.json
create mode 100644 keyboards/yunzii/al68/keymaps/default/keymap.c
create mode 100644 keyboards/yunzii/al68/keymaps/via/keymap.c
create mode 100644 keyboards/yunzii/al68/keymaps/via/rules.mk
create mode 100644 keyboards/yunzii/al68/mcuconf.h
create mode 100644 keyboards/yunzii/al68/readme.md
create mode 100644 keyboards/yunzii/al68/rules.mk
create mode 100644 keyboards/yunzii/common/smart_ble.c
create mode 100644 keyboards/yunzii/common/smart_ble.h
diff --git a/keyboards/yunzii/al68/al68.c b/keyboards/yunzii/al68/al68.c
new file mode 100644
index 00000000000..3e67da05020
--- /dev/null
+++ b/keyboards/yunzii/al68/al68.c
@@ -0,0 +1,55 @@
+// // /* Copyright 2022 Jacky
+// // *
+// // * 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 "quantum.h"
+#include "uart.h"
+#include "common/smart_ble.h"
+#include "al68.h"
+
+
+void keyboard_pre_init_kb(void) {
+ AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk);
+ AFIO->MAPR|= AFIO_MAPR_SWJ_CFG_DISABLE; //diable JTAG (GD32 different to STM32)
+ setPinOutput(A8);
+ writePinHigh(A8); //ENABLE USB
+ uart_init(460800);
+ wait_ms(400);
+ // debug_enable=true;
+ // debug_keyboard=true;
+ // debug_matrix=true;
+ // debug_mouse=true;
+ setPinOutput(B8);
+ writePinLow(B8);
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t* record)
+{
+ if (record->event.pressed){
+ if ((keycode>=KC_BLE1) && (keycode<=KC_24G))
+ {
+ WIRELESS_START(keycode-KC_USB);
+ return false;
+ }
+ else if (keycode == KC_USB)
+ {
+ WIRELESS_STOP();
+ return false;
+ }
+ }
+ return process_record_user(keycode, record);
+}
+
+
diff --git a/keyboards/yunzii/al68/al68.h b/keyboards/yunzii/al68/al68.h
new file mode 100644
index 00000000000..c68aa0aa142
--- /dev/null
+++ b/keyboards/yunzii/al68/al68.h
@@ -0,0 +1,27 @@
+// /* Copyright 2024 Jacky
+// *
+// * 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 .
+// */
+
+enum custom_keycodes {
+#ifdef VIA_ENABLE
+ KC_USB = QK_KB_0,
+#else
+ KC_USB = SAFE_RANGE,
+#endif
+ KC_BLE1,
+ KC_BLE2,
+ KC_BLE3,
+ KC_24G
+};
\ No newline at end of file
diff --git a/keyboards/yunzii/al68/config.h b/keyboards/yunzii/al68/config.h
new file mode 100644
index 00000000000..bd3d72b9d08
--- /dev/null
+++ b/keyboards/yunzii/al68/config.h
@@ -0,0 +1,23 @@
+/* Copyright 2022 Jacky
+ *
+ * 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 WS2812_PWM_DRIVER PWMD4
+#define WS2812_PWM_CHANNEL 3
+#define WS2812_PWM_PAL_MODE 2
+#define WS2812_DMA_STREAM STM32_DMA1_STREAM7
+#define WS2812_DMA_CHANNEL 7
diff --git a/keyboards/yunzii/al68/halconf.h b/keyboards/yunzii/al68/halconf.h
new file mode 100644
index 00000000000..51161381540
--- /dev/null
+++ b/keyboards/yunzii/al68/halconf.h
@@ -0,0 +1,23 @@
+// /* Copyright 2024 Jacky
+// *
+// * 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 HAL_USE_SERIAL TRUE
+
+#define HAL_USE_PWM TRUE
+
+#include_next
\ No newline at end of file
diff --git a/keyboards/yunzii/al68/keyboard.json b/keyboards/yunzii/al68/keyboard.json
new file mode 100644
index 00000000000..7efa437f4b7
--- /dev/null
+++ b/keyboards/yunzii/al68/keyboard.json
@@ -0,0 +1,207 @@
+{
+ "manufacturer": "YUNZII Keyboard",
+ "keyboard_name": "AL68",
+ "maintainer": "Jeff",
+ "bootloader": "stm32duino",
+ "diode_direction": "ROW2COL",
+ "encoder": {
+ "rotary": [
+ {"pin_a": "A7", "pin_b": "A6"}
+ ]
+ },
+ "features": {
+ "bootmagic": true,
+ "console": true,
+ "encoder": true,
+ "extrakey": true,
+ "mousekey": true,
+ "nkro": true,
+ "rgb_matrix": true
+ },
+ "matrix_pins": {
+ "cols": ["B0", "B2", "B10", "B11", "B12", "B13", "B14", "B15", "A14", "B3", "A15", "B5", "B6", "B7", "C13"],
+ "rows": ["A0", "A1", "A2", "A3", "A4"]
+ },
+ "processor": "STM32F103",
+ "rgb_matrix": {
+ "animations": {
+ "band_pinwheel_sat": true,
+ "band_pinwheel_val": true,
+ "band_sat": true,
+ "band_spiral_sat": true,
+ "band_spiral_val": true,
+ "band_val": true,
+ "breathing": true,
+ "cycle_all": true,
+ "cycle_left_right": true,
+ "cycle_out_in": true,
+ "cycle_out_in_dual": true,
+ "cycle_pinwheel": true,
+ "cycle_spiral": true,
+ "cycle_up_down": true,
+ "dual_beacon": true,
+ "gradient_left_right": true,
+ "gradient_up_down": true,
+ "hue_breathing": true,
+ "hue_pendulum": true,
+ "hue_wave": true,
+ "rainbow_beacon": true,
+ "rainbow_moving_chevron": true,
+ "rainbow_pinwheels": true
+ },
+ "driver": "ws2812",
+ "layout": [
+ {"matrix": [4, 5], "x": 95, "y": 64, "flags": 4},
+ {"matrix": [4, 10], "x": 151, "y": 64, "flags": 4},
+ {"matrix": [4, 11], "x": 170, "y": 64, "flags": 4},
+ {"matrix": [4, 12], "x": 183, "y": 64, "flags": 4},
+ {"matrix": [4, 13], "x": 194, "y": 64, "flags": 4},
+ {"matrix": [4, 14], "x": 224, "y": 64, "flags": 4},
+ {"matrix": [3, 14], "x": 224, "y": 48, "flags": 4},
+ {"matrix": [3, 13], "x": 209, "y": 48, "flags": 4},
+ {"matrix": [3, 12], "x": 188, "y": 48, "flags": 4},
+ {"matrix": [3, 11], "x": 168, "y": 48, "flags": 4},
+ {"matrix": [3, 10], "x": 153, "y": 48, "flags": 4},
+ {"matrix": [3, 9], "x": 138, "y": 48, "flags": 4},
+ {"matrix": [3, 8], "x": 123, "y": 48, "flags": 4},
+ {"matrix": [3, 7], "x": 108, "y": 48, "flags": 4},
+ {"matrix": [3, 6], "x": 93, "y": 48, "flags": 4},
+ {"matrix": [3, 5], "x": 78, "y": 48, "flags": 4},
+ {"matrix": [3, 4], "x": 63, "y": 48, "flags": 4},
+ {"matrix": [3, 3], "x": 48, "y": 48, "flags": 4},
+ {"matrix": [3, 2], "x": 34, "y": 48, "flags": 4},
+ {"matrix": [4, 2], "x": 39, "y": 64, "flags": 4},
+ {"matrix": [4, 1], "x": 20, "y": 64, "flags": 4},
+ {"matrix": [4, 0], "x": 2, "y": 64, "flags": 4},
+ {"matrix": [3, 0], "x": 9, "y": 48, "flags": 4},
+ {"matrix": [2, 0], "x": 6, "y": 32, "flags": 4},
+ {"matrix": [2, 1], "x": 25, "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": 130, "y": 32, "flags": 4},
+ {"matrix": [2, 9], "x": 145, "y": 32, "flags": 4},
+ {"matrix": [2, 10], "x": 160, "y": 32, "flags": 4},
+ {"matrix": [2, 11], "x": 175, "y": 32, "flags": 4},
+ {"matrix": [2, 13], "x": 200, "y": 32, "flags": 4},
+ {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4},
+ {"matrix": [1, 14], "x": 224, "y": 16, "flags": 4},
+ {"matrix": [1, 13], "x": 205, "y": 16, "flags": 4},
+ {"matrix": [1, 12], "x": 187, "y": 16, "flags": 4},
+ {"matrix": [1, 11], "x": 172, "y": 16, "flags": 4},
+ {"matrix": [1, 10], "x": 157, "y": 16, "flags": 4},
+ {"matrix": [1, 9], "x": 142, "y": 16, "flags": 4},
+ {"matrix": [1, 8], "x": 127, "y": 16, "flags": 4},
+ {"matrix": [1, 7], "x": 112, "y": 16, "flags": 4},
+ {"matrix": [1, 6], "x": 97, "y": 16, "flags": 4},
+ {"matrix": [1, 5], "x": 82, "y": 16, "flags": 4},
+ {"matrix": [1, 4], "x": 67, "y": 16, "flags": 4},
+ {"matrix": [1, 3], "x": 52, "y": 16, "flags": 4},
+ {"matrix": [1, 2], "x": 37, "y": 16, "flags": 4},
+ {"matrix": [1, 1], "x": 22, "y": 16, "flags": 4},
+ {"matrix": [1, 0], "x": 4, "y": 16, "flags": 4},
+ {"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": 119, "y": 0, "flags": 4},
+ {"matrix": [0, 9], "x": 134, "y": 0, "flags": 4},
+ {"matrix": [0, 10], "x": 149, "y": 0, "flags": 4},
+ {"matrix": [0, 11], "x": 164, "y": 0, "flags": 4},
+ {"matrix": [0, 12], "x": 179, "y": 0, "flags": 4},
+ {"matrix": [0, 13], "x": 202, "y": 0, "flags": 4}
+ ]
+ },
+ "url": "https://www.yunzii.com",
+ "usb": {
+ "device_version": "1.0.2",
+ "no_startup_check": true,
+ "pid": "0x304E",
+ "vid": "0x414A",
+ "wait_for_enumeration": false
+ },
+ "ws2812": {
+ "driver": "pwm",
+ "pin": "B8"
+ },
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+ {"matrix": [0, 5], "x": 5, "y": 0},
+ {"matrix": [0, 6], "x": 6, "y": 0},
+ {"matrix": [0, 7], "x": 7, "y": 0},
+ {"matrix": [0, 8], "x": 8, "y": 0},
+ {"matrix": [0, 9], "x": 9, "y": 0},
+ {"matrix": [0, 10], "x": 10, "y": 0},
+ {"matrix": [0, 11], "x": 11, "y": 0},
+ {"matrix": [0, 12], "x": 12, "y": 0},
+ {"matrix": [0, 13], "x": 14, "y": 0},
+ {"matrix": [0, 14], "x": 15, "y": 0},
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1.5, "y": 1},
+ {"matrix": [1, 2], "x": 2.5, "y": 1},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1},
+ {"matrix": [1, 5], "x": 5.5, "y": 1},
+ {"matrix": [1, 6], "x": 6.5, "y": 1},
+ {"matrix": [1, 7], "x": 7.5, "y": 1},
+ {"matrix": [1, 8], "x": 8.5, "y": 1},
+ {"matrix": [1, 9], "x": 9.5, "y": 1},
+ {"matrix": [1, 10], "x": 10.5, "y": 1},
+ {"matrix": [1, 11], "x": 11.5, "y": 1},
+ {"matrix": [1, 12], "x": 12.5, "y": 1},
+ {"matrix": [1, 13], "x": 14, "y": 1},
+ {"matrix": [1, 14], "x": 15, "y": 1},
+ {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1.75, "y": 2},
+ {"matrix": [2, 2], "x": 2.75, "y": 2},
+ {"matrix": [2, 3], "x": 3.75, "y": 2},
+ {"matrix": [2, 4], "x": 4.75, "y": 2},
+ {"matrix": [2, 5], "x": 5.75, "y": 2},
+ {"matrix": [2, 6], "x": 6.75, "y": 2},
+ {"matrix": [2, 7], "x": 7.75, "y": 2},
+ {"matrix": [2, 8], "x": 8.75, "y": 2},
+ {"matrix": [2, 9], "x": 9.75, "y": 2},
+ {"matrix": [2, 10], "x": 10.75, "y": 2},
+ {"matrix": [2, 11], "x": 11.75, "y": 2},
+ {"matrix": [2, 13], "x": 14, "y": 2},
+ {"matrix": [2, 14], "x": 15, "y": 2},
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 2], "x": 2.5, "y": 3},
+ {"matrix": [3, 3], "x": 3.5, "y": 3},
+ {"matrix": [3, 4], "x": 4.5, "y": 3},
+ {"matrix": [3, 5], "x": 5.5, "y": 3},
+ {"matrix": [3, 6], "x": 6.5, "y": 3},
+ {"matrix": [3, 7], "x": 7.5, "y": 3},
+ {"matrix": [3, 8], "x": 8.5, "y": 3},
+ {"matrix": [3, 9], "x": 9.5, "y": 3},
+ {"matrix": [3, 10], "x": 10.5, "y": 3},
+ {"matrix": [3, 11], "x": 11.5, "y": 3},
+ {"matrix": [3, 12], "x": 13, "y": 3},
+ {"matrix": [3, 13], "x": 14, "y": 3},
+ {"matrix": [3, 14], "x": 15, "y": 3},
+ {"matrix": [4, 0], "x": 0, "y": 4},
+ {"matrix": [4, 1], "x": 1.25, "y": 4},
+ {"matrix": [4, 2], "x": 2.5, "y": 4},
+ {"matrix": [4, 5], "x": 8.75, "y": 4},
+ {"matrix": [4, 10], "x": 10, "y": 4},
+ {"matrix": [4, 11], "x": 11.25, "y": 4},
+ {"matrix": [4, 12], "x": 12.5, "y": 4},
+ {"matrix": [4, 13], "x": 13.75, "y": 4},
+ {"matrix": [4, 14], "x": 15, "y": 4}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/yunzii/al68/keymaps/default/keymap.c b/keyboards/yunzii/al68/keymaps/default/keymap.c
new file mode 100644
index 00000000000..f38f1c80dca
--- /dev/null
+++ b/keyboards/yunzii/al68/keymaps/default/keymap.c
@@ -0,0 +1,39 @@
+/*
+Copyright 2021 owlab
+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 QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+
+ [0] = LAYOUT(
+ KC_ESC, 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_PSCR, KC_PSCR, KC_PAUS,
+ KC_GRV, 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_HOME, KC_PGUP,
+ 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_END, KC_PGDN,
+ 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_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_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT,
+ _______, _______
+ )
+ [1] = LAYOUT(
+ _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______,
+ _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EE_CLR, QK_BOOT, _______, _______,
+ _______, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, RGB_HUI, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, RGB_MOD,
+ _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI,
+ _______, _______
+
+ )
+};
diff --git a/keyboards/yunzii/al68/keymaps/via/keymap.c b/keyboards/yunzii/al68/keymaps/via/keymap.c
new file mode 100644
index 00000000000..5e2cc279d85
--- /dev/null
+++ b/keyboards/yunzii/al68/keymaps/via/keymap.c
@@ -0,0 +1,28 @@
+#include QMK_KEYBOARD_H
+
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(_______, _______) }
+};
+#endif
+
+
+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_MUTE,
+ 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_DELETE,
+ 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_PAGE_UP,
+ 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_PAGE_DOWN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+ [1] = LAYOUT(
+ KC_GRV, KC_BRID, KC_BRIU, _______, KC_MYCM, KC_MAIL, KC_WHOM, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_VOLD, KC_VOLU, _______, _______,
+ _______, KC_BLE1, KC_BLE2, KC_BLE3, KC_24G, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______,
+ _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI
+ )
+};
+
+
diff --git a/keyboards/yunzii/al68/keymaps/via/rules.mk b/keyboards/yunzii/al68/keymaps/via/rules.mk
new file mode 100644
index 00000000000..4253f570f0b
--- /dev/null
+++ b/keyboards/yunzii/al68/keymaps/via/rules.mk
@@ -0,0 +1,2 @@
+VIA_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/yunzii/al68/mcuconf.h b/keyboards/yunzii/al68/mcuconf.h
new file mode 100644
index 00000000000..25e5473ec67
--- /dev/null
+++ b/keyboards/yunzii/al68/mcuconf.h
@@ -0,0 +1,25 @@
+// /* Copyright 2024 Jacky
+// *
+// * 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_SERIAL_USE_USART1
+#define STM32_SERIAL_USE_USART1 TRUE
+
+#undef STM32_PWM_USE_TIM4
+#define STM32_PWM_USE_TIM4 TRUE
\ No newline at end of file
diff --git a/keyboards/yunzii/al68/readme.md b/keyboards/yunzii/al68/readme.md
new file mode 100644
index 00000000000..d666ffbfffa
--- /dev/null
+++ b/keyboards/yunzii/al68/readme.md
@@ -0,0 +1,22 @@
+# MK AL68
+
+* A customizable 68keys keyboard.
+![AL68](https://i.imgur.com/mhiYDh3.png)
+* Keyboard Maintainer: [Jeff](https://github.com/yunziikeyboard)
+* Hardware Supported: [yunzii](https://www.yunzii.com)
+* Hardware Availability: [yunzii](https://www.yunzii.com)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make mk/al68:default
+
+Flashing example for this keyboard:
+
+ make mk/al68:default:flash
+
+See the build environment setup and the make instructions for more information. Brand new to QMK? Start with our Complete Newbs Guide.
+
+## Bootloader ESC the bootloader in 3 ways:
+* **Bootmagic reset: Hold down Enter in the keyboard then replug
+* **Physical reset button: Briefly press the button on the back of the PCB
+* **Keycode in layout: Press the key mapped to QK_BOOT
\ No newline at end of file
diff --git a/keyboards/yunzii/al68/rules.mk b/keyboards/yunzii/al68/rules.mk
new file mode 100644
index 00000000000..286cb110da6
--- /dev/null
+++ b/keyboards/yunzii/al68/rules.mk
@@ -0,0 +1,3 @@
+MCU_LDSCRIPT = STM32F103xB
+UART_DRIVER_REQUIRED = yes
+SRC += ./common/smart_ble.c
diff --git a/keyboards/yunzii/common/smart_ble.c b/keyboards/yunzii/common/smart_ble.c
new file mode 100644
index 00000000000..16bf4d96206
--- /dev/null
+++ b/keyboards/yunzii/common/smart_ble.c
@@ -0,0 +1,117 @@
+// /* Copyright 2024 Jacky
+// *
+// * 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 "uart.h"
+#include "ch.h"
+#include "hal.h"
+#include "host.h"
+#include "host_driver.h"
+#include "report.h"
+#include "smart_ble.h"
+
+static uint8_t sc_ble_leds(void) {
+ return 0; // TODO: Get LED status BLE
+}
+
+static void sc_ble_mouse(report_mouse_t *report) {
+ static uint8_t last_report[sizeof(report_mouse_t)]={0};
+
+ if (!has_mouse_report_changed((report_mouse_t *)last_report, report)) return;
+ memcpy(last_report,report,sizeof(report_mouse_t));
+ uart_write(0x55);
+ uart_write(sizeof(report_mouse_t));
+ uart_transmit(last_report,sizeof(report_mouse_t));
+}
+
+
+static void sc_ble_extra(report_extra_t *report) {
+ uart_write(0x55);
+ uart_write(sizeof(report_extra_t));
+ uart_transmit((uint8_t *)report,sizeof(report_extra_t));
+}
+
+static void sc_ble_keyboard(report_keyboard_t *report) {
+ uart_write(0x55);
+ uart_write(0x09);
+ uart_write(0x01);
+ uart_transmit((uint8_t *)report,KEYBOARD_REPORT_SIZE);
+}
+
+static void sc_send_nkro(report_nkro_t *report)
+{
+ uart_write(0x55);
+ uart_write(0x12);
+ uart_transmit((uint8_t *)report,0x12);
+}
+
+static host_driver_t *last_host_driver = NULL;
+static host_driver_t sc_ble_driver = {
+ sc_ble_leds, sc_ble_keyboard,sc_send_nkro,sc_ble_mouse, sc_ble_extra
+};
+
+
+void smart_ble_startup(void) {
+ if (host_get_driver() == &sc_ble_driver) {
+ return;
+ }
+ clear_keyboard();
+ last_host_driver = host_get_driver();
+ host_set_driver(&sc_ble_driver);
+}
+
+void smart_ble_disconnect(void) {
+ if (host_get_driver() != &sc_ble_driver) {
+ return;
+ }
+ clear_keyboard();
+ host_set_driver(last_host_driver);
+}
+
+
+void sc_ble_battary(uint8_t batt_level) {
+ uart_write(0x55);
+ uart_write(0x02);
+ uart_write(0x09);
+ uart_write(batt_level);
+}
+
+void WIRELESS_START(uint32_t mode)
+{
+ uint8_t ble_command[24];
+ smart_ble_startup();
+ if(mode<1 || mode>4)
+ {
+ mode=1;
+ }
+ ble_command[0]=0x55;
+ ble_command[1]=20;
+ ble_command[2]=0;
+ ble_command[3]=mode;
+ strcpy((char * restrict)(ble_command+4),PRODUCT);
+ ble_command[strlen(PRODUCT)+4]='-';
+ ble_command[strlen(PRODUCT)+5]='0' + mode;
+ ble_command[strlen(PRODUCT)+6]= 0;
+ uart_transmit(ble_command,sizeof(ble_command));
+}
+
+void WIRELESS_STOP(void)
+{
+ smart_ble_disconnect();
+ uart_write(0x55);
+ uart_write(0x02);
+ uart_write(0x00);
+ uart_write(0x00);
+}
\ No newline at end of file
diff --git a/keyboards/yunzii/common/smart_ble.h b/keyboards/yunzii/common/smart_ble.h
new file mode 100644
index 00000000000..34859fca88b
--- /dev/null
+++ b/keyboards/yunzii/common/smart_ble.h
@@ -0,0 +1,22 @@
+// /* Copyright 2024 Jacky
+// *
+// * 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"
+
+void sc_ble_battary(uint8_t batt_level);
+void WIRELESS_START(uint32_t mode);
+void WIRELESS_STOP(void);
\ No newline at end of file
From 6c72d1172dd6e0d1a0801923e3d84bb4ba29e223 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Wed, 14 Aug 2024 11:27:53 +0800
Subject: [PATCH 02/35] ADD LICENSE
---
.../yunzii/al68/keymaps/default/keymap.c | 76 ++++++++++---------
keyboards/yunzii/al68/keymaps/via/keymap.c | 15 ++++
keyboards/yunzii/al68/keymaps/via/rules.mk | 3 +-
keyboards/yunzii/al68/rules.mk | 1 +
4 files changed, 57 insertions(+), 38 deletions(-)
diff --git a/keyboards/yunzii/al68/keymaps/default/keymap.c b/keyboards/yunzii/al68/keymaps/default/keymap.c
index f38f1c80dca..dd976872053 100644
--- a/keyboards/yunzii/al68/keymaps/default/keymap.c
+++ b/keyboards/yunzii/al68/keymaps/default/keymap.c
@@ -1,39 +1,43 @@
-/*
-Copyright 2021 owlab
-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 .
-*/
-
+/* Copyright 2022 Jacky
+ *
+ * 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 QMK_KEYBOARD_H
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
-
- [0] = LAYOUT(
- KC_ESC, 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_PSCR, KC_PSCR, KC_PAUS,
- KC_GRV, 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_HOME, KC_PGUP,
- 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_END, KC_PGDN,
- 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_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_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT,
- _______, _______
- )
- [1] = LAYOUT(
- _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______,
- _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EE_CLR, QK_BOOT, _______, _______,
- _______, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, RGB_HUI, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, RGB_MOD,
- _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI,
- _______, _______
-
- )
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(_______, _______) }
};
+#endif
+
+
+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_MUTE,
+ 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_DELETE,
+ 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_PAGE_UP,
+ 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_PAGE_DOWN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+ [1] = LAYOUT(
+ KC_GRV, KC_BRID, KC_BRIU, _______, KC_MYCM, KC_MAIL, KC_WHOM, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_VOLD, KC_VOLU, _______, _______,
+ _______, KC_BLE1, KC_BLE2, KC_BLE3, KC_24G, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______,
+ _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI
+ )
+};
+
+
diff --git a/keyboards/yunzii/al68/keymaps/via/keymap.c b/keyboards/yunzii/al68/keymaps/via/keymap.c
index 5e2cc279d85..dd976872053 100644
--- a/keyboards/yunzii/al68/keymaps/via/keymap.c
+++ b/keyboards/yunzii/al68/keymaps/via/keymap.c
@@ -1,3 +1,18 @@
+/* Copyright 2022 Jacky
+ *
+ * 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 QMK_KEYBOARD_H
#if defined(ENCODER_MAP_ENABLE)
diff --git a/keyboards/yunzii/al68/keymaps/via/rules.mk b/keyboards/yunzii/al68/keymaps/via/rules.mk
index 4253f570f0b..036bd6d1c3e 100644
--- a/keyboards/yunzii/al68/keymaps/via/rules.mk
+++ b/keyboards/yunzii/al68/keymaps/via/rules.mk
@@ -1,2 +1 @@
-VIA_ENABLE = yes
-ENCODER_MAP_ENABLE = yes
\ No newline at end of file
+VIA_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/yunzii/al68/rules.mk b/keyboards/yunzii/al68/rules.mk
index 286cb110da6..7db07f3e8cc 100644
--- a/keyboards/yunzii/al68/rules.mk
+++ b/keyboards/yunzii/al68/rules.mk
@@ -1,3 +1,4 @@
MCU_LDSCRIPT = STM32F103xB
UART_DRIVER_REQUIRED = yes
+ENCODER_MAP_ENABLE = yes
SRC += ./common/smart_ble.c
From 186878fdce1abfff7bdd37512d39f6bc34961ec1 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Wed, 14 Aug 2024 11:27:53 +0800
Subject: [PATCH 03/35] ENCODER MAP LAYER
---
keyboards/yunzii/al68/al68.c | 6 --
keyboards/yunzii/al68/halconf.h | 2 -
.../yunzii/al68/keymaps/default/keymap.c | 76 ++++++++++---------
.../yunzii/al68/keymaps/default/rules.mk | 1 +
keyboards/yunzii/al68/keymaps/via/keymap.c | 15 ++++
5 files changed, 56 insertions(+), 44 deletions(-)
create mode 100644 keyboards/yunzii/al68/keymaps/default/rules.mk
diff --git a/keyboards/yunzii/al68/al68.c b/keyboards/yunzii/al68/al68.c
index 3e67da05020..91bf5b65402 100644
--- a/keyboards/yunzii/al68/al68.c
+++ b/keyboards/yunzii/al68/al68.c
@@ -27,12 +27,6 @@ void keyboard_pre_init_kb(void) {
writePinHigh(A8); //ENABLE USB
uart_init(460800);
wait_ms(400);
- // debug_enable=true;
- // debug_keyboard=true;
- // debug_matrix=true;
- // debug_mouse=true;
- setPinOutput(B8);
- writePinLow(B8);
}
bool process_record_kb(uint16_t keycode, keyrecord_t* record)
diff --git a/keyboards/yunzii/al68/halconf.h b/keyboards/yunzii/al68/halconf.h
index 51161381540..5ac07642c62 100644
--- a/keyboards/yunzii/al68/halconf.h
+++ b/keyboards/yunzii/al68/halconf.h
@@ -16,8 +16,6 @@
#pragma once
-//#define HAL_USE_SERIAL TRUE
-
#define HAL_USE_PWM TRUE
#include_next
\ No newline at end of file
diff --git a/keyboards/yunzii/al68/keymaps/default/keymap.c b/keyboards/yunzii/al68/keymaps/default/keymap.c
index f38f1c80dca..dd976872053 100644
--- a/keyboards/yunzii/al68/keymaps/default/keymap.c
+++ b/keyboards/yunzii/al68/keymaps/default/keymap.c
@@ -1,39 +1,43 @@
-/*
-Copyright 2021 owlab
-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 .
-*/
-
+/* Copyright 2022 Jacky
+ *
+ * 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 QMK_KEYBOARD_H
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
-
- [0] = LAYOUT(
- KC_ESC, 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_PSCR, KC_PSCR, KC_PAUS,
- KC_GRV, 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_HOME, KC_PGUP,
- 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_END, KC_PGDN,
- 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_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_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT,
- _______, _______
- )
- [1] = LAYOUT(
- _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______,
- _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EE_CLR, QK_BOOT, _______, _______,
- _______, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, RGB_HUI, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, RGB_MOD,
- _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI,
- _______, _______
-
- )
+#if defined(ENCODER_MAP_ENABLE)
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(_______, _______) }
};
+#endif
+
+
+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_MUTE,
+ 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_DELETE,
+ 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_PAGE_UP,
+ 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_PAGE_DOWN,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
+ ),
+ [1] = LAYOUT(
+ KC_GRV, KC_BRID, KC_BRIU, _______, KC_MYCM, KC_MAIL, KC_WHOM, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_VOLD, KC_VOLU, _______, _______,
+ _______, KC_BLE1, KC_BLE2, KC_BLE3, KC_24G, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______,
+ _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI
+ )
+};
+
+
diff --git a/keyboards/yunzii/al68/keymaps/default/rules.mk b/keyboards/yunzii/al68/keymaps/default/rules.mk
new file mode 100644
index 00000000000..a40474b4d5c
--- /dev/null
+++ b/keyboards/yunzii/al68/keymaps/default/rules.mk
@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/yunzii/al68/keymaps/via/keymap.c b/keyboards/yunzii/al68/keymaps/via/keymap.c
index 5e2cc279d85..dd976872053 100644
--- a/keyboards/yunzii/al68/keymaps/via/keymap.c
+++ b/keyboards/yunzii/al68/keymaps/via/keymap.c
@@ -1,3 +1,18 @@
+/* Copyright 2022 Jacky
+ *
+ * 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 QMK_KEYBOARD_H
#if defined(ENCODER_MAP_ENABLE)
From 73ba73d114a0c9fa9ffcb7a621c57d963441acd8 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Wed, 14 Aug 2024 12:17:18 +0800
Subject: [PATCH 04/35] ENCODER
---
keyboards/yunzii/al68/keymaps/via/rules.mk | 3 ++-
keyboards/yunzii/al68/rules.mk | 3 +--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/keyboards/yunzii/al68/keymaps/via/rules.mk b/keyboards/yunzii/al68/keymaps/via/rules.mk
index 036bd6d1c3e..4253f570f0b 100644
--- a/keyboards/yunzii/al68/keymaps/via/rules.mk
+++ b/keyboards/yunzii/al68/keymaps/via/rules.mk
@@ -1 +1,2 @@
-VIA_ENABLE = yes
\ No newline at end of file
+VIA_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/yunzii/al68/rules.mk b/keyboards/yunzii/al68/rules.mk
index 7db07f3e8cc..7b50899a289 100644
--- a/keyboards/yunzii/al68/rules.mk
+++ b/keyboards/yunzii/al68/rules.mk
@@ -1,4 +1,3 @@
MCU_LDSCRIPT = STM32F103xB
UART_DRIVER_REQUIRED = yes
-ENCODER_MAP_ENABLE = yes
-SRC += ./common/smart_ble.c
+SRC += ./common/smart_ble.c
\ No newline at end of file
From 46e35687c86ddf82aeff007813694b96027f02cd Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Tue, 27 Aug 2024 10:15:14 +0800
Subject: [PATCH 05/35] Delete keyboards/yunzii/al68/keymaps/via directory
---
keyboards/yunzii/al68/keymaps/via/keymap.c | 43 ----------------------
keyboards/yunzii/al68/keymaps/via/rules.mk | 2 -
2 files changed, 45 deletions(-)
delete mode 100644 keyboards/yunzii/al68/keymaps/via/keymap.c
delete mode 100644 keyboards/yunzii/al68/keymaps/via/rules.mk
diff --git a/keyboards/yunzii/al68/keymaps/via/keymap.c b/keyboards/yunzii/al68/keymaps/via/keymap.c
deleted file mode 100644
index dd976872053..00000000000
--- a/keyboards/yunzii/al68/keymaps/via/keymap.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright 2022 Jacky
- *
- * 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 QMK_KEYBOARD_H
-
-#if defined(ENCODER_MAP_ENABLE)
-const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
- [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
- [1] = { ENCODER_CCW_CW(_______, _______) }
-};
-#endif
-
-
-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_MUTE,
- 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_DELETE,
- 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_PAGE_UP,
- 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_PAGE_DOWN,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
- ),
- [1] = LAYOUT(
- KC_GRV, KC_BRID, KC_BRIU, _______, KC_MYCM, KC_MAIL, KC_WHOM, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_VOLD, KC_VOLU, _______, _______,
- _______, KC_BLE1, KC_BLE2, KC_BLE3, KC_24G, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______,
- _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI
- )
-};
-
-
diff --git a/keyboards/yunzii/al68/keymaps/via/rules.mk b/keyboards/yunzii/al68/keymaps/via/rules.mk
deleted file mode 100644
index 4253f570f0b..00000000000
--- a/keyboards/yunzii/al68/keymaps/via/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-VIA_ENABLE = yes
-ENCODER_MAP_ENABLE = yes
\ No newline at end of file
From 5c867196a9699a9427a696781cf99293f151cdb2 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Wed, 28 Aug 2024 11:29:46 +0800
Subject: [PATCH 06/35] Update keyboards/yunzii/al68/al68.c
Co-authored-by: Drashna Jaelre
---
keyboards/yunzii/al68/al68.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/keyboards/yunzii/al68/al68.c b/keyboards/yunzii/al68/al68.c
index 91bf5b65402..5136de1c760 100644
--- a/keyboards/yunzii/al68/al68.c
+++ b/keyboards/yunzii/al68/al68.c
@@ -23,8 +23,8 @@
void keyboard_pre_init_kb(void) {
AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk);
AFIO->MAPR|= AFIO_MAPR_SWJ_CFG_DISABLE; //diable JTAG (GD32 different to STM32)
- setPinOutput(A8);
- writePinHigh(A8); //ENABLE USB
+ gpio_set_pin_output(A8);
+ gpio_write_pin_high(A8); //ENABLE USB
uart_init(460800);
wait_ms(400);
}
From 827d979fc469b563373a9e6d81d686a99a4a9edb Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Wed, 28 Aug 2024 11:30:24 +0800
Subject: [PATCH 07/35] Update keyboards/yunzii/al68/al68.h
Co-authored-by: Drashna Jaelre
---
keyboards/yunzii/al68/al68.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/keyboards/yunzii/al68/al68.h b/keyboards/yunzii/al68/al68.h
index c68aa0aa142..9a6510ad594 100644
--- a/keyboards/yunzii/al68/al68.h
+++ b/keyboards/yunzii/al68/al68.h
@@ -15,11 +15,7 @@
// */
enum custom_keycodes {
-#ifdef VIA_ENABLE
KC_USB = QK_KB_0,
-#else
- KC_USB = SAFE_RANGE,
-#endif
KC_BLE1,
KC_BLE2,
KC_BLE3,
From 83798c0b9966455a32fcd0db1b43e3bf9a79883b Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Wed, 28 Aug 2024 11:36:29 +0800
Subject: [PATCH 08/35] Update al68.c
---
keyboards/yunzii/al68/al68.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/keyboards/yunzii/al68/al68.c b/keyboards/yunzii/al68/al68.c
index 5136de1c760..baad79ad8ca 100644
--- a/keyboards/yunzii/al68/al68.c
+++ b/keyboards/yunzii/al68/al68.c
@@ -34,12 +34,12 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record)
if (record->event.pressed){
if ((keycode>=KC_BLE1) && (keycode<=KC_24G))
{
- WIRELESS_START(keycode-KC_USB);
+ wireless_start(keycode-KC_USB);
return false;
}
else if (keycode == KC_USB)
{
- WIRELESS_STOP();
+ wireless_stop();
return false;
}
}
From a4c7576d01d74b2720b7c98f3d35c6ee6cd472f0 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Wed, 28 Aug 2024 11:37:58 +0800
Subject: [PATCH 09/35] Update smart_ble.h
---
keyboards/yunzii/common/smart_ble.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/keyboards/yunzii/common/smart_ble.h b/keyboards/yunzii/common/smart_ble.h
index 34859fca88b..f1f48eb7c09 100644
--- a/keyboards/yunzii/common/smart_ble.h
+++ b/keyboards/yunzii/common/smart_ble.h
@@ -18,5 +18,5 @@
#include "quantum.h"
void sc_ble_battary(uint8_t batt_level);
-void WIRELESS_START(uint32_t mode);
-void WIRELESS_STOP(void);
\ No newline at end of file
+void wireless_start(uint32_t mode);
+void wireless_stop(void);
From 33249f309578ea27c93511182a71048ad542b36b Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Wed, 28 Aug 2024 11:38:42 +0800
Subject: [PATCH 10/35] Update smart_ble.c
---
keyboards/yunzii/common/smart_ble.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/keyboards/yunzii/common/smart_ble.c b/keyboards/yunzii/common/smart_ble.c
index 16bf4d96206..6abb8aadabf 100644
--- a/keyboards/yunzii/common/smart_ble.c
+++ b/keyboards/yunzii/common/smart_ble.c
@@ -88,7 +88,7 @@ void sc_ble_battary(uint8_t batt_level) {
uart_write(batt_level);
}
-void WIRELESS_START(uint32_t mode)
+void wireless_start(uint32_t mode)
{
uint8_t ble_command[24];
smart_ble_startup();
@@ -107,11 +107,11 @@ void WIRELESS_START(uint32_t mode)
uart_transmit(ble_command,sizeof(ble_command));
}
-void WIRELESS_STOP(void)
+void wireless_stop(void)
{
smart_ble_disconnect();
uart_write(0x55);
uart_write(0x02);
uart_write(0x00);
uart_write(0x00);
-}
\ No newline at end of file
+}
From a2ca106e3eb68ff2cc50c10824e1960095b97967 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Thu, 29 Aug 2024 09:22:25 +0800
Subject: [PATCH 11/35] Update keyboards/yunzii/al68/halconf.h
Co-authored-by: Joel Challis
---
keyboards/yunzii/al68/halconf.h | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/keyboards/yunzii/al68/halconf.h b/keyboards/yunzii/al68/halconf.h
index 5ac07642c62..bea3191b917 100644
--- a/keyboards/yunzii/al68/halconf.h
+++ b/keyboards/yunzii/al68/halconf.h
@@ -1,18 +1,5 @@
-// /* Copyright 2024 Jacky
-// *
-// * 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 .
-// */
+// Copyright 2024 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
From 17ba47e3f468575f2f1885a7e3953fe53156385a Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Thu, 29 Aug 2024 09:22:37 +0800
Subject: [PATCH 12/35] Update keyboards/yunzii/al68/config.h
Co-authored-by: Joel Challis
---
keyboards/yunzii/al68/config.h | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/keyboards/yunzii/al68/config.h b/keyboards/yunzii/al68/config.h
index bd3d72b9d08..6761b8fe69f 100644
--- a/keyboards/yunzii/al68/config.h
+++ b/keyboards/yunzii/al68/config.h
@@ -1,18 +1,5 @@
-/* Copyright 2022 Jacky
- *
- * 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 .
- */
+// Copyright 2024 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
From f028bc5313a68a51224cb43dd847b9029e4257e1 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Thu, 29 Aug 2024 09:22:45 +0800
Subject: [PATCH 13/35] Update keyboards/yunzii/al68/al68.c
Co-authored-by: Joel Challis
---
keyboards/yunzii/al68/al68.c | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/keyboards/yunzii/al68/al68.c b/keyboards/yunzii/al68/al68.c
index baad79ad8ca..1ecf6b1cb45 100644
--- a/keyboards/yunzii/al68/al68.c
+++ b/keyboards/yunzii/al68/al68.c
@@ -1,18 +1,5 @@
-// // /* Copyright 2022 Jacky
-// // *
-// // * 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 .
-// // */
+// Copyright 2024 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
#include "uart.h"
From 7cb2e62e366638720025dc7141bb9200b78cbe52 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Thu, 29 Aug 2024 09:22:55 +0800
Subject: [PATCH 14/35] Update keyboards/yunzii/al68/keyboard.json
Co-authored-by: Joel Challis
---
keyboards/yunzii/al68/keyboard.json | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/keyboards/yunzii/al68/keyboard.json b/keyboards/yunzii/al68/keyboard.json
index 7efa437f4b7..a9665268b11 100644
--- a/keyboards/yunzii/al68/keyboard.json
+++ b/keyboards/yunzii/al68/keyboard.json
@@ -124,8 +124,7 @@
"device_version": "1.0.2",
"no_startup_check": true,
"pid": "0x304E",
- "vid": "0x414A",
- "wait_for_enumeration": false
+ "vid": "0x414A"
},
"ws2812": {
"driver": "pwm",
From c3e287807edc6d47c86778c537e0086f8311da4d Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Thu, 29 Aug 2024 09:23:04 +0800
Subject: [PATCH 15/35] Update keyboards/yunzii/al68/mcuconf.h
Co-authored-by: Joel Challis
---
keyboards/yunzii/al68/mcuconf.h | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/keyboards/yunzii/al68/mcuconf.h b/keyboards/yunzii/al68/mcuconf.h
index 25e5473ec67..0f0488c510a 100644
--- a/keyboards/yunzii/al68/mcuconf.h
+++ b/keyboards/yunzii/al68/mcuconf.h
@@ -1,19 +1,5 @@
-// /* Copyright 2024 Jacky
-// *
-// * 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 .
-// */
-
+// Copyright 2024 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include_next
From 63cdb4286003a8455d4ef422711f85322e5d5abf Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Thu, 29 Aug 2024 09:23:14 +0800
Subject: [PATCH 16/35] Update keyboards/yunzii/al68/readme.md
Co-authored-by: Joel Challis
---
keyboards/yunzii/al68/readme.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/keyboards/yunzii/al68/readme.md b/keyboards/yunzii/al68/readme.md
index d666ffbfffa..aa96170dac8 100644
--- a/keyboards/yunzii/al68/readme.md
+++ b/keyboards/yunzii/al68/readme.md
@@ -1,7 +1,10 @@
# MK AL68
-* A customizable 68keys keyboard.
+
![AL68](https://i.imgur.com/mhiYDh3.png)
+
+A customizable 68keys keyboard.
+
* Keyboard Maintainer: [Jeff](https://github.com/yunziikeyboard)
* Hardware Supported: [yunzii](https://www.yunzii.com)
* Hardware Availability: [yunzii](https://www.yunzii.com)
From 98818a5f0dffd28b0556d1e793d47f6eb4f8465a Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Thu, 29 Aug 2024 09:23:23 +0800
Subject: [PATCH 17/35] Update keyboards/yunzii/al68/readme.md
Co-authored-by: Joel Challis
---
keyboards/yunzii/al68/readme.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/keyboards/yunzii/al68/readme.md b/keyboards/yunzii/al68/readme.md
index aa96170dac8..40b9329fb28 100644
--- a/keyboards/yunzii/al68/readme.md
+++ b/keyboards/yunzii/al68/readme.md
@@ -11,11 +11,11 @@ A customizable 68keys keyboard.
Make example for this keyboard (after setting up your build environment):
- make mk/al68:default
+ make yunzii/al68:default
Flashing example for this keyboard:
- make mk/al68:default:flash
+ make yunzii/al68:default:flash
See the build environment setup and the make instructions for more information. Brand new to QMK? Start with our Complete Newbs Guide.
From 593fb8a1848d6b46dbba639a6ea619fc2101da1e Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Thu, 29 Aug 2024 09:23:34 +0800
Subject: [PATCH 18/35] Update keyboards/yunzii/common/smart_ble.c
Co-authored-by: Joel Challis
---
keyboards/yunzii/common/smart_ble.c | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/keyboards/yunzii/common/smart_ble.c b/keyboards/yunzii/common/smart_ble.c
index 6abb8aadabf..e8ea63eebf8 100644
--- a/keyboards/yunzii/common/smart_ble.c
+++ b/keyboards/yunzii/common/smart_ble.c
@@ -1,18 +1,5 @@
-// /* Copyright 2024 Jacky
-// *
-// * 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 .
-// */
+// Copyright 2024 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
#include "uart.h"
#include "ch.h"
From 260b511f933841091817cba4fc259558374081c4 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Thu, 29 Aug 2024 09:23:42 +0800
Subject: [PATCH 19/35] Update keyboards/yunzii/common/smart_ble.h
Co-authored-by: Joel Challis
---
keyboards/yunzii/common/smart_ble.h | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/keyboards/yunzii/common/smart_ble.h b/keyboards/yunzii/common/smart_ble.h
index f1f48eb7c09..e4990fc7ec7 100644
--- a/keyboards/yunzii/common/smart_ble.h
+++ b/keyboards/yunzii/common/smart_ble.h
@@ -1,18 +1,5 @@
-// /* Copyright 2024 Jacky
-// *
-// * 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 .
-// */
+// Copyright 2024 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "quantum.h"
From b2f7f4062d2c8db4c428390d0aafd6fa35a158d1 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Thu, 29 Aug 2024 09:23:50 +0800
Subject: [PATCH 20/35] Update keyboards/yunzii/common/smart_ble.h
Co-authored-by: Joel Challis
---
keyboards/yunzii/common/smart_ble.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/yunzii/common/smart_ble.h b/keyboards/yunzii/common/smart_ble.h
index e4990fc7ec7..983463d4917 100644
--- a/keyboards/yunzii/common/smart_ble.h
+++ b/keyboards/yunzii/common/smart_ble.h
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#include "quantum.h"
+#include
void sc_ble_battary(uint8_t batt_level);
void wireless_start(uint32_t mode);
From 9b3c02bbd9c6a346e31de8bdba12b6ea577f630b Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Mon, 2 Sep 2024 11:10:40 +0800
Subject: [PATCH 21/35] Update keyboards/yunzii/common/smart_ble.c
Co-authored-by: Drashna Jaelre
---
keyboards/yunzii/common/smart_ble.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/keyboards/yunzii/common/smart_ble.c b/keyboards/yunzii/common/smart_ble.c
index e8ea63eebf8..d95957da9c3 100644
--- a/keyboards/yunzii/common/smart_ble.c
+++ b/keyboards/yunzii/common/smart_ble.c
@@ -7,6 +7,7 @@
#include "host.h"
#include "host_driver.h"
#include "report.h"
+#include
#include "smart_ble.h"
static uint8_t sc_ble_leds(void) {
From 871456fdbe3dfdc1643226fb743724310280157e Mon Sep 17 00:00:00 2001
From: JackyJia73
Date: Mon, 2 Sep 2024 11:16:25 +0800
Subject: [PATCH 22/35] format smart_blae.c
---
keyboards/yunzii/common/smart_ble.c | 69 +++++++++++++----------------
1 file changed, 30 insertions(+), 39 deletions(-)
diff --git a/keyboards/yunzii/common/smart_ble.c b/keyboards/yunzii/common/smart_ble.c
index d95957da9c3..4aead6684aa 100644
--- a/keyboards/yunzii/common/smart_ble.c
+++ b/keyboards/yunzii/common/smart_ble.c
@@ -11,47 +11,42 @@
#include "smart_ble.h"
static uint8_t sc_ble_leds(void) {
- return 0; // TODO: Get LED status BLE
+ return 0; // TODO: Get LED status BLE
}
static void sc_ble_mouse(report_mouse_t *report) {
- static uint8_t last_report[sizeof(report_mouse_t)]={0};
+ static uint8_t last_report[sizeof(report_mouse_t)] = {0};
if (!has_mouse_report_changed((report_mouse_t *)last_report, report)) return;
- memcpy(last_report,report,sizeof(report_mouse_t));
+ memcpy(last_report, report, sizeof(report_mouse_t));
uart_write(0x55);
uart_write(sizeof(report_mouse_t));
- uart_transmit(last_report,sizeof(report_mouse_t));
+ uart_transmit(last_report, sizeof(report_mouse_t));
}
-
static void sc_ble_extra(report_extra_t *report) {
uart_write(0x55);
uart_write(sizeof(report_extra_t));
- uart_transmit((uint8_t *)report,sizeof(report_extra_t));
+ uart_transmit((uint8_t *)report, sizeof(report_extra_t));
}
static void sc_ble_keyboard(report_keyboard_t *report) {
uart_write(0x55);
uart_write(0x09);
uart_write(0x01);
- uart_transmit((uint8_t *)report,KEYBOARD_REPORT_SIZE);
+ uart_transmit((uint8_t *)report, KEYBOARD_REPORT_SIZE);
}
-static void sc_send_nkro(report_nkro_t *report)
-{
+static void sc_send_nkro(report_nkro_t *report) {
uart_write(0x55);
uart_write(0x12);
- uart_transmit((uint8_t *)report,0x12);
+ uart_transmit((uint8_t *)report, 0x12);
}
static host_driver_t *last_host_driver = NULL;
-static host_driver_t sc_ble_driver = {
- sc_ble_leds, sc_ble_keyboard,sc_send_nkro,sc_ble_mouse, sc_ble_extra
-};
+static host_driver_t sc_ble_driver = {sc_ble_leds, sc_ble_keyboard, sc_send_nkro, sc_ble_mouse, sc_ble_extra};
-
-void smart_ble_startup(void) {
+void smart_ble_startup(void) {
if (host_get_driver() == &sc_ble_driver) {
return;
}
@@ -68,38 +63,34 @@ void smart_ble_disconnect(void) {
host_set_driver(last_host_driver);
}
-
void sc_ble_battary(uint8_t batt_level) {
- uart_write(0x55);
- uart_write(0x02);
- uart_write(0x09);
- uart_write(batt_level);
+ uart_write(0x55);
+ uart_write(0x02);
+ uart_write(0x09);
+ uart_write(batt_level);
}
-void wireless_start(uint32_t mode)
-{
- uint8_t ble_command[24];
+void wireless_start(uint32_t mode) {
+ uint8_t ble_command[24];
smart_ble_startup();
- if(mode<1 || mode>4)
- {
- mode=1;
+ if (mode < 1 || mode > 4) {
+ mode = 1;
}
- ble_command[0]=0x55;
- ble_command[1]=20;
- ble_command[2]=0;
- ble_command[3]=mode;
- strcpy((char * restrict)(ble_command+4),PRODUCT);
- ble_command[strlen(PRODUCT)+4]='-';
- ble_command[strlen(PRODUCT)+5]='0' + mode;
- ble_command[strlen(PRODUCT)+6]= 0;
- uart_transmit(ble_command,sizeof(ble_command));
+ ble_command[0] = 0x55;
+ ble_command[1] = 20;
+ ble_command[2] = 0;
+ ble_command[3] = mode;
+ strcpy((char *restrict)(ble_command + 4), PRODUCT);
+ ble_command[strlen(PRODUCT) + 4] = '-';
+ ble_command[strlen(PRODUCT) + 5] = '0' + mode;
+ ble_command[strlen(PRODUCT) + 6] = 0;
+ uart_transmit(ble_command, sizeof(ble_command));
}
-void wireless_stop(void)
-{
+void wireless_stop(void) {
smart_ble_disconnect();
- uart_write(0x55);
- uart_write(0x02);
+ uart_write(0x55);
+ uart_write(0x02);
uart_write(0x00);
uart_write(0x00);
}
From f6cdeab1afc82fda659dcf9682bd7548b8096849 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Mon, 2 Sep 2024 11:20:38 +0800
Subject: [PATCH 23/35] Update keyboards/yunzii/common/smart_ble.c
Co-authored-by: Drashna Jaelre
---
keyboards/yunzii/common/smart_ble.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/keyboards/yunzii/common/smart_ble.c b/keyboards/yunzii/common/smart_ble.c
index 4aead6684aa..431ae2a225a 100644
--- a/keyboards/yunzii/common/smart_ble.c
+++ b/keyboards/yunzii/common/smart_ble.c
@@ -8,6 +8,7 @@
#include "host_driver.h"
#include "report.h"
#include
+#include
#include "smart_ble.h"
static uint8_t sc_ble_leds(void) {
From 0e7de51ad58163813bba65f8d433c043859962e9 Mon Sep 17 00:00:00 2001
From: JackyJia73
Date: Mon, 2 Sep 2024 11:37:00 +0800
Subject: [PATCH 24/35] include quantum.h for clear_eyboard()
---
keyboards/yunzii/common/smart_ble.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/yunzii/common/smart_ble.c b/keyboards/yunzii/common/smart_ble.c
index 431ae2a225a..0a260108fe1 100644
--- a/keyboards/yunzii/common/smart_ble.c
+++ b/keyboards/yunzii/common/smart_ble.c
@@ -1,6 +1,7 @@
// Copyright 2024 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
+#include "quantum.h"
#include "uart.h"
#include "ch.h"
#include "hal.h"
@@ -8,7 +9,6 @@
#include "host_driver.h"
#include "report.h"
#include
-#include
#include "smart_ble.h"
static uint8_t sc_ble_leds(void) {
From 6ccff10f8c99e3a61b0364ddb279c0e2e53efa47 Mon Sep 17 00:00:00 2001
From: JackyJia73
Date: Tue, 10 Sep 2024 11:31:54 +0800
Subject: [PATCH 25/35] format al68.c
---
keyboards/yunzii/al68/al68.c | 25 +++++++++----------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/keyboards/yunzii/al68/al68.c b/keyboards/yunzii/al68/al68.c
index 1ecf6b1cb45..be318e7b269 100644
--- a/keyboards/yunzii/al68/al68.c
+++ b/keyboards/yunzii/al68/al68.c
@@ -6,31 +6,24 @@
#include "common/smart_ble.h"
#include "al68.h"
-
void keyboard_pre_init_kb(void) {
AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk);
- AFIO->MAPR|= AFIO_MAPR_SWJ_CFG_DISABLE; //diable JTAG (GD32 different to STM32)
+ AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_DISABLE; // diable JTAG (GD32 different to STM32)
gpio_set_pin_output(A8);
- gpio_write_pin_high(A8); //ENABLE USB
+ gpio_write_pin_high(A8); // ENABLE USB
uart_init(460800);
wait_ms(400);
}
-bool process_record_kb(uint16_t keycode, keyrecord_t* record)
-{
- if (record->event.pressed){
- if ((keycode>=KC_BLE1) && (keycode<=KC_24G))
- {
- wireless_start(keycode-KC_USB);
- return false;
- }
- else if (keycode == KC_USB)
- {
+bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
+ if (record->event.pressed) {
+ if ((keycode >= KC_BLE1) && (keycode <= KC_24G)) {
+ wireless_start(keycode - KC_USB);
+ return false;
+ } else if (keycode == KC_USB) {
wireless_stop();
return false;
}
}
- return process_record_user(keycode, record);
+ return process_record_user(keycode, record);
}
-
-
From 0259bcfa42e0e77e2b16e457a15d6ba537efc3b0 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Tue, 5 Nov 2024 11:57:55 +0800
Subject: [PATCH 26/35] Update keyboards/yunzii/al68/rules.mk
Co-authored-by: Duncan Sutherland
---
keyboards/yunzii/al68/rules.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/yunzii/al68/rules.mk b/keyboards/yunzii/al68/rules.mk
index 7b50899a289..286cb110da6 100644
--- a/keyboards/yunzii/al68/rules.mk
+++ b/keyboards/yunzii/al68/rules.mk
@@ -1,3 +1,3 @@
MCU_LDSCRIPT = STM32F103xB
UART_DRIVER_REQUIRED = yes
-SRC += ./common/smart_ble.c
\ No newline at end of file
+SRC += ./common/smart_ble.c
From 303a4dcaeb6b9cc8ae455f04fad87d92977b5e9b Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Tue, 5 Nov 2024 11:58:32 +0800
Subject: [PATCH 27/35] Update keyboards/yunzii/al68/mcuconf.h
Co-authored-by: Duncan Sutherland
---
keyboards/yunzii/al68/mcuconf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/yunzii/al68/mcuconf.h b/keyboards/yunzii/al68/mcuconf.h
index 0f0488c510a..69340121b50 100644
--- a/keyboards/yunzii/al68/mcuconf.h
+++ b/keyboards/yunzii/al68/mcuconf.h
@@ -8,4 +8,4 @@
#define STM32_SERIAL_USE_USART1 TRUE
#undef STM32_PWM_USE_TIM4
-#define STM32_PWM_USE_TIM4 TRUE
\ No newline at end of file
+#define STM32_PWM_USE_TIM4 TRUE
From da5e7b601c724bb5958cba02906ae23ebd93390b Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Tue, 5 Nov 2024 11:58:39 +0800
Subject: [PATCH 28/35] Update keyboards/yunzii/al68/keymaps/default/rules.mk
Co-authored-by: Duncan Sutherland
---
keyboards/yunzii/al68/keymaps/default/rules.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/yunzii/al68/keymaps/default/rules.mk b/keyboards/yunzii/al68/keymaps/default/rules.mk
index a40474b4d5c..ee325681483 100644
--- a/keyboards/yunzii/al68/keymaps/default/rules.mk
+++ b/keyboards/yunzii/al68/keymaps/default/rules.mk
@@ -1 +1 @@
-ENCODER_MAP_ENABLE = yes
\ No newline at end of file
+ENCODER_MAP_ENABLE = yes
From 7d2053fa8d57cb564303eb766b40fda04a3e9c5a Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Tue, 5 Nov 2024 11:58:48 +0800
Subject: [PATCH 29/35] Update keyboards/yunzii/al68/keymaps/default/keymap.c
Co-authored-by: Duncan Sutherland
---
keyboards/yunzii/al68/keymaps/default/keymap.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/keyboards/yunzii/al68/keymaps/default/keymap.c b/keyboards/yunzii/al68/keymaps/default/keymap.c
index dd976872053..1fe0ac1131a 100644
--- a/keyboards/yunzii/al68/keymaps/default/keymap.c
+++ b/keyboards/yunzii/al68/keymaps/default/keymap.c
@@ -39,5 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI
)
};
-
-
From ec8dfa16187970891d96851cd360eee9ccce9639 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Tue, 5 Nov 2024 11:58:55 +0800
Subject: [PATCH 30/35] Update keyboards/yunzii/al68/keyboard.json
Co-authored-by: Duncan Sutherland
---
keyboards/yunzii/al68/keyboard.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/yunzii/al68/keyboard.json b/keyboards/yunzii/al68/keyboard.json
index a9665268b11..659232ab745 100644
--- a/keyboards/yunzii/al68/keyboard.json
+++ b/keyboards/yunzii/al68/keyboard.json
@@ -203,4 +203,4 @@
]
}
}
-}
\ No newline at end of file
+}
From b91e51c6b32a65daa9dac285cb9436ff3334f9ac Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Tue, 5 Nov 2024 11:59:06 +0800
Subject: [PATCH 31/35] Update keyboards/yunzii/al68/halconf.h
Co-authored-by: Duncan Sutherland
---
keyboards/yunzii/al68/halconf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/yunzii/al68/halconf.h b/keyboards/yunzii/al68/halconf.h
index bea3191b917..21ff09d511d 100644
--- a/keyboards/yunzii/al68/halconf.h
+++ b/keyboards/yunzii/al68/halconf.h
@@ -5,4 +5,4 @@
#define HAL_USE_PWM TRUE
-#include_next
\ No newline at end of file
+#include_next
From 1a7f7dbba29d754d764c96bf270976dfa62a8f4a Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Tue, 5 Nov 2024 11:59:13 +0800
Subject: [PATCH 32/35] Update keyboards/yunzii/al68/al68.h
Co-authored-by: Duncan Sutherland
---
keyboards/yunzii/al68/al68.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/yunzii/al68/al68.h b/keyboards/yunzii/al68/al68.h
index 9a6510ad594..43915a7fc53 100644
--- a/keyboards/yunzii/al68/al68.h
+++ b/keyboards/yunzii/al68/al68.h
@@ -20,4 +20,4 @@ enum custom_keycodes {
KC_BLE2,
KC_BLE3,
KC_24G
-};
\ No newline at end of file
+};
From 8774667f9a10cae32435b5e11eabe0be67c5d1c5 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Tue, 5 Nov 2024 11:59:29 +0800
Subject: [PATCH 33/35] Update keyboards/yunzii/al68/keymaps/default/keymap.c
Co-authored-by: Duncan Sutherland
---
keyboards/yunzii/al68/keymaps/default/keymap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/yunzii/al68/keymaps/default/keymap.c b/keyboards/yunzii/al68/keymaps/default/keymap.c
index 1fe0ac1131a..2fbeea61268 100644
--- a/keyboards/yunzii/al68/keymaps/default/keymap.c
+++ b/keyboards/yunzii/al68/keymaps/default/keymap.c
@@ -24,7 +24,7 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT(
+ [0] = LAYOUT_65_ansi_blocker(
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_MUTE,
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_DELETE,
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_PAGE_UP,
From 93fb7fac14c376c841d895d9a46a12a4d853f6f6 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Tue, 5 Nov 2024 11:59:36 +0800
Subject: [PATCH 34/35] Update keyboards/yunzii/al68/keymaps/default/keymap.c
Co-authored-by: Duncan Sutherland
---
keyboards/yunzii/al68/keymaps/default/keymap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keyboards/yunzii/al68/keymaps/default/keymap.c b/keyboards/yunzii/al68/keymaps/default/keymap.c
index 2fbeea61268..1e6c487d490 100644
--- a/keyboards/yunzii/al68/keymaps/default/keymap.c
+++ b/keyboards/yunzii/al68/keymaps/default/keymap.c
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_PAGE_DOWN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
- [1] = LAYOUT(
+ [1] = LAYOUT_65_ansi_blocker(
KC_GRV, KC_BRID, KC_BRIU, _______, KC_MYCM, KC_MAIL, KC_WHOM, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_VOLD, KC_VOLU, _______, _______,
_______, KC_BLE1, KC_BLE2, KC_BLE3, KC_24G, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, _______,
From 4401f337ced6fc3bbb3aa2ddbdb6ee4ccba16584 Mon Sep 17 00:00:00 2001
From: yunzii keyboard <381957792@qq.com>
Date: Tue, 5 Nov 2024 11:59:56 +0800
Subject: [PATCH 35/35] Update keyboards/yunzii/al68/keyboard.json
Co-authored-by: Duncan Sutherland
---
keyboards/yunzii/al68/keyboard.json | 55 +++++++++++++++--------------
1 file changed, 28 insertions(+), 27 deletions(-)
diff --git a/keyboards/yunzii/al68/keyboard.json b/keyboards/yunzii/al68/keyboard.json
index 659232ab745..7ecf3f0c06a 100644
--- a/keyboards/yunzii/al68/keyboard.json
+++ b/keyboards/yunzii/al68/keyboard.json
@@ -130,8 +130,9 @@
"driver": "pwm",
"pin": "B8"
},
+ "community_layouts": ["65_ansi_blocker"],
"layouts": {
- "LAYOUT": {
+ "LAYOUT_65_ansi_blocker": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
@@ -146,9 +147,9 @@
{"matrix": [0, 10], "x": 10, "y": 0},
{"matrix": [0, 11], "x": 11, "y": 0},
{"matrix": [0, 12], "x": 12, "y": 0},
- {"matrix": [0, 13], "x": 14, "y": 0},
- {"matrix": [0, 14], "x": 15, "y": 0},
- {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
+ {"matrix": [0, 14], "x": 15, "y": 0, "encoder": 0},
+ {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1},
{"matrix": [1, 2], "x": 2.5, "y": 1},
{"matrix": [1, 3], "x": 3.5, "y": 1},
@@ -161,9 +162,9 @@
{"matrix": [1, 10], "x": 10.5, "y": 1},
{"matrix": [1, 11], "x": 11.5, "y": 1},
{"matrix": [1, 12], "x": 12.5, "y": 1},
- {"matrix": [1, 13], "x": 14, "y": 1},
+ {"matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5},
{"matrix": [1, 14], "x": 15, "y": 1},
- {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
{"matrix": [2, 1], "x": 1.75, "y": 2},
{"matrix": [2, 2], "x": 2.75, "y": 2},
{"matrix": [2, 3], "x": 3.75, "y": 2},
@@ -175,30 +176,30 @@
{"matrix": [2, 9], "x": 9.75, "y": 2},
{"matrix": [2, 10], "x": 10.75, "y": 2},
{"matrix": [2, 11], "x": 11.75, "y": 2},
- {"matrix": [2, 13], "x": 14, "y": 2},
+ {"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
{"matrix": [2, 14], "x": 15, "y": 2},
- {"matrix": [3, 0], "x": 0, "y": 3},
- {"matrix": [3, 2], "x": 2.5, "y": 3},
- {"matrix": [3, 3], "x": 3.5, "y": 3},
- {"matrix": [3, 4], "x": 4.5, "y": 3},
- {"matrix": [3, 5], "x": 5.5, "y": 3},
- {"matrix": [3, 6], "x": 6.5, "y": 3},
- {"matrix": [3, 7], "x": 7.5, "y": 3},
- {"matrix": [3, 8], "x": 8.5, "y": 3},
- {"matrix": [3, 9], "x": 9.5, "y": 3},
- {"matrix": [3, 10], "x": 10.5, "y": 3},
- {"matrix": [3, 11], "x": 11.5, "y": 3},
- {"matrix": [3, 12], "x": 13, "y": 3},
+ {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
+ {"matrix": [3, 2], "x": 2.25, "y": 3},
+ {"matrix": [3, 3], "x": 3.25, "y": 3},
+ {"matrix": [3, 4], "x": 4.25, "y": 3},
+ {"matrix": [3, 5], "x": 5.25, "y": 3},
+ {"matrix": [3, 6], "x": 6.25, "y": 3},
+ {"matrix": [3, 7], "x": 7.25, "y": 3},
+ {"matrix": [3, 8], "x": 8.25, "y": 3},
+ {"matrix": [3, 9], "x": 9.25, "y": 3},
+ {"matrix": [3, 10], "x": 10.25, "y": 3},
+ {"matrix": [3, 11], "x": 11.25, "y": 3},
+ {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
{"matrix": [3, 13], "x": 14, "y": 3},
{"matrix": [3, 14], "x": 15, "y": 3},
- {"matrix": [4, 0], "x": 0, "y": 4},
- {"matrix": [4, 1], "x": 1.25, "y": 4},
- {"matrix": [4, 2], "x": 2.5, "y": 4},
- {"matrix": [4, 5], "x": 8.75, "y": 4},
- {"matrix": [4, 10], "x": 10, "y": 4},
- {"matrix": [4, 11], "x": 11.25, "y": 4},
- {"matrix": [4, 12], "x": 12.5, "y": 4},
- {"matrix": [4, 13], "x": 13.75, "y": 4},
+ {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
+ {"matrix": [4, 1], "x": 1.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.25},
+ {"matrix": [4, 5], "x": 3.75, "y": 4, "w": 6.25},
+ {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
+ {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
+ {"matrix": [4, 12], "x": 13, "y": 4},
+ {"matrix": [4, 13], "x": 14, "y": 4},
{"matrix": [4, 14], "x": 15, "y": 4}
]
}