diff --git a/app/boards/arm/nrf52840_m2/Kconfig.defconfig b/app/boards/arm/nrf52840_m2/Kconfig.defconfig index f3e1f0eb..9bc53b31 100644 --- a/app/boards/arm/nrf52840_m2/Kconfig.defconfig +++ b/app/boards/arm/nrf52840_m2/Kconfig.defconfig @@ -25,4 +25,7 @@ config ZMK_BLE config ZMK_USB default y +config ZMK_BATTERY_VOLTAGE_DIVIDER + default y + endif # BOARD_NRF52840_M2 diff --git a/app/boards/arm/nrf52840_m2/nrf52840_m2.dts b/app/boards/arm/nrf52840_m2/nrf52840_m2.dts index a2497152..1cb9337b 100644 --- a/app/boards/arm/nrf52840_m2/nrf52840_m2.dts +++ b/app/boards/arm/nrf52840_m2/nrf52840_m2.dts @@ -17,6 +17,14 @@ zephyr,flash = &flash0; }; + vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 0>; + output-ohms = <1000000>; + full-ohms = <(1000000 + 1000000)>; + }; + leds { compatible = "gpio-leds"; red_led: led_1 { @@ -119,7 +127,6 @@ }; }; - &flash0 { /* * For more information, see: