diff options
Diffstat (limited to 'spec/rtems/clock/if/tick-later-usec.yml')
-rw-r--r-- | spec/rtems/clock/if/tick-later-usec.yml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/spec/rtems/clock/if/tick-later-usec.yml b/spec/rtems/clock/if/tick-later-usec.yml new file mode 100644 index 00000000..ef3f33c8 --- /dev/null +++ b/spec/rtems/clock/if/tick-later-usec.yml @@ -0,0 +1,41 @@ +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +brief: | + Returns the ticks counter value at least delta microseconds in the future. +copyrights: +- Copyright (C) 2014, 2020 embedded brains GmbH (http://www.embedded-brains.de) +definition: + default: + body: | + ${../../type/if/interval:/name} us_per_tick; + + us_per_tick = ${../../config/if/get-microseconds-per-tick:/name}(); + + /* + * Add one additional tick, since we do not know the time to the clock + * next tick. + */ + return ${/score/watchdog/if/ticks-since-boot:/name} + 1 + + ( ${.:/params[0]/name} + us_per_tick - 1 ) / us_per_tick; + params: + - ${../../type/if/interval:/name} ${.:/params[0]/name} + return: ${../../type/if/interval:/name} + variants: [] +description: null +enabled-by: true +interface-type: function +links: +- role: interface-placement + uid: header +- role: interface-ingroup + uid: group +name: rtems_clock_tick_later_usec +notes: null +params: +- description: is the delta value in microseconds. + dir: null + name: delta_in_usec +return: + return: | + The tick counter value delta ticks in the future is returned. + return-values: [] +type: interface |