RTEMS 7.0-rc1
Loading...
Searching...
No Matches
timer.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * Copyright (C) 2020, 2021 embedded brains GmbH & Co. KG
13 * Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
35 */
36
37/*
38 * This file is part of the RTEMS quality process and was automatically
39 * generated. If you find something that needs to be fixed or
40 * worded better please post a report or patch to an RTEMS mailing list
41 * or raise a bug report:
42 *
43 * https://www.rtems.org/bugs.html
44 *
45 * For information on updating and regenerating please refer to the How-To
46 * section in the Software Requirements Engineering chapter of the
47 * RTEMS Software Engineering manual. The manual is provided as a part of
48 * a release. For development sources please refer to the online
49 * documentation at:
50 *
51 * https://docs.rtems.org
52 */
53
54/* Generated from spec:/rtems/timer/if/header */
55
56#ifndef _RTEMS_RTEMS_TIMER_H
57#define _RTEMS_RTEMS_TIMER_H
58
59#include <stddef.h>
60#include <rtems/rtems/attr.h>
61#include <rtems/rtems/status.h>
62#include <rtems/rtems/types.h>
64
65#ifdef __cplusplus
66extern "C" {
67#endif
68
69/* Generated from spec:/rtems/timer/if/group */
70
79/* Generated from spec:/rtems/timer/if/class-bit-not-dormant */
80
86#define TIMER_CLASS_BIT_NOT_DORMANT 0x4
87
88/* Generated from spec:/rtems/timer/if/class-bit-on-task */
89
96#define TIMER_CLASS_BIT_ON_TASK 0x2
97
98/* Generated from spec:/rtems/timer/if/class-bit-time-of-day */
99
105#define TIMER_CLASS_BIT_TIME_OF_DAY 0x1
106
107/* Generated from spec:/rtems/timer/if/classes */
108
114typedef enum {
119
125
132
139
148
149/* Generated from spec:/rtems/timer/if/information */
150
156typedef struct {
162
167
175
184
185/* Generated from spec:/rtems/timer/if/get-information */
186
222 rtems_id id,
224);
225
226/* Generated from spec:/rtems/timer/if/server-default-priority */
227
237#define RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ( (rtems_task_priority) -1 )
238
239/* Generated from spec:/rtems/timer/if/service-routine */
240
250
251/* Generated from spec:/rtems/timer/if/service-routine-entry */
252
260
261/* Generated from spec:/rtems/timer/if/create */
262
320
321/* Generated from spec:/rtems/timer/if/ident */
322
369
370/* Generated from spec:/rtems/timer/if/cancel */
371
405
406/* Generated from spec:/rtems/timer/if/delete */
407
446
447/* Generated from spec:/rtems/timer/if/fire-after */
448
493 rtems_id id,
494 rtems_interval ticks,
496 void *user_data
497);
498
499/* Generated from spec:/rtems/timer/if/fire-when */
500
548 rtems_id id,
549 const rtems_time_of_day *wall_time,
551 void *user_data
552);
553
554/* Generated from spec:/rtems/timer/if/initiate-server */
555
612 rtems_task_priority priority,
613 size_t stack_size,
614 rtems_attribute attribute_set
615);
616
617/* Generated from spec:/rtems/timer/if/server-fire-after */
618
665 rtems_id id,
666 rtems_interval ticks,
668 void *user_data
669);
670
671/* Generated from spec:/rtems/timer/if/server-fire-when */
672
722 rtems_id id,
723 const rtems_time_of_day *wall_time,
725 void *user_data
726);
727
728/* Generated from spec:/rtems/timer/if/reset */
729
776
777#ifdef __cplusplus
778}
779#endif
780
781#endif /* _RTEMS_RTEMS_TIMER_H */
This header file provides Classic API directive attributes.
uint32_t rtems_attribute
This type represents Classic API attributes.
Definition: attr.h:96
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
rtems_status_code rtems_timer_reset(rtems_id id)
Resets the timer.
Definition: timerreset.c:44
rtems_timer_service_routine(* rtems_timer_service_routine_entry)(rtems_id, void *)
This type defines the prototype of routines which can be fired by directives of the Timer Manager.
Definition: timer.h:259
rtems_status_code rtems_timer_server_fire_after(rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data)
Fires the timer after the interval using the Timer Server.
Definition: timerserverfireafter.c:44
rtems_status_code rtems_timer_create(rtems_name name, rtems_id *id)
Creates a timer.
Definition: timercreate.c:212
rtems_status_code rtems_timer_delete(rtems_id id)
Deletes the timer.
Definition: timerdelete.c:44
#define TIMER_CLASS_BIT_NOT_DORMANT
This timer class bit indicates that the timer is not dormant.
Definition: timer.h:86
rtems_status_code rtems_timer_server_fire_when(rtems_id id, const rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data)
Fires the timer at the time of day using the Timer Server.
Definition: timerserverfirewhen.c:44
rtems_status_code rtems_timer_cancel(rtems_id id)
Cancels the timer.
Definition: timercancel.c:44
rtems_status_code rtems_timer_fire_when(rtems_id id, const rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data)
Fires the timer at the time of day.
Definition: timerfirewhen.c:44
rtems_status_code rtems_timer_ident(rtems_name name, rtems_id *id)
Identifies a timer by the object name.
Definition: timerident.c:45
rtems_status_code rtems_timer_initiate_server(rtems_task_priority priority, size_t stack_size, rtems_attribute attribute_set)
Initiates the Timer Server.
Definition: timerserver.c:243
void rtems_timer_service_routine
This type defines the return type of routines which can be fired by directives of the Timer Manager.
Definition: timer.h:249
rtems_status_code rtems_timer_get_information(rtems_id id, rtems_timer_information *the_info)
Gets information about the timer.
Definition: timergetinfo.c:44
Timer_Classes
The timer class indicates how the timer was most recently fired.
Definition: timer.h:114
#define TIMER_CLASS_BIT_TIME_OF_DAY
This timer class bit indicates that the timer uses a time of day.
Definition: timer.h:105
rtems_status_code rtems_timer_fire_after(rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data)
Fires the timer after the interval.
Definition: timerfireafter.c:44
#define TIMER_CLASS_BIT_ON_TASK
This timer class bit indicates that the timer routine executes in a task context.
Definition: timer.h:96
@ TIMER_TIME_OF_DAY
This timer class indicates that the timer is currently in use as an time of day timer which will fire...
Definition: timer.h:137
@ TIMER_TIME_OF_DAY_ON_TASK
This timer class indicates that the timer is currently in use as an time of day timer which will fire...
Definition: timer.h:144
@ TIMER_INTERVAL
This timer class indicates that the timer is currently in use as an interval timer which will fire in...
Definition: timer.h:124
@ TIMER_INTERVAL_ON_TASK
This timer class indicates that the timer is currently in use as an interval timer which will fire in...
Definition: timer.h:130
@ TIMER_DORMANT
This timer class indicates that the timer was never in use.
Definition: timer.h:118
uint32_t rtems_name
This type represents Classic API object names.
Definition: types.h:226
uint32_t rtems_task_priority
This integer type represents task priorities of the Classic API.
Definition: types.h:257
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition: types.h:94
Watchdog_Interval rtems_interval
This type represents clock tick intervals.
Definition: types.h:114
uint32_t Watchdog_Interval
Type is used to specify the length of intervals.
Definition: watchdogticks.h:59
This header file provides types used by the Classic API.
This header file provides the status codes of Classic API directives and support functions.
This type represents Classic API calendar times.
Definition: types.h:266
The structure contains information about a timer.
Definition: timer.h:156
Watchdog_Interval stop_time
This member indicates the time the timer was scheduled to fire.
Definition: timer.h:182
Timer_Classes the_class
The timer class member indicates how the timer was most recently fired.
Definition: timer.h:161
Watchdog_Interval initial
This member indicates the initial requested interval.
Definition: timer.h:166
Watchdog_Interval start_time
This member indicates the time the timer was initially scheduled.
Definition: timer.h:174
This header file provides the interfaces of the Watchdog Handler related to watchdog ticks which are ...