Implement persistent alarm storage

This commit is contained in:
2023-05-19 16:15:17 +01:00
parent 685e0950bf
commit e4668f0c04
6 changed files with 122 additions and 10 deletions

View File

@@ -0,0 +1,31 @@
/*
* SPDX-License-Identifier: AGPL-3.0-only
* Copyright (c) Camden Dixie O'Brien
*/
#ifndef ALARM_STORE_H
#define ALARM_STORE_H
#include "time_manager.h"
#include "sdkconfig.h"
#include <stdbool.h>
typedef struct {
bool set;
Time time;
} Alarm;
extern Alarm alarms[CONFIG_MAX_ALARMS];
/**
* Initialize alarm store and load alarms from storage.
*/
void alarm_store_init(void);
/**
* Save alarms to storage.
*/
void alarm_store_save(void);
#endif