#ifndef DS1624_H #define DS1624_H #include "../global.h" #include "../configs/ds1624/ds1624.h" #define DS1624_BASE_ADDR B01001000 #define DS1624_ADDR DS1624_BASE_ADDR | (DS1624_A0 * B00000001) | (DS1624_A1 * B00000010) | (DS1624_A2 * B00000100) /** * Registers and bit mask definition **/ #define DS1624_CONFIG 0xAC #define DS1624_CONFIG_DONE B10000000 #define DS1624_CONFIG_1SHOT B00000001 #define DS1624_CONFIG_CONT B00000000 // Select your config here! #define DS1624_CONFIGS DS1624_CONFIG_CONT #define DS1624_READ_TEMP 0xAA #define DS1624_SMPL_START 0xEE #define DS1624_SMPL_STOP 0x22 #define DS1624_ACCESS_MEM 0x17 class DS1624 { public: DS1624(); void Init(void); uint16_t readTemp(void); private: }; extern DS1624 TEMP; #endif