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 <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-05-07 17:33:45 -04:00
parent a361b92184
commit 5c4cc0d646
5 changed files with 23 additions and 14 deletions

View file

@ -162,6 +162,8 @@ static const uint8_t pwm_pins[ARRAY_SIZE(pwm_regs)] PROGMEM = {
#endif
};
DECL_CONSTANT(PWM_MAX, 255);
struct gpio_pwm
gpio_pwm_setup(uint8_t pin, uint32_t cycle_time, uint8_t val)
{