update us_ticker_appTimerRunning after a call to app_timer_stop()

pull/839/head
Rohit Grover 2015-01-06 09:43:03 +00:00
parent c18633dcf2
commit e7a9c01708
1 changed files with 6 additions and 2 deletions

View File

@ -94,13 +94,17 @@ void us_ticker_set_interrupt(timestamp_t timestamp)
void us_ticker_disable_interrupt(void)
{
if (us_ticker_appTimerRunning) {
app_timer_stop(us_ticker_appTimerID);
if (app_timer_stop(us_ticker_appTimerID) == NRF_SUCCESS) {
us_ticker_appTimerRunning = false;
}
}
}
void us_ticker_clear_interrupt(void)
{
if (us_ticker_appTimerRunning) {
app_timer_stop(us_ticker_appTimerID);
if (app_timer_stop(us_ticker_appTimerID) == NRF_SUCCESS) {
us_ticker_appTimerRunning = false;
}
}
}