mirror of https://github.com/ARMmbed/mbed-os.git
INVOKE_CALLBACK() is now a static inline instead of a macro.
parent
f8fd702c09
commit
5afdc68620
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue