From 35dcf8c8607483c104711c9398d47d57147f4389 Mon Sep 17 00:00:00 2001 From: Michele Bini Date: Mon, 6 Jun 2022 17:47:43 +0200 Subject: Switch to freertos timers (#1095) * Use FreeRTOS timer for AlarmController * Use FreeRTOS timer for MotorController * Remove app_timer component from compilation as we now solely use FreeROTS timer * Simplify variable and text names for AlarmController and MotorController timers * Call ScheduleAlarm directly from StopAlerting, for recurring timers Co-authored-by: Riku Isokoski Co-authored-by: NeroBurner --- src/components/motor/MotorController.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/components/motor/MotorController.h') diff --git a/src/components/motor/MotorController.h b/src/components/motor/MotorController.h index b5a592b1..6dea6d1f 100644 --- a/src/components/motor/MotorController.h +++ b/src/components/motor/MotorController.h @@ -1,5 +1,7 @@ #pragma once +#include +#include #include namespace Pinetime { @@ -15,8 +17,10 @@ namespace Pinetime { void StopRinging(); private: - static void Ring(void* p_context); - static void StopMotor(void* p_context); + static void Ring(TimerHandle_t xTimer); + static void StopMotor(TimerHandle_t xTimer); + TimerHandle_t shortVib; + TimerHandle_t longVib; }; } } -- cgit v1.2.3-70-g09d2