Files
ModbusThermometer/Config.h
2014-11-17 22:16:01 +01:00

38 lines
634 B
C++

#ifndef _config_h_
#define _config_h_
#include <stdint.h>
typedef union {
float f;
uint8_t e[sizeof(float)];
} u_float;
typedef union {
uint32_t i;
uint8_t e[sizeof(uint32_t)];
} u_uint32;
namespace Config {
const uint32_t MAGIC_TOKEN = 0xDEADBEE1;
const int MAGIC = 0;
const int ADC1START = 4;
const int ADC2START = 12;
const int THERMO1START = 20;
const int THERMO2START = 24;
bool initialize();
bool isInitialized();
float getFloat(int pos);
void setFloat(int pos, float value);
uint32_t getUInt32(int pos);
void setUInt32(int pos, uint32_t value);
void setMagic();
}
#endif // _config_h_