Skip to content

Commit

Permalink
dts: dynamic: Split SSD1675B LUT into separated board revision
Browse files Browse the repository at this point in the history
  • Loading branch information
xingrz committed Sep 18, 2023
1 parent bfedc81 commit b635bf5
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
include:
- { board: [email protected], keymap: hw75_keyboard.keymap }
- { board: [email protected], keymap: hw75_keyboard.keymap }
- { board: hw75_dynamic, keymap: hw75_dynamic.keymap }
- { board: hw75_dynamic@A, keymap: hw75_dynamic.keymap }
- { board: hw75_dynamic@B, keymap: hw75_dynamic.keymap }

steps:
- name: Prepare variables
Expand Down
19 changes: 15 additions & 4 deletions config/boards/arm/hw75_dynamic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ HW-75 Dynamic

本目录是 HW-75 扩展模块的 ZMK 配置。

## PCB
## 硬件版本

本配置基于稚晖君在[立创开源](https://oshwhub.com/pengzhihui/b11afae464c54a3e8d0f77e1f92dc7b7)发布的 PCB 适配。
本配置基于稚晖君在[立创开源](https://oshwhub.com/pengzhihui/b11afae464c54a3e8d0f77e1f92dc7b7)发布的 PCB 适配,但有些许差异:

| 版本 | 文件前缀 | 备注 |
|--------|--------------------|------|
| A | `hw75_dynamic@A-zmk` | 稚晖君在[立创开源](https://oshwhub.com/pengzhihui/b11afae464c54a3e8d0f77e1f92dc7b7)的原始设计,三叶虫 (wow) 一期、二期团,大部分开源团使用的版本 |
| B | `hw75_dynamic@B-zmk` | 三叶虫 (wow) 三期团 |

## 开发进度

Expand Down Expand Up @@ -44,10 +49,16 @@ sudo npm install -g lv_font_conv
west init -l config
west update
west zephyr-export
west build -s zmk/app -b hw75_dynamic -- -DZMK_CONFIG=$PWD/config
west build -p -s zmk/app -b hw75_dynamic -- -DZMK_CONFIG=$PWD/config
west flash
```

默认会构建最新[硬件版本](#硬件版本)的配置。如果你需要构建不同版本,可以使用下面的命令:

```sh
west build -p -s zmk/app -b hw75_dynamic@A -- -DZMK_CONFIG=$PWD/config -DKEYMAP_FILE=$PWD/config/hw75_dynamic.keymap
```

### 日志

日志通过 SWD 口使用 SEGGER RTT 协议输出,默认关闭,可通过如下编译选项开启:
Expand All @@ -66,4 +77,4 @@ pyocd rtt -t stm32f405rg

## 致谢

感谢[三叶虫本虫](https://space.bilibili.com/21972064)提供用于开发的硬件。
感谢[三叶虫](https://space.bilibili.com/21972064)提供用于开发的硬件。
18 changes: 0 additions & 18 deletions config/boards/arm/hw75_dynamic/hw75_dynamic.dts
Original file line number Diff line number Diff line change
Expand Up @@ -166,24 +166,6 @@
/* 128x296, 50Hz */
dummy-line = <0x30>;
gate-line-width = <0x0a>;

lut = [
A0 90 50 00 00 00 00 00 00 00
50 90 A0 00 00 00 00 00 00 00
A0 90 50 00 00 00 00 00 00 00
50 90 A0 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
0F 0F 00 00 00
0F 0F 00 00 03
0F 0F 00 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00
];
};
};
};
Expand Down
2 changes: 2 additions & 0 deletions config/boards/arm/hw75_dynamic/hw75_dynamic_A.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright (c) 2023 XiNGRZ
# SPDX-License-Identifier: MIT
4 changes: 4 additions & 0 deletions config/boards/arm/hw75_dynamic/hw75_dynamic_A.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
* Copyright (c) 2023 XiNGRZ
* SPDX-License-Identifier: MIT
*/
2 changes: 2 additions & 0 deletions config/boards/arm/hw75_dynamic/hw75_dynamic_B.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright (c) 2023 XiNGRZ
# SPDX-License-Identifier: MIT
26 changes: 26 additions & 0 deletions config/boards/arm/hw75_dynamic/hw75_dynamic_B.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (c) 2023 XiNGRZ
* SPDX-License-Identifier: MIT
*/

&ssd16xx {
full {
lut = [
A0 90 50 00 00 00 00 00 00 00
50 90 A0 00 00 00 00 00 00 00
A0 90 50 00 00 00 00 00 00 00
50 90 A0 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00
0F 0F 00 00 00
0F 0F 00 00 03
0F 0F 00 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00
00 00 00 00 00
];
};
};
7 changes: 7 additions & 0 deletions config/boards/arm/hw75_dynamic/revision.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2023 XiNGRZ
# SPDX-License-Identifier: MIT

board_check_revision(
FORMAT LETTER
DEFAULT_REVISION B
)
2 changes: 1 addition & 1 deletion config/boards/arm/hw75_keyboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ZMK 默认带了几种灯效。可以通过 Fn 组合键切换:
west init -l config
west update
west zephyr-export
west build -s zmk/app -b hw75_keyboard -- -DZMK_CONFIG=$PWD/config
west build -p -s zmk/app -b hw75_keyboard -- -DZMK_CONFIG=$PWD/config
west flash
```

Expand Down

0 comments on commit b635bf5

Please sign in to comment.