Skip to content

Commit

Permalink
Build for Ver1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xingrz committed Dec 20, 2022
1 parent 19bc217 commit ab46335
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 9 deletions.
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ zmk-config for Xikii HW-75 (瀚文 75)

[瀚文 75 (HW-75)](https://github.com/peng-zhihui/HelloWord-Keyboard) 是一款由稚晖君 ([@peng-zhihui](https://github.com/peng-zhihui)) 设计、Xikii Industy 生产的模块化机械键盘。

本仓库是针对 HW-75 的 [ZMK](https://github.com/zmkfirmware/zmk) 编译配置。请注意,虽然 HW-75 的设计是开源的,但是 Xikii 官方团的 PCB 在开源版基础上有细微调整。本配置仅针对官方团的 PCB 适配。
本仓库是针对 HW-75 的 [ZMK](https://github.com/zmkfirmware/zmk) 编译配置。

## 烧录 (针对一般用户)

1. 请确保已经在 HW-75 中烧入了 DFU bootloader。详见[这篇文章](https://github.com/peng-zhihui/HelloWord-Keyboard/discussions/77)
2.[Releases](https://github.com/xingrz/zmk-config_xikii_hw-75/releases) 下载最新的固件;
3. 按住键盘的 Fn 键插入 USB,打开 [WebDFU](https://devanlai.github.io/webdfu/dfu-util/) 选择固件进行烧录。
本仓库支持下列版本的 PCB。烧录时请注意区分:

| 版本 | 文件名 | 备注 |
|-|-|-|
| Ver1.1 | `[email protected]` | 立创开源版,大部分开源团使用的版本 |
| Ver1.2 | `[email protected]` | Xikii 500 人试作团、哔哩哔哩会员购版 |

操作步骤:

1.[Releases](https://github.com/xingrz/zmk-config_xikii_hw-75/releases/latest) 下载最新的固件。请注意区分 PCB 版本;
2. 参考[这篇文章的步骤](https://www.zfrontier.com/app/flow/xKYXEy6AqWra)完成准备工作,并烧入固件。

## 快速定制

Expand Down Expand Up @@ -49,10 +57,17 @@ west build -s zmk/app -b xikii_hw75 -- -DZMK_CONFIG=$PWD/config
west flash
```

默认会构建最新 PCB 版本的配置。如果你需要构建不同版本,可以使用下面的命令:

```sh
west build -p -s zmk/app -b [email protected] -- -DZMK_CONFIG=$PWD/config -DKEYMAP_FILE=$PWD/config/xikii_hw75.keymap
```

## 相关链接

* [使用开源的 DAPLink 调试器及 pyOCD 烧录程序](https://github.com/peng-zhihui/HelloWord-Keyboard/discussions/76)
* [一个只有 4KB 的 DFU bootloader](https://github.com/peng-zhihui/HelloWord-Keyboard/discussions/77)
* [peng-zhihui/HelloWord-Keyboard](https://github.com/peng-zhihui/HelloWord-Keyboard)
* [ZMK Firmware](https://zmk.dev/)

## 协议
Expand Down
6 changes: 5 additions & 1 deletion build.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
board:
- xikii_hw75
- [email protected]
- [email protected]

cmake-args:
- -DKEYMAP_FILE=${GITHUB_WORKSPACE}/config/xikii_hw75.keymap
7 changes: 7 additions & 0 deletions config/boards/arm/xikii_hw75/revision.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

board_check_revision(
FORMAT MAJOR.MINOR.PATCH
DEFAULT_REVISION 1.2.0
)
8 changes: 4 additions & 4 deletions config/boards/arm/xikii_hw75/xikii_hw75.dts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
map = <
RC(8, 4) RC(7, 2) RC(7, 3) RC(7, 5) RC(7, 4) RC(6, 3) RC(6, 0) RC(6, 4) RC(6, 5) RC(6, 6) RC(6, 7) RC(5, 0) RC(5, 1) RC(0, 4)
RC(10,7) RC(10,6) RC(8, 7) RC(7, 6) RC(7, 1) RC(7, 0) RC(6, 2) RC(6, 1) RC(5, 2) RC(5, 3) RC(5, 7) RC(3, 0) RC(3, 5) RC(2, 5) RC(0, 5)
RC(2, 4) RC(8, 1) RC(8, 0) RC(8, 5) RC(8, 6) RC(7, 7) RC(4, 3) RC(4, 2) RC(4, 1) RC(4, 0) RC(5, 4) RC(5, 5) RC(5, 6) RC(3, 3) RC(0, 6)
RC(1, 0) RC(9, 5) RC(9, 6) RC(9, 7) RC(8, 3) RC(8, 2) RC(3, 2) RC(3, 1) RC(4, 4) RC(4, 5) RC(4, 6) RC(4, 7) RC(3, 7) RC(0, 7)
RC(2, 4) RC(8, 1) RC(8, 0) RC(8, 5) RC(8, 6) RC(7, 7) RC(4, 3) RC(4, 2) RC(4, 1) RC(4, 0) RC(5, 4) RC(5, 5) RC(5, 6) RC(3, 3) RC(0, 7)
RC(1, 0) RC(9, 5) RC(9, 6) RC(9, 7) RC(8, 3) RC(8, 2) RC(3, 2) RC(3, 1) RC(4, 4) RC(4, 5) RC(4, 6) RC(4, 7) RC(3, 7) RC(0, 6)
RC(1, 1) RC(9, 3) RC(9, 2) RC(9, 1) RC(9, 0) RC(2, 7) RC(2, 3) RC(2, 2) RC(2, 1) RC(2, 0) RC(3, 4) RC(3, 6) RC(2, 6) RC(0, 3)
RC(1, 2) RC(1, 3) RC(1, 7) RC(9, 4) RC(1, 6) RC(1, 5) RC(0, 0) RC(1, 4) RC(0, 1) RC(0, 2)
RC(10,1) RC(10,3) RC(10,5) RC(10,0) RC(10,2) RC(10,4)
RC(10,5) RC(10,4) RC(10,0) RC(10,1) RC(10,2) RC(10,3)
>;
};
};
Expand Down Expand Up @@ -101,7 +101,7 @@
reg = <0>;
spi-max-frequency = <4000000>;

chain-length = <103>;
chain-length = <101>;
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
Expand Down
2 changes: 2 additions & 0 deletions config/boards/arm/xikii_hw75/xikii_hw75_1_1_0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
4 changes: 4 additions & 0 deletions config/boards/arm/xikii_hw75/xikii_hw75_1_1_0.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
* Copyright (c) 2022 The ZMK Contributors
* SPDX-License-Identifier: MIT
*/
2 changes: 2 additions & 0 deletions config/boards/arm/xikii_hw75/xikii_hw75_1_2_0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
22 changes: 22 additions & 0 deletions config/boards/arm/xikii_hw75/xikii_hw75_1_2_0.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2022 The ZMK Contributors
* SPDX-License-Identifier: MIT
*/

#include <dt-bindings/zmk/matrix_transform.h>

&default_transform {
map = <
RC(8, 4) RC(7, 2) RC(7, 3) RC(7, 5) RC(7, 4) RC(6, 3) RC(6, 0) RC(6, 4) RC(6, 5) RC(6, 6) RC(6, 7) RC(5, 0) RC(5, 1) RC(0, 4)
RC(10,7) RC(10,6) RC(8, 7) RC(7, 6) RC(7, 1) RC(7, 0) RC(6, 2) RC(6, 1) RC(5, 2) RC(5, 3) RC(5, 7) RC(3, 0) RC(3, 5) RC(2, 5) RC(0, 5)
RC(2, 4) RC(8, 1) RC(8, 0) RC(8, 5) RC(8, 6) RC(7, 7) RC(4, 3) RC(4, 2) RC(4, 1) RC(4, 0) RC(5, 4) RC(5, 5) RC(5, 6) RC(3, 3) RC(0, 6)
RC(1, 0) RC(9, 5) RC(9, 6) RC(9, 7) RC(8, 3) RC(8, 2) RC(3, 2) RC(3, 1) RC(4, 4) RC(4, 5) RC(4, 6) RC(4, 7) RC(3, 7) RC(0, 7)
RC(1, 1) RC(9, 3) RC(9, 2) RC(9, 1) RC(9, 0) RC(2, 7) RC(2, 3) RC(2, 2) RC(2, 1) RC(2, 0) RC(3, 4) RC(3, 6) RC(2, 6) RC(0, 3)
RC(1, 2) RC(1, 3) RC(1, 7) RC(9, 4) RC(1, 6) RC(1, 5) RC(0, 0) RC(1, 4) RC(0, 1) RC(0, 2)
RC(10,1) RC(10,3) RC(10,5) RC(10,0) RC(10,2) RC(10,4)
>;
};

&led_strip {
chain-length = <103>;
};

0 comments on commit ab46335

Please sign in to comment.