From 2b122acfc38f82f3a681dbac7b6d47c60d6e6268 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Fri, 29 Apr 2022 21:21:07 -0500 Subject: [PATCH] feat(docs): Updating lighting config docs --- docs/docs/config/backlight.md | 36 +++++++++++++++++++++++++++++++++++ docs/docs/config/underglow.md | 6 +++--- docs/sidebars.js | 1 + 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 docs/docs/config/backlight.md diff --git a/docs/docs/config/backlight.md b/docs/docs/config/backlight.md new file mode 100644 index 00000000..814a29a1 --- /dev/null +++ b/docs/docs/config/backlight.md @@ -0,0 +1,36 @@ +--- +title: Backlight Configuration +sidebar_label: Backlight +--- + +See the [backlight feature page](/docs/features/backlight) for more details, including instructions for adding backlight support to a board. + +See [Configuration Overview](/docs/config) 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 | + +## Devicetree + +Applies to: [`/chosen` node](https://docs.zephyrproject.org/latest/build/dts/intro.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/latest/build/dts/api/bindings/gpio/gpio-leds.html) +- [pwm-leds](https://docs.zephyrproject.org/latest/build/dts/api/bindings/led/pwm-leds.html) + +See the [backlight feature page](/docs/features/backlight) for examples of the properties that must be set to enable backlighting. diff --git a/docs/docs/config/underglow.md b/docs/docs/config/underglow.md index 256e1b4f..4b742362 100644 --- a/docs/docs/config/underglow.md +++ b/docs/docs/config/underglow.md @@ -5,11 +5,11 @@ sidebar_label: RGB Underglow See the [RGB Underglow feature page](/docs/features/underglow) for more details, including instructions for adding underglow support to a board. -See [Configuration Overview](/docs/config/index) for instructions on how to change these settings. +See [Configuration Overview](/docs/config) for instructions on how to change these settings. ## Kconfig -RGB underglow depends on [Zephyr's LED strip driver](https://github.com/zephyrproject-rtos/zephyr/tree/master/drivers/led_strip), which provides additional Kconfig options. +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. Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig) @@ -38,6 +38,6 @@ Values for `CONFIG_ZMK_RGB_UNDERGLOW_EFF_START`: ## Devicetree -ZMK does not have any Devicetree properties of its own. See the Devicetree bindings for [Zephyr's LED strip driver](https://github.com/zephyrproject-rtos/zephyr/tree/master/dts/bindings/led_strip). +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 feature page](/docs/features/underglow) for examples of the properties that must be set to enable underglow. diff --git a/docs/sidebars.js b/docs/sidebars.js index b8e74e0f..231d4f71 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -54,6 +54,7 @@ module.exports = { ], Configuration: [ "config/index", + "config/backlight", "config/behaviors", "config/combos", "config/displays",