combined vbat_sense_en pin and vbatt. Changed function calles in bvd_cfg = { .power_gpios = { to be able to compile. Typos?

combined vbat_sense_en pin and vbatt. Changed function calles in bvd_cfg = {     .power_gpios =         { to be able to compile. Typos?
This commit is contained in:
4pplet 2020-11-13 21:39:58 +01:00
parent b570fc680b
commit f29ae36bfd
2 changed files with 5 additions and 9 deletions

View file

@ -18,18 +18,14 @@
zmk,kscan = &kscan0; zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform; zmk,matrix_transform = &default_transform;
}; };
/*
vbat-sense-en {
label = "VBAT_SENSE_EN";
control-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
};
*/
vbatt { vbatt {
compatible = "zmk,battery-voltage-divider"; compatible = "zmk,battery-voltage-divider";
label = "BATTERY"; label = "BATTERY";
io-channels = <&adc 1>; io-channels = <&adc 1>;
output-ohms = <100000>; output-ohms = <100000>;
full-ohms = <(100000 + 100000)>; full-ohms = <(100000 + 100000)>;
power-gpios = <&gpio1 15 1>; // the 1 indicates active high?
}; };
leds { leds {

View file

@ -205,8 +205,8 @@ static const struct bvd_config bvd_cfg = {
.power_gpios = .power_gpios =
{ {
DT_INST_GPIO_LABEL(0, power_gpios), DT_INST_GPIO_LABEL(0, power_gpios),
DT_INST_PIN(0, power_gpios), DT_INST_GPIO_PIN(0, power_gpios),
DT_INST_FLAGS(0, power_gpios), DT_INST_GPIO_FLAGS(0, power_gpios),
}, },
#endif #endif
.output_ohm = DT_INST_PROP(0, output_ohms), .output_ohm = DT_INST_PROP(0, output_ohms),