diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-06-06 18:27:54 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-06-06 23:09:58 (GMT) |
| commit | 7c45f185a32c7bcff47c8fda1acdec82d3213717 (patch) | |
| tree | 53b0419fe2a19e6ec5c89d0be0a11dcd8d4ceb00 /src/components/timer/TimerController.h | |
| parent | 94b1b330fc1f6e941a797fedabade4e790e28bc2 (diff) | |
| parent | 35dcf8c8607483c104711c9398d47d57147f4389 (diff) | |
Merge remote-tracking branch 'origin/develop' into analog24
Diffstat (limited to 'src/components/timer/TimerController.h')
| -rw-r--r-- | src/components/timer/TimerController.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/components/timer/TimerController.h b/src/components/timer/TimerController.h index 24d7150..93d8afc 100644 --- a/src/components/timer/TimerController.h +++ b/src/components/timer/TimerController.h @@ -2,9 +2,6 @@ #include <FreeRTOS.h> #include <timers.h> -#include <cstdint> -#include "app_timer.h" -#include "portmacro_cmsis.h" namespace Pinetime { namespace System { @@ -16,7 +13,10 @@ namespace Pinetime { public: TimerController() = default; + void Init(System::SystemTask* systemTask); + void StartTimer(uint32_t duration); + void StopTimer(); uint32_t GetTimeRemaining(); @@ -25,15 +25,9 @@ namespace Pinetime { void OnTimerEnd(); - protected: - friend class Pinetime::System::SystemTask; - void Init(System::SystemTask* systemTask); - private: System::SystemTask* systemTask = nullptr; - TimerHandle_t timerAppTimer; - TickType_t endTicks; - bool timerRunning = false; + TimerHandle_t timer; }; } -}
\ No newline at end of file +} |
