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

@ -632,8 +632,23 @@ class Temperature {
static void updateTemperaturesFromRawValues();
#if ENABLED(HEATER_0_USES_MAX6675)
static int read_max6675();
#define HAS_MAX6675 (ENABLED(HEATER_0_USES_MAX6675) || ENABLED(HEATER_1_USES_MAX6675))
#if HAS_MAX6675
#if ENABLED(HEATER_0_USES_MAX6675) && ENABLED(HEATER_1_USES_MAX6675)
#define COUNT_6675 2
#else
#define COUNT_6675 1
#endif
#if COUNT_6675 > 1
#define READ_MAX6675(N) read_max6675(N)
#else
#define READ_MAX6675(N) read_max6675()
#endif
static int read_max6675(
#if COUNT_6675 > 1
const uint8_t hindex=0
#endif
);
#endif
static void checkExtruderAutoFans();