diff options
author | Nick <nick.win999@gmail.com> | 2020-10-23 01:19:47 -0500 |
---|---|---|
committer | Nick <nick.win999@gmail.com> | 2020-10-23 01:19:47 -0500 |
commit | 6047415b1c26ec06198edecf656d6d9edcd01446 (patch) | |
tree | 2d3ddf606c805f7951f0a9ba954a53e9fc16dcaf /app/drivers | |
parent | 8efcd80f3ae594a489339ac23de8890399f22f59 (diff) |
Fix build for boards without voltage divider
Diffstat (limited to 'app/drivers')
-rw-r--r-- | app/drivers/zephyr/battery_voltage_divider.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/drivers/zephyr/battery_voltage_divider.c b/app/drivers/zephyr/battery_voltage_divider.c index 7dba86a..980f1b4 100644 --- a/app/drivers/zephyr/battery_voltage_divider.c +++ b/app/drivers/zephyr/battery_voltage_divider.c @@ -16,6 +16,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); +#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) + struct io_channel_config { const char *label; uint8_t channel; @@ -203,3 +205,5 @@ static const struct bvd_config bvd_cfg = { DEVICE_AND_API_INIT(bvd_dev, DT_INST_LABEL(0), &bvd_init, &bvd_data, &bvd_cfg, POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, &bvd_api); + +#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */ |