mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-21 13:48:00 -06:00
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:
parent
a361b92184
commit
5c4cc0d646
5 changed files with 23 additions and 14 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue