INVOKE_CALLBACK() is now a static inline instead of a macro.

pull/932/head
Rohit Grover 2015-02-25 15:46:16 +00:00 committed by Rohit Grover
parent f8fd702c09
commit 5afdc68620
1 changed files with 7 additions and 6 deletions

View File

@ -57,12 +57,6 @@ static volatile uint32_t overflowBits; /**<
static volatile bool us_ticker_callbackPending = false;
static uint32_t us_ticker_callbackTimestamp;
#define INVOKE_CALLBACK() { \
us_ticker_callbackPending = false; \
rtc1_disableCompareInterrupt(); \
us_ticker_irq_handler(); \
}
static __INLINE void rtc1_enableCompareInterrupt(void)
{
NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk;
@ -87,6 +81,13 @@ static __INLINE void rtc1_disableOverflowInterrupt(void)
NRF_RTC1->EVTENCLR = RTC_EVTEN_OVRFLW_Msk;
}
static __INLINE void INVOKE_CALLBACK(void)
{
us_ticker_callbackPending = false;
rtc1_disableCompareInterrupt();
us_ticker_irq_handler();
}
/**
* @brief Function for starting the RTC1 timer. The RTC timer is expected to
* keep running--some interrupts may be disabled temporarily.