Support two MAX6675 thermocouples (#8686)

This commit is contained in:
Mateusz Krawczuk
2018-11-17 01:20:33 +01:00
committed by Scott Lahteine
parent 0e610815e4
commit ca21ac6b9b
21 changed files with 190 additions and 98 deletions

View File

@ -572,8 +572,11 @@
#if PIN_EXISTS(MAX6675_SCK)
REPORT_NAME_DIGITAL(__LINE__, MAX6675_SCK_PIN)
#endif
#if defined(MAX6675_SS) && MAX6675_SS >= 0
REPORT_NAME_DIGITAL(__LINE__, MAX6675_SS)
#if PIN_EXISTS(MAX6675_SS)
REPORT_NAME_DIGITAL(__LINE__, MAX6675_SS_PIN)
#endif
#if PIN_EXISTS(MAX6675_SS2)
REPORT_NAME_DIGITAL(__LINE__, MAX6675_SS2_PIN)
#endif
// #if defined(MISO) && MISO >= 0
// REPORT_NAME_DIGITAL(__LINE__, MISO)
@ -803,11 +806,11 @@
#if PIN_EXISTS(SUICIDE)
REPORT_NAME_DIGITAL(__LINE__, SUICIDE_PIN)
#endif
#if defined(THERMO_CS1) && THERMO_CS1 >= 0
REPORT_NAME_DIGITAL(__LINE__, THERMO_CS1)
#if PIN_EXISTS(THERMO_CS1)
REPORT_NAME_DIGITAL(__LINE__, THERMO_CS1_PIN)
#endif
#if defined(THERMO_CS2) && THERMO_CS2 >= 0
REPORT_NAME_DIGITAL(__LINE__, THERMO_CS2)
#if PIN_EXISTS(THERMO_CS2)
REPORT_NAME_DIGITAL(__LINE__, THERMO_CS2_PIN)
#endif
#if PIN_EXISTS(THERMO_DO)
REPORT_NAME_DIGITAL(__LINE__, THERMO_DO_PIN)

View File

@ -85,9 +85,9 @@
// SPI for Max6675 or Max31855 Thermocouple
#if DISABLED(SDSUPPORT)
#define MAX6675_SS -1
#define MAX6675_SS_PIN -1
#else
#define MAX6675_SS -1
#define MAX6675_SS_PIN -1
#endif
//

View File

@ -77,9 +77,9 @@
// SPI for Max6675 or Max31855 Thermocouple
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 53
#define MAX6675_SS_PIN 53
#else
#define MAX6675_SS 53
#define MAX6675_SS_PIN 53
#endif
//

View File

@ -113,9 +113,9 @@
// SPI for Max6675 or Max31855 Thermocouple
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#define MAX6675_SS_PIN 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#define MAX6675_SS_PIN 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
//

View File

@ -113,9 +113,9 @@
// SPI for Max6675 or Max31855 Thermocouple
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#define MAX6675_SS_PIN 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#define MAX6675_SS_PIN 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
//

View File

@ -113,9 +113,9 @@
// SPI for Max6675 or Max31855 Thermocouple
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#define MAX6675_SS_PIN 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#define MAX6675_SS_PIN 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
//

View File

@ -136,12 +136,14 @@
//
#define THERMO_SCK_PIN 78 // E2
#define THERMO_DO_PIN 3 // E5
#define THERMO_CS1 5 // E3
#define THERMO_CS2 2 // E4
#define THERMO_CS1_PIN 5 // E3
#define THERMO_CS2_PIN 2 // E4
#define MAX6675_SS THERMO_CS1
#define MAX6675_SS_PIN THERMO_CS1_PIN
#define MAX6675_SS2_PIN THERMO_CS2_PIN
#define MAX6675_SCK_PIN THERMO_SCK_PIN
#define MAX6675_DO_PIN THERMO_DO_PIN
//
// Augmentation for auto-assigning plugs
//

View File

@ -172,9 +172,9 @@
// SPI for Max6675 or Max31855 Thermocouple
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 53
#define MAX6675_SS_PIN 53
#else
#define MAX6675_SS 49
#define MAX6675_SS_PIN 49
#endif
//

View File

@ -205,9 +205,9 @@
// SPI for Max6675 or Max31855 Thermocouple
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#define MAX6675_SS_PIN 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#define MAX6675_SS_PIN 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
//

View File

@ -64,11 +64,11 @@
#define TEMP_BED_PIN 10 // Analog Input
// SPI for Max6675 or Max31855 Thermocouple
#undef MAX6675_SS
#undef MAX6675_SS_PIN
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 69 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#define MAX6675_SS_PIN 69 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 69 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#define MAX6675_SS_PIN 69 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
//

View File

@ -112,9 +112,9 @@
// SPI for Max6675 or Max31855 Thermocouple
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 53
#define MAX6675_SS_PIN 53
#else
#define MAX6675_SS 49
#define MAX6675_SS_PIN 49
#endif
//

View File

@ -77,9 +77,9 @@
// SPI for Max6675 or Max31855 Thermocouple
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#define MAX6675_SS_PIN 66 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#define MAX6675_SS_PIN 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
//

View File

@ -87,12 +87,11 @@
#define TEMP_BED_PIN 11 // Analog Input
// SPI for Max6675 or Max31855 Thermocouple
#undef MAX6675_SS_PIN
#if DISABLED(SDSUPPORT)
#undef MAX6675_SS
#define MAX6675_SS 67 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#define MAX6675_SS_PIN 67 // Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else
#undef MAX6675_SS
#define MAX6675_SS 67 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#define MAX6675_SS_PIN 67 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
//

View File

@ -73,11 +73,11 @@
#define TEMP_BED_PIN 15 // Analog Input
// SPI for Max6675 or Max31855 Thermocouple
#undef MAX6675_SS
#undef MAX6675_SS_PIN
#if DISABLED(SDSUPPORT)
#define MAX6675_SS 53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card
#define MAX6675_SS_PIN 53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 49 // Don't use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#define MAX6675_SS_PIN 49 // Don't use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
//

View File

@ -158,11 +158,13 @@
#endif
// SPI for Max6675 or Max31855 Thermocouple
//#if DISABLED(SDSUPPORT)
// #define MAX6675_SS 53
//#else
// #define MAX6675_SS 49
//#endif
/*
#if DISABLED(SDSUPPORT)
#define MAX6675_SS_PIN 53
#else
#define MAX6675_SS_PIN 49
#endif
*/
//
// Misc. Functions

View File

@ -144,11 +144,13 @@
#endif
// SPI for Max6675 or Max31855 Thermocouple
//#if DISABLED(SDSUPPORT)
// #define MAX6675_SS 53
//#else
// #define MAX6675_SS 49
//#endif
/*
#if DISABLED(SDSUPPORT)
#define MAX6675_SS_PIN 53
#else
#define MAX6675_SS_PIN 49
#endif
*/
//
// Misc. Functions

View File

@ -125,7 +125,7 @@
#define SPI_FLASH_CS -1
// SPI for Max6675 or Max31855 Thermocouple
#define MAX6675_SS 65
#define MAX6675_SS_PIN 65
#define MAX31855_SS0 65
#define MAX31855_SS1 52
#define MAX31855_SS2 50