diff --git a/docs/blog/2023-10-05-zmk-sotf-6.md b/docs/blog/2023-10-05-zmk-sotf-6.md index b0c8c4d894e..0e9f3768e7c 100644 --- a/docs/blog/2023-10-05-zmk-sotf-6.md +++ b/docs/blog/2023-10-05-zmk-sotf-6.md @@ -130,7 +130,7 @@ This refactor paved way to implementing a long-awaited feature, encoder support #### Underglow auto-off options -[ReFil] added two [new RGB auto off options](/docs/config/underglow), one using an idle timeout and the other USB status in [#1010](https://github.com/zmkfirmware/zmk/pull/1010). +[ReFil] added two [new RGB auto off options](/docs/config/lighting#rgb-underglow), one using an idle timeout and the other USB status in [#1010](https://github.com/zmkfirmware/zmk/pull/1010). #### nice!view support diff --git a/docs/docs/config/backlight.md b/docs/docs/config/backlight.md deleted file mode 100644 index 6f3d6c4d18c..00000000000 --- a/docs/docs/config/backlight.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Backlight Configuration -sidebar_label: Backlight ---- - -See the [backlight feature page](../features/lighting.md#backlight) for more details, and [hardware integration page](../development/hardware-integration/lighting/backlight.mdx) for adding backlight support to a board. - -See [Configuration Overview](index.md) for instructions on how to change these settings. - -## Kconfig - -Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig) - -| Option | Type | Description | Default | -| ------------------------------------ | ---- | ----------------------------------------------------- | ------- | -| `CONFIG_ZMK_BACKLIGHT` | bool | Enables LED backlight | n | -| `CONFIG_ZMK_BACKLIGHT_BRT_STEP` | int | Brightness step in percent | 20 | -| `CONFIG_ZMK_BACKLIGHT_BRT_START` | int | Default brightness in percent | 40 | -| `CONFIG_ZMK_BACKLIGHT_ON_START` | bool | Default backlight state | y | -| `CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE` | bool | Turn off backlight when keyboard goes into idle state | n | -| `CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB` | bool | Turn off backlight when USB is disconnected | n | - -:::note -The `*_START` settings only determine the initial backlight state. Any changes you make with the [backlight behavior](../keymaps/behaviors/backlight.md) are saved to flash after a one minute delay and will be used after that. -::: - -## Devicetree - -Applies to: [`/chosen` node](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) - -| Property | Type | Description | -| --------------- | ---- | -------------------------------------------- | -| `zmk,backlight` | path | The node for the backlight LED driver to use | - -See the Zephyr devicetree bindings for LED drivers: - -- [gpio-leds](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/led/gpio-leds.html) -- [pwm-leds](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/led/pwm-leds.html) - -See the [backlight hardware integration page](../development/hardware-integration/lighting/backlight.mdx) for examples of the properties that must be set to enable backlighting. diff --git a/docs/docs/config/underglow.md b/docs/docs/config/lighting.md similarity index 53% rename from docs/docs/config/underglow.md rename to docs/docs/config/lighting.md index d9de02056b0..8734c70d647 100644 --- a/docs/docs/config/underglow.md +++ b/docs/docs/config/lighting.md @@ -1,13 +1,17 @@ --- -title: RGB Underglow Configuration -sidebar_label: RGB Underglow +title: Lighting Configuration +sidebar_label: Lighting --- -See the [RGB Underglow feature page](../features/lighting.md#rgb-underglow) for more details, and [hardware integration page](../development/hardware-integration/lighting/underglow.md) for adding underglow support to a board. +See the [Lighting feature page](../features/lighting.md) for an overview of the available lighting systems in ZMK. + +## RGB Underglow + +See the [RGB underglow section](../features/lighting.md#rgb-underglow) in the Lighting feature page for more details, and [hardware integration page](../development/hardware-integration/lighting/underglow.md) for adding underglow support to a board. See [Configuration Overview](index.md) for instructions on how to change these settings. -## Kconfig +### Kconfig RGB underglow depends on [Zephyr's LED strip driver](https://github.com/zephyrproject-rtos/zephyr/tree/main/drivers/led_strip), which provides additional Kconfig options. @@ -44,8 +48,46 @@ Values for `CONFIG_ZMK_RGB_UNDERGLOW_EFF_START`: The `*_START` settings only determine the initial underglow state. Any changes you make with the [underglow behavior](../keymaps/behaviors/underglow.md) are saved to flash after a one minute delay and will be used after that. ::: -## Devicetree +### Devicetree ZMK does not have any Devicetree properties of its own. See the Devicetree bindings for [Zephyr's LED strip drivers](https://github.com/zephyrproject-rtos/zephyr/tree/main/dts/bindings/led_strip). See the [RGB underglow hardware integration page](../development/hardware-integration/lighting/underglow.md) for examples of the properties that must be set to enable underglow. + +## Backlight + +See the [backlight section](../features/lighting.md#backlight) in Lighting feature page for more details, and [hardware integration page](../development/hardware-integration/lighting/backlight.mdx) for adding backlight support to a board. + +See [Configuration Overview](index.md) for instructions on how to change these settings. + +### Kconfig + +Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig) + +| Option | Type | Description | Default | +| ------------------------------------ | ---- | ----------------------------------------------------- | ------- | +| `CONFIG_ZMK_BACKLIGHT` | bool | Enables LED backlight | n | +| `CONFIG_ZMK_BACKLIGHT_BRT_STEP` | int | Brightness step in percent | 20 | +| `CONFIG_ZMK_BACKLIGHT_BRT_START` | int | Default brightness in percent | 40 | +| `CONFIG_ZMK_BACKLIGHT_ON_START` | bool | Default backlight state | y | +| `CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE` | bool | Turn off backlight when keyboard goes into idle state | n | +| `CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB` | bool | Turn off backlight when USB is disconnected | n | + +:::note +The `*_START` settings only determine the initial backlight state. Any changes you make with the [backlight behavior](../keymaps/behaviors/backlight.md) are saved to flash after a one minute delay and will be used after that. +::: + +### Devicetree + +Applies to: [`/chosen` node](https://docs.zephyrproject.org/3.5.0/build/dts/intro-syntax-structure.html#aliases-and-chosen-nodes) + +| Property | Type | Description | +| --------------- | ---- | -------------------------------------------- | +| `zmk,backlight` | path | The node for the backlight LED driver to use | + +See the Zephyr devicetree bindings for LED drivers: + +- [gpio-leds](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/led/gpio-leds.html) +- [pwm-leds](https://docs.zephyrproject.org/3.5.0/build/dts/api/bindings/led/pwm-leds.html) + +See the [backlight hardware integration page](../development/hardware-integration/lighting/backlight.mdx) for examples of the properties that must be set to enable backlighting. diff --git a/docs/docs/features/lighting.md b/docs/docs/features/lighting.md index 58919874174..3d64b8701e3 100644 --- a/docs/docs/features/lighting.md +++ b/docs/docs/features/lighting.md @@ -71,7 +71,7 @@ For split keyboards, set `chain-length` to the number of LEDs installed on each ### Configuring RGB Underglow -See [RGB underglow configuration](../config/underglow.md). +See [RGB underglow configuration](../config/lighting.md#rgb-underglow). ### Adding RGB Underglow Support to a Keyboard @@ -98,7 +98,7 @@ If your board or shield does not have backlight configured, refer to [Adding Bac ### Configuring Backlight There are various Kconfig options used to configure the backlight feature. -See [backlight configuration](../config/backlight.md) for details. +See [backlight configuration](../config/lighting.md#backlight) for details. ### Adding Backlight to a Board or a Shield diff --git a/docs/docs/keymaps/behaviors/backlight.md b/docs/docs/keymaps/behaviors/backlight.md index a3f9f7a077f..6dbb6e7b24c 100644 --- a/docs/docs/keymaps/behaviors/backlight.md +++ b/docs/docs/keymaps/behaviors/backlight.md @@ -38,7 +38,7 @@ Here is a table describing the action for each define: :::note[Backlight settings persistence] The backlight settings that are changed via the `&bl` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. -They will also override the start values set by [`CONFIG_ZMK_BACKLIGHT_*_START` settings](../../config/backlight.md#kconfig). +They will also override the start values set by [`CONFIG_ZMK_BACKLIGHT_*_START` settings](../../config/lighting.md#kconfig-1). However the settings will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. ::: diff --git a/docs/docs/keymaps/behaviors/underglow.md b/docs/docs/keymaps/behaviors/underglow.md index 7c10ec557e4..ecffca75658 100644 --- a/docs/docs/keymaps/behaviors/underglow.md +++ b/docs/docs/keymaps/behaviors/underglow.md @@ -57,7 +57,7 @@ Value Limits: :::note[RGB settings persistence] The RGB settings that are changed via the `&rgb_ug` behavior will be saved to flash storage and hence persist across restarts and firmware flashes. -They will also override the start values set by [`CONFIG_ZMK_RGB_*_START` settings](../../config/underglow.md#kconfig). +They will also override the start values set by [`CONFIG_ZMK_RGB_*_START` settings](../../config/lighting.md#kconfig). However the settings will only be saved after [`CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE`](../../config/system.md#general) milliseconds in order to reduce potential wear on the flash memory. ::: diff --git a/docs/sidebars.js b/docs/sidebars.js index b3e7acabd40..57f07fc301a 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -119,19 +119,18 @@ module.exports = { }, collapsed: true, items: [ - "config/backlight", "config/battery", "config/behaviors", "config/bluetooth", "config/combos", "config/displays", "config/encoders", + "config/lighting", "config/pointing", "config/keymap", "config/layout", "config/kscan", "config/power", - "config/underglow", "config/system", "config/studio", ], diff --git a/docs/static/_redirects b/docs/static/_redirects index 7870e1a3f4f..7f53abb902a 100644 --- a/docs/static/_redirects +++ b/docs/static/_redirects @@ -6,6 +6,8 @@ /docs/features/backlight /docs/features/lighting#backlight 301 /docs/codes/modifiers /docs/keymaps/modifiers 301 /docs/codes/* /docs/keymaps/list-of-keycodes 301 +/docs/config/backlight /docs/config/lighting#backlight 301 +/docs/config/underglow /docs/config/lighting#rgb-underglow 301 /docs/features/beta-testing /docs/features/modules#beta-testing 301 /docs/development/setup /docs/development/local-toolchain/setup 301 /docs/development/boards-shields-keymaps /docs/development/hardware-integration/boards-shields-keymaps 301