diff options
author | Mega Mind <68985133+megamind4089@users.noreply.github.com> | 2020-10-13 00:09:57 +0800 |
---|---|---|
committer | Mega Mind <68985133+megamind4089@users.noreply.github.com> | 2020-10-13 00:09:57 +0800 |
commit | 2e649b7fd4113ff2f0e6ffdfa1ac6ede5feaebf6 (patch) | |
tree | bb83641c45ff8b6641041524fbd6529a108ff96f /app/src | |
parent | 4adcb396ff01bf4a8ab98799139ed3f3339d207c (diff) |
Fix compilation errors and minor tweaks
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/behaviors/behavior_ext_power.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/src/behaviors/behavior_ext_power.c b/app/src/behaviors/behavior_ext_power.c index e8190c1..825f983 100644 --- a/app/src/behaviors/behavior_ext_power.c +++ b/app/src/behaviors/behavior_ext_power.c @@ -11,14 +11,16 @@ #include <drivers/behavior.h> #include <drivers/ext_power.h> +#include <dt-bindings/zmk/ext_power.h> + #include <logging/log.h> LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, struct zmk_behavior_binding_event event) { - const struct device *ext_power = device_get_binding("EXT_POWER"); + struct device *ext_power = device_get_binding("EXT_POWER"); if (ext_power == NULL) { - LOG_ERR("Unable to retrieve ext_power device: %d", command); + LOG_ERR("Unable to retrieve ext_power device: %d", binding->param1); return -EIO; } @@ -33,7 +35,7 @@ static int on_keymap_binding_pressed(struct zmk_behavior_binding *binding, else return ext_power_enable(ext_power); default: - LOG_ERR("Unknown ext_power command: %d", command); + LOG_ERR("Unknown ext_power command: %d", binding->param1); } return -ENOTSUP; |