source: rtems/c/src/ada/rtems-clock.ads @ 4778c6e0

4.115
Last change on this file since 4778c6e0 was 1987020, checked in by Joel Sherrill <joel.sherrill@…>, on 02/16/11 at 15:52:29

2011-02-16 Joel Sherrill <joel.sherrill@…>

  • ada/Makefile.am, ada/preinstall.am, ada/rtems.adb, ada/rtems.ads: Split RTEMS Ada95 binding into a master package and a child package per Manager. This is better Ada style.
  • ada/rtems-barrier.adb, ada/rtems-barrier.ads, ada/rtems-clock.adb, ada/rtems-clock.ads, ada/rtems-cpu_usage.ads, ada/rtems-debug.adb, ada/rtems-debug.ads, ada/rtems-event.adb, ada/rtems-event.ads, ada/rtems-extension.adb, ada/rtems-extension.ads, ada/rtems-fatal.adb, ada/rtems-fatal.ads, ada/rtems-interrupt.ads, ada/rtems-io.adb, ada/rtems-io.ads, ada/rtems-message_queue.adb, ada/rtems-message_queue.ads, ada/rtems-object.adb, ada/rtems-object.ads, ada/rtems-partition.adb, ada/rtems-partition.ads, ada/rtems-port.adb, ada/rtems-port.ads, ada/rtems-rate_monotonic.adb, ada/rtems-rate_monotonic.ads, ada/rtems-region.adb, ada/rtems-region.ads, ada/rtems-semaphore.adb, ada/rtems-semaphore.ads, ada/rtems-signal.adb, ada/rtems-signal.ads, ada/rtems-stack_checker.ads, ada/rtems-tasks.adb, ada/rtems-tasks.ads, ada/rtems-timer.adb, ada/rtems-timer.ads: New files.
  • Property mode set to 100644
File size: 2.2 KB
Line 
1--
2--  RTEMS / Specification
3--
4--  DESCRIPTION:
5--
6--  This package provides the interface to the RTEMS API.
7--
8--  DEPENDENCIES:
9--
10--  NOTES:
11--    RTEMS initialization and configuration are called from
12--    the BSP side, therefore should never be called from ADA.
13--
14--  COPYRIGHT (c) 1997-2011.
15--  On-Line Applications Research Corporation (OAR).
16--
17--  The license and distribution terms for this file may in
18--  the file LICENSE in this distribution or at
19--  http://www.rtems.com/license/LICENSE.
20--
21--  $Id$
22--
23
24
25package RTEMS.Clock is
26
27   --
28   --  Clock Types
29   --
30
31   type Time_Value is
32      record
33         Seconds      : RTEMS.Unsigned32;
34         Microseconds : RTEMS.Unsigned32;
35      end record;
36
37   type Clock_Get_Options is (
38      Clock_Get_TOD,
39      Clock_Get_Seconds_Since_Epoch,
40      Clock_Get_Ticks_Since_Boot,
41      Clock_Get_Ticks_Per_Second,
42      Clock_Get_Time_Value
43   );
44
45   type Get_Options is (
46      Get_TOD,
47      Get_Seconds_Since_Epoch,
48      Get_Ticks_Since_Boot,
49      Get_Ticks_Per_Second,
50      Get_Time_Value
51   );
52
53   --
54   --  Clock Manager
55   --
56
57   procedure Set (
58      Time_Buffer : in     RTEMS.Time_Of_Day;
59      Result      :    out RTEMS.Status_Codes
60   );
61
62   procedure Get (
63      Option      : in     RTEMS.Clock.Get_Options;
64      Time_Buffer : in     RTEMS.Address;
65      Result      :    out RTEMS.Status_Codes
66   );
67
68   procedure Get_TOD (
69      Time   :    out RTEMS.Time_Of_Day;
70      Result :    out RTEMS.Status_Codes
71   );
72
73   procedure Get_TOD_Time_Value (
74      Time   :    out RTEMS.Time_Value;
75      Result :    out RTEMS.Status_Codes
76   );
77
78   procedure Get_Seconds_Since_Epoch(
79      The_Interval :    out RTEMS.Interval;
80      Result       :    out RTEMS.Status_Codes
81   );
82
83   function Get_Ticks_Per_Second
84   return RTEMS.Interval;
85   pragma Import (
86      C,
87      Get_Ticks_Per_Second,
88      "rtems_clock_get_ticks_per_second"
89   );
90
91   function Get_Ticks_Since_Boot
92   return RTEMS.Interval;
93   pragma Import (
94      C,
95      Get_Ticks_Since_Boot,
96      "rtems_clock_get_ticks_since_boot"
97   );
98
99   procedure Get_Uptime (
100      Uptime :    out RTEMS.Timespec;
101      Result :    out RTEMS.Status_Codes
102   );
103
104   procedure Tick (
105      Result :    out RTEMS.Status_Codes
106   );
107
108end RTEMS.Clock;
109
Note: See TracBrowser for help on using the repository browser.