OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [rtems/] [include/] [rtems/] [rtems/] [clock.h] - Blame information for rev 219

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  clock.h
2
 *
3
 *  This include file contains all the constants and structures associated
4
 *  with the Clock Manager.  This manager provides facilities to set, obtain,
5
 *  and continually update the current date and time.
6
 *
7
 *  This manager provides directives to:
8
 *
9
 *     + set the current date and time
10
 *     + obtain the current date and time
11
 *     + announce a clock tick
12
 *
13
 *
14
 *  COPYRIGHT (c) 1989-1999.
15
 *  On-Line Applications Research Corporation (OAR).
16
 *
17
 *  The license and distribution terms for this file may be
18
 *  found in the file LICENSE in this distribution or at
19
 *  http://www.OARcorp.com/rtems/license.html.
20
 *
21
 *  $Id: clock.h,v 1.2 2001-09-27 11:59:18 chris Exp $
22
 */
23
 
24
#ifndef __RTEMS_CLOCK_h
25
#define __RTEMS_CLOCK_h
26
 
27
#ifdef __cplusplus
28
extern "C" {
29
#endif
30
 
31
#include <rtems/score/tod.h>
32
#include <rtems/rtems/types.h>
33
 
34
/*
35
 *  List of things which can be returned by the rtems_clock_get directive.
36
 */
37
 
38
typedef enum {
39
  RTEMS_CLOCK_GET_TOD,
40
  RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH,
41
  RTEMS_CLOCK_GET_TICKS_SINCE_BOOT,
42
  RTEMS_CLOCK_GET_TICKS_PER_SECOND,
43
  RTEMS_CLOCK_GET_TIME_VALUE
44
} rtems_clock_get_options;
45
 
46
/*
47
 *  Standard flavor style to return TOD in for a rtems_clock_get option.
48
 */
49
 
50
typedef struct {
51
  unsigned32  seconds;
52
  unsigned32  microseconds;
53
} rtems_clock_time_value;
54
 
55
/*
56
 *  rtems_clock_get
57
 *
58
 *  DESCRIPTION:
59
 *
60
 *  This routine implements the rtems_clock_get directive.  It returns
61
 *  one of the following:
62
 *    + current time of day
63
 *    + seconds since epoch
64
 *    + ticks since boot
65
 *    + ticks per second
66
 */
67
 
68
rtems_status_code rtems_clock_get(
69
  rtems_clock_get_options  option,
70
  void              *time_buffer
71
);
72
 
73
/*
74
 *  rtems_clock_set
75
 *
76
 *  DESCRIPTION:
77
 *
78
 *  This routine implements the rtems_clock_set directive.  It sets
79
 *  the current time of day to that in the time_buffer record.
80
 */
81
 
82
rtems_status_code rtems_clock_set(
83
  rtems_time_of_day *time_buffer
84
);
85
 
86
/*
87
 *  rtems_clock_tick
88
 *
89
 *  DESCRIPTION:
90
 *
91
 *  This routine implements the rtems_clock_tick directive.  It is invoked
92
 *  to inform RTEMS of the occurrence of a clock tick.
93
 */
94
 
95
rtems_status_code rtems_clock_tick( void );
96
 
97
#ifdef __cplusplus
98
}
99
#endif
100
 
101
#endif
102
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.