summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjlukanc <27705324+jlukanc1@users.noreply.github.com>2021-01-25 12:44:58 -0500
committerjlukanc <27705324+jlukanc1@users.noreply.github.com>2021-01-25 12:44:58 -0500
commitf27e63290639ca257e88298b60429d72271c4954 (patch)
tree313b49b05689ee48af67d720a546b5dabd03b07f /src
parent8c3df5f0211e0cc31de90039a73fe48b9a9aafe0 (diff)
move app timer def
Diffstat (limited to 'src')
-rw-r--r--src/components/motor/MotorController.cpp3
-rw-r--r--src/components/motor/MotorController.h7
2 files changed, 5 insertions, 5 deletions
diff --git a/src/components/motor/MotorController.cpp b/src/components/motor/MotorController.cpp
index 738e6d33..51a01b4c 100644
--- a/src/components/motor/MotorController.cpp
+++ b/src/components/motor/MotorController.cpp
@@ -4,6 +4,7 @@
#include "app_timer.h"
#include "nrf_drv_clock.h"
+APP_TIMER_DEF(vibTimer);
using namespace Pinetime::Controllers;
@@ -36,4 +37,4 @@ void MotorController::SetDuration(uint8_t motorDuration) {
nrf_gpio_pin_clear(pinMotor);
//start timer for motorDuration miliseconds
app_timer_start(vibTimer, APP_TIMER_TICKS(motorDuration), NULL); //timers trigger at end of duration?
-} \ No newline at end of file
+}
diff --git a/src/components/motor/MotorController.h b/src/components/motor/MotorController.h
index 01fe9304..52ab558c 100644
--- a/src/components/motor/MotorController.h
+++ b/src/components/motor/MotorController.h
@@ -1,6 +1,7 @@
#pragma once
#include <cstdint>
+#include "app_timer.h"
namespace Pinetime {
namespace Controllers {
@@ -11,10 +12,8 @@ namespace Pinetime {
void Init();
void SetDuration(uint8_t motorDuration);
- APP_TIMER_DEF(vibTimer);
-
private:
-
+ app_timer_id_t vibTimer;
};
}
-} \ No newline at end of file
+}