summaryrefslogtreecommitdiff
path: root/src/components/motor/MotorController.h
blob: 574b86c8fc4f035b14b7a15dc4fa70bc7292b797 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include <cstdint>
#include "app_timer.h"

namespace Pinetime {
  namespace Controllers {
    static constexpr uint8_t pinMotor = 16;

    class MotorController {
    public:
      MotorController() = default;

      void Init();
      void RunForDuration(uint8_t motorDuration);
      void StartRinging();
      static void StopRinging();

    private:
      static void Ring(void* p_context);
      static void StopMotor(void* p_context);
    };
  }
}