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.
pull/6076/head
Przemyslaw Stekiel 2018-02-12 17:17:45 +00:00
parent 04f0f2b1aa
commit 17dece407a
1 changed files with 0 additions and 1 deletions

View File

@ -71,7 +71,6 @@ public:
// When low power ticker is in use, then do not disable deep-sleep.
Ticker(const ticker_data_t *data) : TimerEvent(data), _function(0), _lock_deepsleep(true) {
data->interface->init();
#if DEVICE_LOWPOWERTIMER
_lock_deepsleep = (data != get_lp_ticker_data());
#endif