summaryrefslogtreecommitdiff
path: root/src/components/motor/MotorController.h
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-04-17 08:21:42 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-04-17 08:21:42 (GMT)
commitd73be76905c131c9d459cbb4e44be4bfc87dfddb (patch)
treed1a1b09c9757e8cbbe0d381dbc60baf9d8451192 /src/components/motor/MotorController.h
parent3e5fddede322814c2fea7634c1bf0d5f93bae315 (diff)
Simplify MotorController timer code
Diffstat (limited to 'src/components/motor/MotorController.h')
-rw-r--r--src/components/motor/MotorController.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/components/motor/MotorController.h b/src/components/motor/MotorController.h
index 3c6cbd2..99a4e64 100644
--- a/src/components/motor/MotorController.h
+++ b/src/components/motor/MotorController.h
@@ -5,18 +5,25 @@
#include <cstdint>
namespace Pinetime {
+ namespace System {
+ class SystemTask;
+ }
namespace Controllers {
class MotorController {
public:
MotorController() = default;
- void Init();
void RunForDuration(uint8_t motorDuration);
void StartRinging();
void StopRinging();
+ protected:
+ friend class Pinetime::System::SystemTask;
+ void Init(System::SystemTask* systemTask);
+
private:
+ System::SystemTask* systemTask = nullptr;
static void Ring(TimerHandle_t xTimer);
static void StopMotor(TimerHandle_t xTimer);
TimerHandle_t shortVibTimer;