You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
838 B
65 lines
838 B
#ifdef __MAX31865_HPP_
|
|
#define __MAX31865_HPP__
|
|
|
|
#include <stdint.h>
|
|
#include "../utils/BitFiled.hpp"
|
|
|
|
|
|
class MAX31865
|
|
{
|
|
public:
|
|
MAX31865();
|
|
|
|
private:
|
|
|
|
//
|
|
// register definitions
|
|
//
|
|
|
|
union CONFIG_REG {
|
|
struct VBIAS{
|
|
enum {
|
|
OFF = 0,
|
|
ON = 1
|
|
};
|
|
typedef BitField<uint8_t,7,1> Bits;
|
|
};
|
|
|
|
struct CONVERSION_MODE{
|
|
enum {
|
|
OFF = 0,
|
|
AUTO = 1
|
|
};
|
|
typedef BitField<uint8_t,6,1> Bits;
|
|
};
|
|
|
|
struct ONE_SHOT{
|
|
enum {
|
|
IDLE = 0,
|
|
SET = 1
|
|
};
|
|
typedef BitField<uint8_t,5,1> Bits;
|
|
};
|
|
|
|
struct WIRING{
|
|
enum {
|
|
TWO_OR_FOUR_WIRE = 0,
|
|
THREE_WIRE = 1
|
|
};
|
|
typedef BitField<uint8_t,4,1> Bits;
|
|
};
|
|
|
|
struct {
|
|
enum {
|
|
IDLE = 0,
|
|
SET = 1
|
|
};
|
|
typedef BitField<uint8_t,5,1> Bits;
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
|
|
#endif // __MAX31865_HPP__
|