InfiniTime/src/components/motor/MotorController.h

26 lines
581 B
C
Raw Normal View History

2021-01-16 03:11:53 +00:00
#pragma once
#include <cstdint>
2021-01-25 17:44:58 +00:00
#include "app_timer.h"
#include "components/settings/Settings.h"
2021-01-16 03:11:53 +00:00
namespace Pinetime {
namespace Controllers {
static constexpr uint8_t pinMotor = 16;
class MotorController {
2021-04-24 09:00:45 +00:00
public:
MotorController(Controllers::Settings& settingsController);
void Init();
void RunForDuration(uint8_t motorDuration);
void startRunning(uint8_t motorDuration);
void stopRunning();
2021-04-24 09:00:45 +00:00
private:
Controllers::Settings& settingsController;
static void vibrate(void* p_context);
bool isBusy;
};
2021-01-16 03:11:53 +00:00
}
2021-01-25 17:44:58 +00:00
}