mbed-os/targets/TARGET_WIZNET/TARGET_W7500x
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_WIZwiki_W7500 Upcase all assembler file extensions 2017-06-20 14:50:08 -05:00
TARGET_WIZwiki_W7500ECO Upcase all assembler file extensions 2017-06-20 14:50:08 -05:00
TARGET_WIZwiki_W7500P Upcase all assembler file extensions 2017-06-20 14:50:08 -05:00
W7500x_Peripheral_Library modified typo 2017-04-27 08:51:40 +09:00
device Restore cmsis_nvic for Cortex-M0 targets 2017-06-08 22:50:23 -05:00
PeripheralNames.h restructure - Moved targets out to top level 2016-09-30 19:18:09 -05:00
PeripheralPins.h restructure - Moved targets out to top level 2016-09-30 19:18:09 -05:00
PortNames.h restructure - Moved targets out to top level 2016-09-30 19:18:09 -05:00
analogin_api.c Modified coding style of mbed. 2017-04-27 08:34:33 +09:00
gpio_api.c restructure - Moved targets out to top level 2016-09-30 19:18:09 -05:00
gpio_irq_api.c delete dead code. -> gpio_irq_api.c 2017-04-27 17:49:30 +09:00
gpio_object.h restructure - Moved targets out to top level 2016-09-30 19:18:09 -05:00
i2c_api.c Renamed files in platform to match source names 2017-02-22 18:17:54 -06:00
mbed_overrides.c restructure - Moved targets out to top level 2016-09-30 19:18:09 -05:00
objects.h restructure - Moved targets out to top level 2016-09-30 19:18:09 -05:00
pinmap.c delete dead code. -> gpio_irq_api.c 2017-04-27 17:49:30 +09:00
port_api.c restructure - Moved targets out to top level 2016-09-30 19:18:09 -05:00
pwmout_api.c restructure - Moved targets out to top level 2016-09-30 19:18:09 -05:00
rtc_api.c restructure - Moved targets out to top level 2016-09-30 19:18:09 -05:00
serial_api.c restructure - Moved targets out to top level 2016-09-30 19:18:09 -05:00
sleep.c Platform: Add sleep/deepsleep user facing functions 2017-01-19 09:39:29 +00:00
spi_api.c spi: Added default spi_master_block_write implementation to all targets 2017-05-25 12:04:58 -05:00
us_ticker.c Ticker: add fire interrupt now function 2017-07-13 12:23:25 +01:00