RTEMS  5.0.0
timer.h
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2011.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * Copyright (c) 2009, 2016 embedded brains GmbH.
14  *
15  * The license and distribution terms for this file may be
16  * found in the file LICENSE in this distribution or at
17  * http://www.rtems.org/license/LICENSE.
18  */
19 
20 #ifndef _RTEMS_RTEMS_TIMER_H
21 #define _RTEMS_RTEMS_TIMER_H
22 
23 #include <rtems/rtems/attr.h>
24 #include <rtems/rtems/status.h>
25 #include <rtems/rtems/tasks.h>
26 #include <rtems/rtems/types.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
46 #define TIMER_CLASS_BIT_TIME_OF_DAY 0x1
47 
48 #define TIMER_CLASS_BIT_ON_TASK 0x2
49 
50 #define TIMER_CLASS_BIT_NOT_DORMANT 0x4
51 
56 typedef enum {
61 
66  TIMER_INTERVAL = TIMER_CLASS_BIT_NOT_DORMANT,
67 
73  TIMER_CLASS_BIT_NOT_DORMANT | TIMER_CLASS_BIT_ON_TASK,
74 
80  TIMER_CLASS_BIT_NOT_DORMANT | TIMER_CLASS_BIT_TIME_OF_DAY,
81 
87  TIMER_CLASS_BIT_NOT_DORMANT | TIMER_CLASS_BIT_TIME_OF_DAY |
88  TIMER_CLASS_BIT_ON_TASK
90 
95 
102  rtems_id,
103  void *
104  );
105 
119  rtems_name name,
120  rtems_id *id
121 );
122 
138  rtems_name name,
139  rtems_id *id
140 );
141 
149  rtems_id id
150 );
151 
165  rtems_id id
166 );
167 
187  rtems_id id,
188  rtems_interval ticks,
190  void *user_data
191 );
192 
212  rtems_id id,
213  rtems_interval ticks,
215  void *user_data
216 );
217 
237  rtems_id id,
238  rtems_time_of_day *wall_time,
240  void *user_data
241 );
242 
255  rtems_id id,
256  rtems_time_of_day *wall_time,
258  void *user_data
259 );
260 
272  rtems_id id
273 );
274 
289  rtems_task_priority priority,
290  size_t stack_size,
291  rtems_attribute attribute_set
292 );
293 
299 #define RTEMS_TIMER_SERVER_DEFAULT_PRIORITY (uint32_t) -1
300 
305 typedef struct {
307  Timer_Classes the_class;
315 
329  rtems_id id,
330  rtems_timer_information *the_info
331 );
332 
335 #ifdef __cplusplus
336 }
337 #endif
338 
339 #endif
340 /* end of include file */
Definition: timer.h:86
Timer_Classes the_class
Definition: timer.h:307
uint32_t rtems_attribute
Definition: attr.h:41
rtems_status_code rtems_timer_cancel(rtems_id id)
rtems_timer_cancel
Definition: timercancel.c:19
Watchdog_Interval rtems_interval
Used to manage and manipulate intervals specified by clock ticks.
Definition: types.h:127
uint32_t rtems_name
Classic API object name type.
Definition: types.h:77
Definition: timer.h:66
rtems_status_code rtems_timer_fire_after(rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data)
RTEMS Timer Fire After.
Definition: timerfireafter.c:23
Watchdog_Interval start_time
Definition: timer.h:311
Definition: timer.h:60
rtems_status_code rtems_timer_delete(rtems_id id)
RTEMS Delete Timer.
Definition: timerdelete.c:23
rtems_status_code rtems_timer_server_fire_when(rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data)
RTEMS Timer Server Fire When Directive.
Definition: timerserverfirewhen.c:23
Definition: timer.h:72
rtems_status_code rtems_timer_create(rtems_name name, rtems_id *id)
RTEMS Create Timer.
Definition: timercreate.c:185
Data structure to manage and manipulate calendar time.
Definition: types.h:141
rtems_status_code
Classic API Status.
Definition: status.h:43
rtems_status_code rtems_timer_ident(rtems_name name, rtems_id *id)
RTEMS Timer Name to Id.
Definition: timerident.c:27
Definition: timer.h:305
rtems_status_code rtems_timer_reset(rtems_id id)
RTEMS Timer Reset.
Definition: timerreset.c:23
rtems_status_code rtems_timer_fire_when(rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data)
RTEMS Timer Fire When.
Definition: timerfirewhen.c:23
rtems_status_code rtems_timer_get_information(rtems_id id, rtems_timer_information *the_info)
RTEMS Get Timer Information.
Definition: timergetinfo.c:23
rtems_status_code rtems_timer_server_fire_after(rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data)
RTEMS Timer Server Fire After.
Definition: timerserverfireafter.c:23
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:224
Classic Task Manager API.
Timer_Classes
Definition: timer.h:56
Watchdog_Interval initial
Definition: timer.h:309
uint32_t Watchdog_Interval
Type is used to specify the length of intervals.
Definition: watchdogticks.h:36
Definition: timer.h:79
Watchdog_Interval stop_time
Definition: timer.h:313
Objects_Id rtems_id
Used to manage and manipulate RTEMS object identifiers.
Definition: types.h:83
rtems_timer_service_routine(* rtems_timer_service_routine_entry)(rtems_id, void *)
Definition: timer.h:101
void rtems_timer_service_routine
Definition: timer.h:94
uint32_t rtems_task_priority
Definition: tasks.h:54