🧑💻 Adjust FastIO AVR timer enums, macros
This commit is contained in:
@ -231,7 +231,7 @@ extern volatile uint32_t systick_uptime_millis;
|
||||
* Set the frequency of the timer corresponding to the provided pin
|
||||
* All Timer PWM pins run at the same frequency
|
||||
*/
|
||||
void set_pwm_frequency(const pin_t pin, int f_desired);
|
||||
void set_pwm_frequency(const pin_t pin, const uint16_t f_desired);
|
||||
|
||||
/**
|
||||
* set_pwm_duty
|
||||
|
@ -56,7 +56,7 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255
|
||||
if (previousMode != TIMER_OUTPUT_COMPARE_PWM1) HT->resume();
|
||||
}
|
||||
|
||||
void set_pwm_frequency(const pin_t pin, int f_desired) {
|
||||
void set_pwm_frequency(const pin_t pin, const uint16_t f_desired) {
|
||||
if (!PWM_PIN(pin)) return; // Don't proceed if no hardware timer
|
||||
const PinName pin_name = digitalPinToPinName(pin);
|
||||
TIM_TypeDef * const Instance = (TIM_TypeDef *)pinmap_peripheral(pin_name, PinMap_PWM); // Get HAL timer instance
|
||||
|
Reference in New Issue
Block a user