Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MCP4451 Digipot Support for Azteeg X5 GT #21680

Merged
merged 2 commits into from
Apr 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Marlin/src/feature/digipot/digipot_mcp4451.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
#elif MB(AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI)
#define DIGIPOT_I2C_FACTOR 113.5f
#define DIGIPOT_I2C_MAX_CURRENT 2.0f
#elif MB(AZTEEG_X5_GT)
#define DIGIPOT_I2C_FACTOR 51.0f
#define DIGIPOT_I2C_MAX_CURRENT 3.0f
#else
#define DIGIPOT_I2C_FACTOR 106.7f
#define DIGIPOT_I2C_MAX_CURRENT 2.5f
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -2846,7 +2846,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
#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) \
#elif !MB(MKS_SBASE, AZTEEG_X5_GT, AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI) \
&& (!defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) || !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1))
#error "DIGIPOT_MCP4018/4451 requires DIGIPOTS_I2C_SDA_* pins to be defined."
#endif
Expand Down