Save and restore from power off

This commit is contained in:
Manuel Bl
2021-09-29 16:48:59 +02:00
parent 0130928601
commit f433e826a7
9 changed files with 402 additions and 1 deletions

30
src/ttn_nvs.h Normal file
View File

@ -0,0 +1,30 @@
/*******************************************************************************
*
* ttn-esp32 - The Things Network device library for ESP-IDF / SX127x
*
* Copyright (c) 2018-2021 Manuel Bleichenbacher
*
* Licensed under MIT License
* https://opensource.org/licenses/MIT
*
* Functions for storing and retrieving TTN communication state from NVS.
*******************************************************************************/
#ifndef TTN_NVS_H
#define TTN_NVS_H
#include <stdbool.h>
#ifdef __cplusplus
extern "C"
{
#endif
void ttn_nvs_save();
bool ttn_nvs_restore(int off_duration);
#ifdef __cplusplus
}
#endif
#endif