zephyr/include/drivers
Andy Ross ab488277bc drivers/timer: Unify timeout setting APIs
The existing API had two almost identical functions: _set_time() and
_timer_idle_enter().  Both simply instruct the timer driver to set the
next timer interrupt expiration appropriately so that the call to
z_clock_announce() will be made at the requested number of ticks.  On
most/all hardware, these should be implementable identically.

Unfortunately because they are specified differently, existing drivers
have implemented them in parallel.

Specify a new, unified, z_clock_set_timeout().  Document it clearly
for implementors.  And provide a shim layer for legacy drivers that
will continue to use the old functions.

Note that this patch fixes an existing bug found by inspection: the
old call to _set_time() out of z_clock_announce() failed to test for
the "wait forever" case in the situation where clock_always_on is
true, meaning that a system that reached this point and then never set
another timeout would freeze its uptime clock incorrectly.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-10-16 15:03:10 -04:00
..
bluetooth headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
clock_control drivers: usb: Add nRF52840 USBD driver 2018-10-12 13:14:12 +02:00
console drivers: console: native: header fix 2018-10-15 09:36:37 -04:00
display driver: Updated ILI9340 driver to use display API 2018-10-03 11:29:00 -07:00
entropy headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
gpio headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
i2c/slave headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
ieee802154 include: Add missing headers guard 2018-09-17 15:49:26 -04:00
modem headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
pci headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
usb usb: Use const for status_callback parameter 2018-10-10 09:21:55 -04:00
wifi include: Add missing headers guard 2018-09-17 15:49:26 -04:00
ioapic.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
loapic.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
mvic.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
sysapic.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
system_timer.h drivers/timer: Unify timeout setting APIs 2018-10-16 15:03:10 -04:00