zmk_mf68/app/boards/seeeduino_xiao_ble.overlay
Joel Spadin 388e345c28 feat(battery)!: Add chosen node for battery
battery.c now uses the zmk,battery chosen node to select a battery
sensor. Using the node labeled "BATTERY" is maintained for backwards
compatibility but is now deprecated. Custom boards should switch to
using the chosen node.

# Conflicts:
#	app/boards/arm/bluemicro840/bluemicro840_v1.dts
#	app/boards/arm/nice60/nice60.dts
#	app/boards/arm/nrfmicro/nrfmicro_13.dts

# Conflicts:
#	app/boards/arm/bluemicro840/bluemicro840_v1.dts
2022-04-17 11:30:57 -04:00

34 lines
545 B
Text

/*
* Copyright (c) 2021 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
/ {
chosen {
zephyr,console = &cdc_acm_uart;
zmk,battery = &vbatt;
};
vbatt: vbatt {
compatible = "zmk,battery-voltage-divider";
label = "BATTERY";
io-channels = <&adc 7>;
power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
output-ohms = <1000000>;
full-ohms = <(1000000 + 510000)>;
};
};
&adc {
status = "okay";
};
&usbd {
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};