diff options
Diffstat (limited to 'src/components/alarm/AlarmController.h')
| -rw-r--r-- | src/components/alarm/AlarmController.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/components/alarm/AlarmController.h b/src/components/alarm/AlarmController.h index f39fbde..099de8b 100644 --- a/src/components/alarm/AlarmController.h +++ b/src/components/alarm/AlarmController.h @@ -17,6 +17,8 @@ */ #pragma once +#include <FreeRTOS.h> +#include <timers.h> #include <cstdint> #include "components/datetime/DateTimeController.h" @@ -29,7 +31,6 @@ namespace Pinetime { public: AlarmController(Controllers::DateTime& dateTimeController); - void Init(System::SystemTask* systemTask); void SetAlarmTime(uint8_t alarmHr, uint8_t alarmMin); void ScheduleAlarm(); void DisableAlarm(); @@ -54,9 +55,15 @@ namespace Pinetime { recurrence = recurType; } + protected: + friend class Pinetime::System::SystemTask; + void Init(System::SystemTask* systemTask); + void OnStopRinging(); + private: Controllers::DateTime& dateTimeController; System::SystemTask* systemTask = nullptr; + TimerHandle_t alarmAppTimer; uint8_t hours = 7; uint8_t minutes = 0; std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> alarmTime; |
