zmk/app/boards/arm/corneish_zen/Kconfig.defconfig
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

92 lines
1.6 KiB
Text

#
# Copyright (c) 2022 Darryl deHaan
# SPDX-License-Identifier: MIT
#
if BOARD_CORNEISH_ZEN_LEFT
config ZMK_KEYBOARD_NAME
default "Corne-ish Zen"
config ZMK_SPLIT_ROLE_CENTRAL
default y
endif # BOARD_CORNEISH_ZEN_LEFT
if BOARD_CORNEISH_ZEN_LEFT || BOARD_CORNEISH_ZEN_RIGHT
config BOARD
default "corneish_zen"
config ZMK_SPLIT
default y
config BT_CTLR
default BT
if USB
config USB_NRFX
default y
config USB_DEVICE_STACK
default y
endif # USB
config ZMK_DISPLAY
select LV_USE_CONT
select LV_FONT_MONTSERRAT_26
select LV_FONT_MONTSERRAT_16
select LV_USE_LABEL
select LV_USE_IMG
choice ZMK_DISPLAY_STATUS_SCREEN
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
endchoice
if ZMK_DISPLAY
config SPI
default y
config IL0323
default y
config ZMK_DISPLAY_BLANK_ON_IDLE
default n
# Needed for the IL0323 driver which allocs memory to clear the display
config HEAP_MEM_POOL_SIZE
default 1024
config LV_Z_MEM_POOL_SIZE
default 4096
endif # ZMK_DISPLAY
menuconfig CUSTOM_WIDGET_BATTERY_STATUS
bool "custom battery status widget"
menuconfig CUSTOM_WIDGET_OUTPUT_STATUS
bool "custom output status widget"
menuconfig CUSTOM_WIDGET_LAYER_STATUS
bool "custom layer status widget"
menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS
bool "custom peripheral status widget"
endif # BOARD_CORNEISH_ZEN_LEFT || BOARD_CORNEISH_ZEN_RIGHT
if BOARD_CORNEISH_ZEN_V1_LEFT || BOARD_CORNEISH_ZEN_V1_RIGHT
config BQ274XX
default y
choice ZMK_BATTERY_REPORTING_FETCH_MODE
default ZMK_BATTERY_REPORTING_FETCH_MODE_STATE_OF_CHARGE
endchoice
endif # BOARD_CORNEISH_ZEN_V1_LEFT || BOARD_CORNEISH_ZEN_V1_RIGHT