#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__
