27 lines
620 B
C++
27 lines
620 B
C++
/*
|
|
* ESP8266 RTC Memory Access library
|
|
*
|
|
* copyright: Jannik Beyerstedt | http://jannikbeyerstedt.de | code@jannikbeyerstedt.de
|
|
* license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
|
*/
|
|
|
|
#ifndef RTC_HELPERS_H
|
|
#define RTC_HELPERS_H
|
|
|
|
#include <Arduino.h>
|
|
|
|
#define RTC_DATA_ATTR // only for copy-paste compatibility with ESP32 Code
|
|
|
|
typedef struct {
|
|
uint32_t magic;
|
|
uint8_t sampleCnt;
|
|
uint8_t wlanConnectFailCnt;
|
|
float tempAccu;
|
|
float humiAccu;
|
|
} rtcStore_t __attribute__((aligned(4)));
|
|
|
|
bool rtcMemoryLoad(rtcStore_t* rtcStore_ptr);
|
|
bool rtcMemoryStore(rtcStore_t* rtcStore_ptr);
|
|
|
|
#endif
|