move app timer def

This commit is contained in:
jlukanc committed 2021-01-25 12:44:58 -05:00
1 parent 8c3df5f021
commit f27e632906
2 files changed
+5 -5

No files matched your search

+2 -1
View File
@@ -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?
}
}
+3 -4
View File
@@ -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;
};
}
}
}