forked from kofal.net/zmk
Voltage divider driver initial implementation
This commit is contained in:
@@ -29,6 +29,16 @@
|
||||
};
|
||||
};
|
||||
|
||||
vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
io-channels = <&adc 2>;
|
||||
output-ohms = <2000000>;
|
||||
full-ohms = <(2000000 + 806000)>;
|
||||
};
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
|
||||
@@ -10,6 +10,10 @@ CONFIG_ARM_MPU=y
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
CONFIG_ADC=y
|
||||
|
||||
CONFIG_NEWLIB_LIBC=y
|
||||
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
|
||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||
|
||||
Reference in New Issue
Block a user