aboutsummaryrefslogtreecommitdiff
path: root/docs/zh-cn/custom_quantum_functions.md
diff options
context:
space:
mode:
authorXelus22 <17491233+Xelus22@users.noreply.github.com>2021-07-20 02:50:55 +1000
committerGitHub <noreply@github.com>2021-07-19 09:50:55 -0700
commitb73a29aaeabe1004423a2ea6180a94a95a1f0d91 (patch)
tree41f8708f6d3be543d0d97bc1f73c6c5e69c66ca9 /docs/zh-cn/custom_quantum_functions.md
parentf792aee954c6e5ced81af381775438afa2710c72 (diff)
downloadqmk_firmware-b73a29aaeabe1004423a2ea6180a94a95a1f0d91.tar.gz
qmk_firmware-b73a29aaeabe1004423a2ea6180a94a95a1f0d91.zip
[Bug] Develop - Change uint32_t to layer_state_t (#13596)
* fix sat75 * update uint32_t to layer_state
Diffstat (limited to 'docs/zh-cn/custom_quantum_functions.md')
-rw-r--r--docs/zh-cn/custom_quantum_functions.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/zh-cn/custom_quantum_functions.md b/docs/zh-cn/custom_quantum_functions.md
index 27b2edf38..44cb5cf76 100644
--- a/docs/zh-cn/custom_quantum_functions.md
+++ b/docs/zh-cn/custom_quantum_functions.md
@@ -297,7 +297,7 @@ void suspend_wakeup_init_user(void) {
297本例使用了Planck键盘示范了如何设置 [RGB背光灯](feature_rgblight.md)使之与层对应 297本例使用了Planck键盘示范了如何设置 [RGB背光灯](feature_rgblight.md)使之与层对应
298 298
299```c 299```c
300uint32_t layer_state_set_user(uint32_t state) { 300layer_state_t layer_state_set_user(layer_state_t state) {
301 switch (biton32(state)) { 301 switch (biton32(state)) {
302 case _RAISE: 302 case _RAISE:
303 rgblight_setrgb (0x00, 0x00, 0xFF); 303 rgblight_setrgb (0x00, 0x00, 0xFF);
@@ -321,7 +321,7 @@ uint32_t layer_state_set_user(uint32_t state) {
321### `layer_state_set_*` 函数文档 321### `layer_state_set_*` 函数文档
322 322
323* 键盘/修订: `uint32_t layer_state_set_kb(uint32_t state)` 323* 键盘/修订: `uint32_t layer_state_set_kb(uint32_t state)`
324* 布局: `uint32_t layer_state_set_user(uint32_t state)` 324* 布局: `layer_state_t layer_state_set_user(layer_state_t state)`
325 325
326 326
327该`状态`是活动层的bitmask, 详见[布局概述](keymap.md#布局的层状态) 327该`状态`是活动层的bitmask, 详见[布局概述](keymap.md#布局的层状态)
@@ -377,7 +377,7 @@ void keyboard_post_init_user(void) {
377以上函数会在读EEPROM配置后立即使用该设置来设置默认层RGB颜色。"raw"的值是从你上面基于"union"创建的结构体中转换来的。 377以上函数会在读EEPROM配置后立即使用该设置来设置默认层RGB颜色。"raw"的值是从你上面基于"union"创建的结构体中转换来的。
378 378
379```c 379```c
380uint32_t layer_state_set_user(uint32_t state) { 380layer_state_t layer_state_set_user(layer_state_t state) {
381 switch (biton32(state)) { 381 switch (biton32(state)) {
382 case _RAISE: 382 case _RAISE:
383 if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); } 383 if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); }