diff options
author | David Crocker <dcrocker@eschertech.com> | 2017-06-11 00:19:50 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2017-06-11 00:23:47 +0300 |
commit | 310b7c0e1ae92d65421276c3779efeddfb6977ff (patch) | |
tree | 56afba8162017646c4f1a47b8da0512482c7f336 /src/Heating/Sensors/SpiTemperatureSensor.h | |
parent | d026b0e4d2a7d5fda771e843cfca12e0370440d7 (diff) |
Version 1.19beta6
Refactored temperatyure sensor code
Refactored fan control code
Support invisible axes (M584 P parameter)
Supprt user-defined virtual heaters
Support heater names
Support proportional thermostatic fan control
Fix G10 retraction command
Removed delta probe code
Diffstat (limited to 'src/Heating/Sensors/SpiTemperatureSensor.h')
-rw-r--r-- | src/Heating/Sensors/SpiTemperatureSensor.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Heating/Sensors/SpiTemperatureSensor.h b/src/Heating/Sensors/SpiTemperatureSensor.h new file mode 100644 index 00000000..81399cbf --- /dev/null +++ b/src/Heating/Sensors/SpiTemperatureSensor.h @@ -0,0 +1,27 @@ +/* + * SpiTemperatureSensor.h + * + * Created on: 8 Jun 2017 + * Author: David + */ + +#ifndef SRC_HEATING_SPITEMPERATURESENSOR_H_ +#define SRC_HEATING_SPITEMPERATURESENSOR_H_ + +#include "TemperatureSensor.h" +#include "SharedSpi.h" // for sspi_device + +class SpiTemperatureSensor : public TemperatureSensor +{ +protected: + SpiTemperatureSensor(unsigned int channel, const char *name, unsigned int relativeChannel, uint8_t spiMode, uint32_t clockFrequency); + void InitSpi(); + TemperatureError DoSpiTransaction(const uint8_t dataOut[], size_t nbytes, uint32_t& rslt) const; + + sspi_device device; + uint32_t lastReadingTime; + float lastTemperature; + TemperatureError lastResult; +}; + +#endif /* SRC_HEATING_SPITEMPERATURESENSOR_H_ */ |