Skyward boardcore
|
MAX6675 thermocouple sensor driver. More...
#include <MAX6675.h>
Public Member Functions | |
MAX6675 (SPIBusInterface &bus, miosix::GpioPin cs, SPIBusConfig config=getDefaultSPIConfig()) | |
bool | init () |
Initialize the sensor. | |
bool | selfTest () |
Checks whether the thermocouple is connected or not. | |
bool | checkConnection () |
Checks whether the thermocouple is connected or not. | |
![]() | |
Sensor () | |
Sensor (Sensor &&other) | |
virtual | ~Sensor () |
void | sample () override |
Sample the sensor. | |
virtual TemperatureData | getLastSample () |
![]() | |
virtual | ~AbstractSensor () |
SensorErrors | getLastError () |
Get last error for debugging purposes. Avoid silent fails. | |
Static Public Member Functions | |
static SPIBusConfig | getDefaultSPIConfig () |
Protected Member Functions | |
TemperatureData | sampleImpl () override |
Read a data sample from the sensor. In case of errors, the method should return the last available correct sample. | |
Additional Inherited Members | |
![]() | |
using | DataType |
![]() | |
DataType | lastSample |
miosix::FastMutex | mutex |
![]() | |
SensorErrors | lastError = SensorErrors::NO_ERRORS |
Boardcore::MAX6675::MAX6675 | ( | SPIBusInterface & | bus, |
miosix::GpioPin | cs, | ||
SPIBusConfig | config = getDefaultSPIConfig() ) |
Definition at line 30 of file MAX6675.cpp.
bool Boardcore::MAX6675::checkConnection | ( | ) |
Checks whether the thermocouple is connected or not.
Definition at line 47 of file MAX6675.cpp.
|
static |
Definition at line 35 of file MAX6675.cpp.
|
virtual |
Initialize the sensor.
Implements Boardcore::AbstractSensor.
Definition at line 43 of file MAX6675.cpp.
|
overrideprotectedvirtual |
Read a data sample from the sensor. In case of errors, the method should return the last available correct sample.
Implements Boardcore::Sensor< TemperatureData >.
Definition at line 68 of file MAX6675.cpp.
|
virtual |
Checks whether the thermocouple is connected or not.
Implements Boardcore::AbstractSensor.
Definition at line 45 of file MAX6675.cpp.