21 lines
496 B
C
21 lines
496 B
C
#ifndef MAD_CORE_COMMON_MEMORY_H
|
|
#define MAD_CORE_COMMON_MEMORY_H
|
|
|
|
typedef struct mem_block_s mem_block_t;
|
|
|
|
// Important: Must reset EEPROM memory when the size of
|
|
// mem_block_s is changed. Also the flag value must be
|
|
// kept at the first position of the struct.
|
|
|
|
struct mem_block_s {
|
|
byte flag;
|
|
float temp, dewp;
|
|
} __attribute__((packed));
|
|
|
|
void MEM_Write(mem_block_t *in);
|
|
int MEM_Read(mem_block_t *out);
|
|
void MEM_Free(void);
|
|
void MEM_Dump(void);
|
|
|
|
#endif // MAD_CORE_COMMON_MEMORY_H
|