Skip to content

Commit 17dece4

Browse files
committed
Remove ticker interface initialization while Ticker creation.
Ticker constructor calls directly target specific ticker init function. Currently there is no problem, since ticker interface initialization functions are protected against multi-calls and simply returns if not called for the first time (interface initialization can be performed only once). According to the new Thicker HAL API requirements: The function ticker_init allows the ticker to keep counting and disables the ticker interrupt. Disabling interrupts while some Ticker interrupts are already scheduled for sure will destroy the schedule. Ticker interface should be initialized only once and it is already done by: static void initialize(const ticker_data_t *ticker) function in /m-bed/hal/mbed_ticker_api.c file.
1 parent 04f0f2b commit 17dece4

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/Ticker.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ class Ticker : public TimerEvent, private NonCopyable<Ticker> {
7171

7272
// When low power ticker is in use, then do not disable deep-sleep.
7373
Ticker(const ticker_data_t *data) : TimerEvent(data), _function(0), _lock_deepsleep(true) {
74-
data->interface->init();
7574
#if DEVICE_LOWPOWERTIMER
7675
_lock_deepsleep = (data != get_lp_ticker_data());
7776
#endif

0 commit comments

Comments
 (0)