summaryrefslogtreecommitdiff
path: root/src/components/motor/MotorController.h
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-06-06 15:47:43 (GMT)
committerGitHub <noreply@github.com>2022-06-06 15:47:43 (GMT)
commit35dcf8c8607483c104711c9398d47d57147f4389 (patch)
treeb2c17823827af9233dff152d918fb829cc939ad8 /src/components/motor/MotorController.h
parentf95147cf0ed759a6ae30ac8d7cfdf7eba23a3ee9 (diff)
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 <riksu9000@gmail.com> Co-authored-by: NeroBurner <pyro4hell@gmail.com>
Diffstat (limited to 'src/components/motor/MotorController.h')
-rw-r--r--src/components/motor/MotorController.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/motor/MotorController.h b/src/components/motor/MotorController.h
index b5a592b..6dea6d1 100644
--- a/src/components/motor/MotorController.h
+++ b/src/components/motor/MotorController.h
@@ -1,5 +1,7 @@
#pragma once
+#include <FreeRTOS.h>
+#include <timers.h>
#include <cstdint>
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;
};
}
}