mbed-os/targets/TARGET_STM
Martin Kojtal 10ea63b8e7 Ticker: add fire interrupt now function
fire_interrupt function should be used for events in the past. As we have now
64bit timestamp, we can figure out what is in the past, and ask a target to invoke
an interrupt immediately. The previous attemps in the target HAL tickers were not ideal, as it can wrap around easily (16 or 32 bit counters). This new
functionality should solve this problem.

set_interrupt for tickers in HAL code should not handle anything but the next match interrupt. If it was in the past is handled by the upper layer.

It is possible that we are setting next event to the close future, so once it is set it is already in the past. Therefore we add a check after set interrupt to verify it is in future.
If it is not, we fire interrupt immediately. This results in
two events - first one immediate, correct one. The second one might be scheduled in far future (almost entire ticker range),
that should be discarded.

The specification for the fire_interrupts are:
- should set pending bit for the ticker interrupt (as soon as possible),
the event we are scheduling is already in the past, and we do not want to skip
any events
- no arguments are provided, neither return value, not needed
- ticker should be initialized prior calling this function (no need to check if it is already initialized)

All our targets provide this new functionality, removing old misleading if (timestamp is in the past) checks.
2017-07-13 12:23:25 +01:00
..
TARGET_STM32F0 Merge pull request #4525 from fahhem/patch-1 2017-07-10 12:04:42 -05:00
TARGET_STM32F1 Merge pull request #4603 from jeromecoutant/PR_OVERRIDE 2017-06-27 14:59:24 -05:00
TARGET_STM32F2 Merge pull request #4529 from LMESTM/issue_1083 2017-06-30 13:53:46 -05:00
TARGET_STM32F3 Merge pull request #4529 from LMESTM/issue_1083 2017-06-30 13:53:46 -05:00
TARGET_STM32F4 Merge pull request #4485 from kegilbert/f429_sdk_flash_driver-rebase 2017-07-10 12:03:03 -05:00
TARGET_STM32F7 Merge pull request #4659 from jeromecoutant/PR_F767 2017-07-06 10:18:08 -05:00
TARGET_STM32L0 Merge pull request #4529 from LMESTM/issue_1083 2017-06-30 13:53:46 -05:00
TARGET_STM32L1 Merge pull request #4529 from LMESTM/issue_1083 2017-06-30 13:53:46 -05:00
TARGET_STM32L4 Merge pull request #4529 from LMESTM/issue_1083 2017-06-30 13:53:46 -05:00
PeripheralPins.h STM32F4 Internal ADC channels rework 2017-04-11 10:12:25 +02:00
PinNamesTypes.h STM32: common pinmap using LL layer to access registers 2017-02-16 18:57:18 +01:00
PortNames.h STM32: make PortNames.h a common file 2017-01-19 15:27:19 +01:00
analogout_api.c STM32: analog_out: generalize code for multiple instance handling 2017-06-27 09:27:46 +02:00
can_api.c Fix another typo 2017-05-29 10:24:03 +02:00
gpio_api.c STM32 remove usage of deprecated MACROs 2017-05-09 16:48:34 +02:00
gpio_irq_api.c STM32: gpio: style consistency 2017-02-16 19:34:08 +01:00
gpio_object.h Typo: update comment (GPIO_IP_WITHOUT_BRR) 2017-02-27 16:32:44 +01:00
hal_tick_16b.c STM32 16 bits tickers: remove unused prototype 2017-06-05 13:12:20 +02:00
hal_tick_32b.c STM32: Check TIM_AUTORELOAD_PRELOAD_DISABLE 2017-05-29 13:48:29 +02:00
i2c_api.c STM32 remove usage of deprecated MACROs 2017-05-09 16:48:34 +02:00
lp_ticker.c Ticker: add fire interrupt now function 2017-07-13 12:23:25 +01:00
mbed_overrides.c STM32 : mbed_overrides.c is common for all families 2017-06-21 16:03:05 +02:00
mbed_rtx.h DISCO_F413ZH: add some files and modification (targets.json, rtx...) 2017-06-22 09:16:32 +02:00
nvic_addr.h STM32F4: json clock source configuration 2017-06-29 09:57:40 +02:00
pinmap.c STM32 F1: Only set GPIO pin speed in case of Output mode 2017-06-02 17:24:01 +02:00
port_api.c STM32: Change Set_GPIO_Clock return type 2017-02-16 18:55:44 +01:00
pwmout_api.c STM32: fix formatting 2017-02-27 17:07:05 +01:00
rtc_api.c Rename function st_rtc_localtime with _rtc_localtime 2017-06-07 23:24:48 -05:00
rtc_api_hal.h STM32: Refactor lp_ticker.c + rtc_api.c + sleep.c + rtc_api_hal.h files 2016-12-21 16:54:18 +00:00
serial_api.c STM32: Put some serial code in common between families 2017-06-09 13:30:54 +02:00
serial_api_hal.h STM32s Serial does not properly handle parity bits 2017-05-30 17:17:20 +01:00
sleep.c STM32 : set back US counter after deepsleep 2017-02-21 17:46:15 +01:00
stm32_assert.h Introduce stm32_assert.h for MBED port 2017-05-29 13:48:29 +02:00
stm_spi_api.c STM32 SPI specific mode for higher performance 2017-06-16 10:23:48 +02:00
trng_api.c rework after directory moves 2016-10-10 10:12:39 +02:00
us_ticker_16b.c Ticker: add fire interrupt now function 2017-07-13 12:23:25 +01:00
us_ticker_32b.c Ticker: add fire interrupt now function 2017-07-13 12:23:25 +01:00