🐛 Fix, improve PWM on AVR (#23463)

This commit is contained in:
Mike La Spina
2022-01-12 17:28:53 -06:00
committed by GitHub
parent 3e2a38b653
commit 2cfde39eca
7 changed files with 131 additions and 189 deletions

View File

@@ -317,6 +317,10 @@ class Stepper {
#ifndef PWM_MOTOR_CURRENT
#define PWM_MOTOR_CURRENT DEFAULT_PWM_MOTOR_CURRENT
#endif
#ifndef MOTOR_CURRENT_PWM_FREQUENCY
#define MOTOR_CURRENT_PWM_FREQUENCY 31400
#endif
#define MOTOR_CURRENT_COUNT LINEAR_AXES
#elif HAS_MOTOR_CURRENT_SPI
static constexpr uint32_t digipot_count[] = DIGIPOT_MOTOR_CURRENT;