]> www.average.org Git - pulsecounter.git/blob - cc3200/persist.h
d8e3ed4531edbeed4405b73fba61624723c00967
[pulsecounter.git] / cc3200 / persist.h
1 #ifndef _PERSIST_H
2 #define _PERSIST_H
3
4 #include <stddef.h>
5 #include <stdint.h>
6
7 #define PAGE_SIZE 4096
8
9 struct persist {
10         uint32_t next:24;
11         uint32_t cold_status:1;
12         uint32_t hot_status:1;
13         uint32_t btn_status:1;
14         uint32_t base_count;
15         uint32_t timestamp;
16         uint32_t event[(PAGE_SIZE - offsetof(struct persist, event)) / sizeof(uint32_t)];
17 };
18
19 #endif