️ Refactor still needs work

Reverting #23295
This commit is contained in:
Scott Lahteine
2021-12-25 23:15:17 -06:00
parent 00e6e90648
commit 6a8b9274a3
69 changed files with 1301 additions and 1771 deletions

View File

@@ -29,7 +29,7 @@
// Array to support sticky frequency sets per timer
static uint16_t timer_freq[TIMER_NUM];
void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
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);
@@ -56,7 +56,7 @@ void MarlinHAL::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v
if (previousMode != TIMER_OUTPUT_COMPARE_PWM1) HT->resume();
}
void MarlinHAL::set_pwm_frequency(const pin_t pin, int f_desired) {
void set_pwm_frequency(const pin_t pin, int 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