From 5c4cc0d64637363aaeb46e2b65bb1b1f99e9e434 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 7 May 2017 17:33:45 -0400 Subject: pwmcmds: Export the maximum PWM value Instead of assuming the maximum PWM value is 255, export a constant from the firmware to the host with the maximum value. Signed-off-by: Kevin O'Connor --- src/pwmcmds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pwmcmds.c') diff --git a/src/pwmcmds.c b/src/pwmcmds.c index e8de0a3b..f5a289d2 100644 --- a/src/pwmcmds.c +++ b/src/pwmcmds.c @@ -43,7 +43,7 @@ command_config_pwm_out(uint32_t *args) p->max_duration = args[4]; } DECL_COMMAND(command_config_pwm_out, - "config_pwm_out oid=%c pin=%u cycle_ticks=%u default_value=%c" + "config_pwm_out oid=%c pin=%u cycle_ticks=%u default_value=%hu" " max_duration=%u"); void @@ -57,7 +57,7 @@ command_schedule_pwm_out(uint32_t *args) sched_add_timer(&p->timer); } DECL_COMMAND(command_schedule_pwm_out, - "schedule_pwm_out oid=%c clock=%u value=%c"); + "schedule_pwm_out oid=%c clock=%u value=%hu"); static void pwm_shutdown(void) @@ -75,4 +75,4 @@ command_set_pwm_out(uint32_t *args) { gpio_pwm_setup(args[0], args[1], args[2]); } -DECL_COMMAND(command_set_pwm_out, "set_pwm_out pin=%u cycle_ticks=%u value=%c"); +DECL_COMMAND(command_set_pwm_out, "set_pwm_out pin=%u cycle_ticks=%u value=%hu"); -- cgit v1.2.3-70-g09d2