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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user