config stuff
This commit is contained in:
36
Config.h
Normal file
36
Config.h
Normal file
@ -0,0 +1,36 @@
|
||||
#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 = 0xDEADBEEF;
|
||||
|
||||
const int MAGIC = 0;
|
||||
const int ADC1START = 4;
|
||||
const int ADC2START = 12;
|
||||
|
||||
void 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_
|
Reference in New Issue
Block a user