/* * SPDX-FileCopyrightText: 2022 Helmut Pozimski * * SPDX-License-Identifier: GPL-2.0-only */ #include #include #include #include #define NUM_WEEK_DAYS 7 static const char WEEK_DAYS[NUM_WEEK_DAYS][4] = {"MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"}; esp_err_t storage_init(char* name); esp_err_t write_wakeup_time_tm(struct tm* datetime, int16_t value); esp_err_t write_wakeup_time_str(const char* key, int16_t value); esp_err_t read_wakeup_time_tm(struct tm* datetime, int16_t* value); esp_err_t read_wakeup_time_str(const char* key, int16_t* value); esp_err_t delete_wakeup_time_str(const char* key); void delete_outdated_entries(struct tm* datetime, char* namespace);