From e7a240e1a964c38ef9980dda3bafa79541b6dd8d Mon Sep 17 00:00:00 2001 From: 4pplet <4pplet@protonmail.com> Date: Sat, 14 Nov 2020 10:32:18 +0100 Subject: [PATCH] reverted change in battery_voltage_divider. Updated pin per Nicells suggestion. --- app/boards/arm/cyber60/cyber60.dts | 2 +- app/drivers/zephyr/battery_voltage_divider.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/boards/arm/cyber60/cyber60.dts b/app/boards/arm/cyber60/cyber60.dts index 5e554460..df082ef0 100644 --- a/app/boards/arm/cyber60/cyber60.dts +++ b/app/boards/arm/cyber60/cyber60.dts @@ -25,7 +25,7 @@ io-channels = <&adc 1>; output-ohms = <100000>; full-ohms = <(100000 + 100000)>; - power-gpios = <&gpio1 15 1>; // the 1 indicates active high? + power-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; }; leds { diff --git a/app/drivers/zephyr/battery_voltage_divider.c b/app/drivers/zephyr/battery_voltage_divider.c index d634dfd9..b94e2a27 100644 --- a/app/drivers/zephyr/battery_voltage_divider.c +++ b/app/drivers/zephyr/battery_voltage_divider.c @@ -205,8 +205,8 @@ static const struct bvd_config bvd_cfg = { .power_gpios = { DT_INST_GPIO_LABEL(0, power_gpios), - DT_INST_GPIO_PIN(0, power_gpios), - DT_INST_GPIO_FLAGS(0, power_gpios), + DT_INST_PIN(0, power_gpios), + DT_INST_FLAGS(0, power_gpios), }, #endif .output_ohm = DT_INST_PROP(0, output_ohms),