Go to the documentation of this file.00001
00002
00005
00006 #ifndef AP_EEPROMB_h
00007 #define AP_EEPROMB_h
00008
00009
00010 #include "WProgram.h"
00011
00014 class AP_EEPROMB{
00015 public:
00017 AP_EEPROMB(){}
00018
00019 int read_byte(int address);
00020 int read_int(int address);
00021 long read_long(int address);
00022 float read_float(int address);
00023
00024 void write_byte(int address, int8_t value);
00025 void write_int(int address, int16_t value);
00026 void write_long(int address, int32_t value);
00027 void write_float(int address, float value);
00028
00029 private:
00030
00031 union type_union {
00032 int8_t bytes[4];
00033 long lvalue;
00034 int ivalue;
00035 float fvalue;
00036 } _type_union;
00037
00038 };
00039
00040 #endif
00041