diff --git a/docs/docs/config/backlight.md b/docs/docs/config/backlight.md index abdbc82b..a3650766 100644 --- a/docs/docs/config/backlight.md +++ b/docs/docs/config/backlight.md @@ -20,6 +20,10 @@ Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/ | `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](../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/latest/build/dts/intro.html#aliases-and-chosen-nodes) diff --git a/docs/docs/config/battery.md b/docs/docs/config/battery.md new file mode 100644 index 00000000..73b4ee92 --- /dev/null +++ b/docs/docs/config/battery.md @@ -0,0 +1,40 @@ +--- +title: Battery Level +sidebar_label: Battery Level +--- + +See the [battery level feature page](../features/battery.md) for more details on configuring a battery sensor. + +See [Configuration Overview](index.md) for instructions on how to change these settings. + +### Devicetree + +Applies to: [`/chosen` node](https://docs.zephyrproject.org/latest/guides/dts/intro.html#aliases-and-chosen-nodes) + +| Property | Type | Description | +| ------------- | ---- | --------------------------------------------- | +| `zmk,battery` | path | The node for the battery sensor driver to use | + +## Battery Voltage Divider Sensor + +Driver for reading the voltage of a battery using an ADC connected to a voltage divider. + +### Devicetree + +Applies to: `compatible = "zmk,battery-voltage-divider"` + +See [Zephyr's voltage divider documentation](https://docs.zephyrproject.org/latest/build/dts/api/bindings/adc/voltage-divider.html). + +## nRF VDDH Battery Sensor + +Driver for reading the voltage of a battery using a Nordic nRF52's VDDH pin. This driver has no configuration except for the required `label` property. + +### Devicetree + +Applies to: `compatible = "zmk,battery-nrf-vddh"` + +Definition file: [zmk/app/drivers/zephyr/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/drivers/zephyr/dts/bindings/sensor/zmk%2Cbattery-nrf-vddh.yaml) + +| Property | Type | Description | +| -------- | ------ | ------------------------- | +| `label` | string | Unique label for the node | diff --git a/docs/docs/config/behaviors.md b/docs/docs/config/behaviors.md index 4a01dfd3..72db21d7 100644 --- a/docs/docs/config/behaviors.md +++ b/docs/docs/config/behaviors.md @@ -158,9 +158,9 @@ See [dt-bindings/zmk/modifiers.h](https://github.com/zmkfirmware/zmk/blob/main/a You can use the following nodes to tweak the default behaviors: -| Node | Behavior | -| -------- | ------------ | -| `&gresc` | Grave escape | +| Node | Behavior | +| -------- | ----------------------------------------- | +| `&gresc` | [Grave escape](../behaviors/mod-morph.md) | ## Sticky Key diff --git a/docs/docs/config/power.md b/docs/docs/config/power.md index bf0de718..e09045ed 100644 --- a/docs/docs/config/power.md +++ b/docs/docs/config/power.md @@ -12,7 +12,7 @@ Configuration for entering low power modes when the keyboard is idle. In the idle state, peripherals such as displays and lighting are disabled, but the keyboard remains connected to Bluetooth so it can immediately respond when you press a key. -In the deep sleep state, the keyboard additionally disconnects from Bluetooth. This state uses very little power, but it may take a few seconds to reconnect after waking. +In the deep sleep state, the keyboard additionally disconnects from Bluetooth and any external power output is disabled. This state uses very little power, but it may take a few seconds to reconnect after waking. ### Kconfig @@ -45,13 +45,3 @@ Applies to: `compatible = "zmk,ext-power-generic"` | `label` | string | Unique label for the node | | `control-gpios` | GPIO array | List of GPIOs which should be active to enable external power | | `init-delay-ms` | int | number of milliseconds to delay after initializing the driver | - -## Battery Voltage Divider - -Driver for reading the voltage of a battery using an ADC connected to a voltage divider. - -### Devicetree - -Applies to: `compatible = "zmk,battery-voltage-divider"` - -See [Zephyr's voltage divider documentation](https://docs.zephyrproject.org/latest/build/dts/api/bindings/adc/voltage-divider.html). diff --git a/docs/docs/config/underglow.md b/docs/docs/config/underglow.md index 6353330d..f9d9e15d 100644 --- a/docs/docs/config/underglow.md +++ b/docs/docs/config/underglow.md @@ -36,6 +36,10 @@ Values for `CONFIG_ZMK_RGB_UNDERGLOW_EFF_START`: | 2 | Spectrum | | 3 | Swirl | +:::note +The `*_START` settings only determine the initial underglow state. Any changes you make with the [underglow behavior](../behaviors/underglow.md) are saved to flash after a one minute delay and will be used after that. +::: + ## 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). diff --git a/docs/docs/features/battery.md b/docs/docs/features/battery.md index 0b4172c2..42ba6d40 100644 --- a/docs/docs/features/battery.md +++ b/docs/docs/features/battery.md @@ -20,6 +20,8 @@ To enable a battery sensor on a new board, add the driver for the sensor to your - `zmk,battery-voltage-divider`: Reads the voltage on an analog input pin. - `zmk,battery-nrf-vddh`: Reads the power supply voltage on a Nordic nRF52's VDDH pin. +See the [battery level configuration page](../config/battery.md) for the configuration supported by each driver provided by ZMK. + Zephyr also provides some drivers for fuel gauge ICs such as the TI bq274xx series and Maxim MAX17xxx series. If you use a battery sensor that does not have an existing driver, you will need to write a new driver that supports the `SENSOR_CHAN_GAUGE_STATE_OF_CHARGE` sensor channel and contribute it to Zephyr or ZMK. Once you have the sensor driver defined, add a `zmk,battery` property to the `chosen` node and set it to reference the sensor node. For example: diff --git a/docs/sidebars.js b/docs/sidebars.js index 231d4f71..7b445a29 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -55,6 +55,7 @@ module.exports = { Configuration: [ "config/index", "config/backlight", + "config/battery", "config/behaviors", "config/combos", "config/displays", @@ -62,8 +63,8 @@ module.exports = { "config/keymap", "config/kscan", "config/power", - "config/system", "config/underglow", + "config/system", ], Development: [ "development/clean-room",