Skip to content

Commit

Permalink
Replace (THERMO|MAX*)_*_PIN with TEMP_[01]_(SCK|CS|MISO|MOSI)_PIN
Browse files Browse the repository at this point in the history
  • Loading branch information
slowbro committed Jul 3, 2021
1 parent 8cacc78 commit 956c891
Show file tree
Hide file tree
Showing 39 changed files with 481 additions and 360 deletions.
3 changes: 2 additions & 1 deletion Marlin/src/HAL/SAMD51/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
#error "No custom SD drive cable defined for this board."
#endif

#if defined(MAX6675_SCK_PIN) && defined(MAX6675_DO_PIN) && (MAX6675_SCK_PIN == SCK1 || MAX6675_DO_PIN == MISO1)
#if (defined(TEMP_0_SCK_PIN) && defined(TEMP_0_MISO_PIN) && (TEMP_0_SCK_PIN == SCK1 || TEMP_0_MISO_PIN == MISO1)) || \
(defined(TEMP_1_SCK_PIN) && defined(TEMP_1_MISO_PIN) && (TEMP_1_SCK_PIN == SCK1 || TEMP_1_MISO_PIN == MISO1))
#error "OnBoard SPI BUS can't be shared with other devices."
#endif

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1169,10 +1169,10 @@ void setup() {

// Init and disable SPI thermocouples; this is still needed
#if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 0)
OUT_WRITE(MAX6675_SS_PIN, HIGH); // Disable
OUT_WRITE(TEMP_0_CS_PIN, HIGH); // Disable
#endif
#if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && TEMP_SENSOR_REDUNDANT_SOURCE == 1)
OUT_WRITE(MAX6675_SS2_PIN, HIGH); // Disable
OUT_WRITE(TEMP_1_CS_PIN, HIGH);
#endif

#if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD)
Expand Down
Loading

0 comments on commit 956c891

Please sign in to comment.