Digipots refactor / cleanup (#19690)

This commit is contained in:
Scott Lahteine
2020-10-11 14:58:35 -05:00
committed by GitHub
parent 349465b168
commit 492ba2a111
23 changed files with 240 additions and 187 deletions

View File

@ -175,7 +175,7 @@
#endif
#if EITHER(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
#define HAS_I2C_DIGIPOT 1
#define HAS_MOTOR_CURRENT_I2C 1
#endif
// Multiple Z steppers

View File

@ -1976,7 +1976,7 @@
#define HAS_STEPPER_RESET 1
#endif
#if PIN_EXISTS(DIGIPOTSS)
#define HAS_DIGIPOTSS 1
#define HAS_MOTOR_CURRENT_SPI 1
#endif
#if ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY, MOTOR_CURRENT_PWM_Z, MOTOR_CURRENT_PWM_E)
#define HAS_MOTOR_CURRENT_PWM 1

View File

@ -2667,7 +2667,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
/**
* Digipot requirement
*/
#if HAS_I2C_DIGIPOT
#if HAS_MOTOR_CURRENT_I2C
#if BOTH(DIGIPOT_MCP4018, DIGIPOT_MCP4451)
#error "Enable only one of DIGIPOT_MCP4018 or DIGIPOT_MCP4451."
#elif !MB(MKS_SBASE) \