RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
29extern "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
56typedef 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
305typedef struct {
315
329 rtems_id id,
331);
332
335#ifdef __cplusplus
336}
337#endif
338
339#endif
340/* end of include file */
uint32_t rtems_attribute
Definition: attr.h:41
rtems_status_code
Classic API Status.
Definition: status.h:43
uint32_t rtems_name
Classic API object name type.
Definition: types.h:77
uint32_t rtems_task_priority
Definition: tasks.h:55
Objects_Id rtems_id
Used to manage and manipulate RTEMS object identifiers.
Definition: types.h:83
Watchdog_Interval rtems_interval
Used to manage and manipulate intervals specified by clock ticks.
Definition: types.h:127
rtems_status_code rtems_timer_reset(rtems_id id)
RTEMS Timer Reset.
Definition: timerreset.c:24
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:24
rtems_timer_service_routine(* rtems_timer_service_routine_entry)(rtems_id, void *)
Definition: timer.h:101
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_create(rtems_name name, rtems_id *id)
RTEMS Create Timer.
Definition: timercreate.c:185
rtems_status_code rtems_timer_delete(rtems_id id)
RTEMS Delete Timer.
Definition: timerdelete.c:23
rtems_status_code rtems_timer_cancel(rtems_id id)
rtems_timer_cancel
Definition: timercancel.c:19
rtems_status_code rtems_timer_ident(rtems_name name, rtems_id *id)
RTEMS Timer Name to Id.
Definition: timerident.c:27
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:226
void rtems_timer_service_routine
Definition: timer.h:94
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_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
Timer_Classes
Definition: timer.h:56
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
@ TIMER_TIME_OF_DAY
Definition: timer.h:79
@ TIMER_TIME_OF_DAY_ON_TASK
Definition: timer.h:86
@ TIMER_INTERVAL
Definition: timer.h:66
@ TIMER_INTERVAL_ON_TASK
Definition: timer.h:72
@ TIMER_DORMANT
Definition: timer.h:60
uint32_t Watchdog_Interval
Type is used to specify the length of intervals.
Definition: watchdogticks.h:38
Data structure to manage and manipulate calendar time.
Definition: types.h:141
Definition: timer.h:305
Watchdog_Interval stop_time
Definition: timer.h:313
Timer_Classes the_class
Definition: timer.h:307
Watchdog_Interval initial
Definition: timer.h:309
Watchdog_Interval start_time
Definition: timer.h:311
Classic Task Manager API.