mbed library sources. Supersedes mbed-src. Edited target satm32f446 for user USART3 pins
Fork of mbed-dev by
Diff: targets/TARGET_NUVOTON/TARGET_M480/us_ticker.c
- Revision:
- 179:b0033dcd6934
- Parent:
- 172:7d866c31b3c5
- Child:
- 182:a56a73fd2a6f
--- a/targets/TARGET_NUVOTON/TARGET_M480/us_ticker.c Thu Nov 23 11:57:25 2017 +0000 +++ b/targets/TARGET_NUVOTON/TARGET_M480/us_ticker.c Thu Dec 07 14:01:42 2017 +0000 @@ -147,16 +147,9 @@ { TIMER_Stop((TIMER_T *) NU_MODBASE(timer1hires_modinit.modname)); - int delta = (int) (timestamp - us_ticker_read()); - if (delta > 0) { - cd_major_minor_us = delta * US_PER_TICK; - us_ticker_arm_cd(); - } else { - // NOTE: With us_ticker_fire_interrupt() introduced, upper layer would handle past event case. - // This code fragment gets redundant, but it is still kept here for backward-compatible. - void us_ticker_fire_interrupt(void); - us_ticker_fire_interrupt(); - } + uint32_t delta = timestamp - us_ticker_read(); + cd_major_minor_us = delta * US_PER_TICK; + us_ticker_arm_cd(); } void us_ticker_fire_interrupt(void)