Implement persistent alarm storage
This commit is contained in:
31
components/alarms/alarm_store.h
Normal file
31
components/alarms/alarm_store.h
Normal 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
|
||||
Reference in New Issue
Block a user