This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
reprapfirmware-dc42/src/TemperatureError.h
David Crocker 1a0ce16128 Added support for PT100 and other RTDs
Added support for RTDs using the MAX31865 interface chip
2016-04-24 11:44:32 +01:00

35 lines
717 B
C++

/*
* TemperatureError.h
*
* Created on: 21 Apr 2016
* Author: David
*/
#ifndef TEMPERATUREERROR_H_
#define TEMPERATUREERROR_H_
#include <cstdint>
// Result codes returned by temperature sensor drivers
enum class TemperatureError : uint8_t
{
success,
shortCircuit,
shortToVcc,
shortToGround,
openCircuit,
tooHigh,
timeout,
ioError,
hardwareError,
busBusy,
badResponse
};
const char* TemperatureErrorString(TemperatureError err);
// Indicate if a temp sensor error is a "permanent" error: whether it is an error condition which will not rectify over time
// and so the heater should just be shut off immediately.
bool IsPermanentError(TemperatureError err);
#endif /* TEMPERATUREERROR_H_ */