Move FAST_PWM_FAN code to HALs (#13491)

This commit is contained in:
Chris Pepper
2019-03-26 06:03:23 +00:00
committed by Scott Lahteine
parent 263f8edff8
commit ffc2c2d7c5
18 changed files with 369 additions and 284 deletions

View File

@@ -157,3 +157,19 @@ void HAL_idletask(void);
#define PLATFORM_M997_SUPPORT
void flashFirmware(int16_t value);
/**
* set_pwm_frequency
* Set the frequency of the timer corresponding to the provided pin
* All Hardware PWM pins run at the same frequency and all
* Software PWM pins run at the same frequency
*/
void set_pwm_frequency(const pin_t pin, int f_desired);
/**
* set_pwm_duty
* Set the PWM duty cycle of the provided pin to the provided value
* Optionally allows inverting the duty cycle [default = false]
* Optionally allows changing the maximum size of the provided value to enable finer PWM duty control [default = 255]
*/
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size=255, const bool invert=false);