zmk/app/module/drivers
Joel Spadin 8a8e090ff6 refactor(battery)!: Deduplicate battery code
Changed the zmk,battery-voltage-divider and zmk,battery-nrf-vddh drivers
to support only SENSOR_CHAN_VOLTAGE, and changed the default battery
fetch mode to ZMK_BATTERY_REPORTING_FETCH_MODE_LITHIUM_VOLTAGE. This
allowed for removing the copy of lithium_ion_mv_to_pct() from the
driver code, leaving only the version in battery.c.

Custom boards/shields that use a fuel gauge driver instead of a voltage
sensor, will need the following added to their Kconfig.defconfig:

    choice ZMK_BATTERY_REPORTING_FETCH_MODE
        default ZMK_BATTERY_REPORTING_FETCH_MODE_STATE_OF_CHARGE
    endchoice

Alternatively, add the following to the _defconfig file:

    ZMK_BATTERY_REPORTING_FETCH_MODE_STATE_OF_CHARGE=y
2024-04-05 21:47:13 -05:00
..
display fix(display): Tweaks to memory Kconfig settings. 2024-02-09 14:32:46 -08:00
gpio fix(driver): Fix broken compilation for MAX7318 driver 2023-09-28 12:19:14 -04:00
kscan fix(kscan): Enable charlieplex interrupts for single compatible device 2024-03-30 19:13:39 -07:00
sensor refactor(battery)!: Deduplicate battery code 2024-04-05 21:47:13 -05:00
CMakeLists.txt refactor: Move drivers into properly module. 2023-09-16 11:52:40 -07:00
Kconfig refactor: Move drivers into properly module. 2023-09-16 11:52:40 -07:00