2022-03-15 13:23:20 +11:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021 The ZMK Contributors
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/ {
|
|
|
|
chosen {
|
|
|
|
zephyr,console = &cdc_acm_uart;
|
2021-07-18 08:49:37 +10:00
|
|
|
zmk,battery = &vbatt;
|
2022-03-15 13:23:20 +11:00
|
|
|
};
|
|
|
|
|
2021-07-18 08:49:37 +10:00
|
|
|
vbatt: vbatt {
|
2022-03-15 13:23:20 +11:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|