annotate packages/devs/wallclock/current/include/wallclock.hxx @ 2:443894e2e912 ecos-v1_2_1-release

Block commit of eCos version 1.2.1
author jlarmour
date Tue, 11 May 1999 12:24:34 +0000
parents 3111d98ba7b3
children c38311975d4f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
1 #ifndef CYGONCE_DEVS_WALLCLOCK_HXX
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
2 #define CYGONCE_DEVS_WALLCLOCK_HXX
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
3
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
4 //==========================================================================
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
5 //
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
6 // wallclock.hxx
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
7 //
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
8 // Wallclock interface declaration
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
9 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
10 //==========================================================================
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
11 //####COPYRIGHTBEGIN####
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
12 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
13 // -------------------------------------------
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
14 // The contents of this file are subject to the Cygnus eCos Public License
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
15 // Version 1.0 (the "License"); you may not use this file except in
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
16 // compliance with the License. You may obtain a copy of the License at
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
17 // http://sourceware.cygnus.com/ecos
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
18 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
19 // Software distributed under the License is distributed on an "AS IS"
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
20 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
21 // License for the specific language governing rights and limitations under
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
22 // the License.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
23 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
24 // The Original Code is eCos - Embedded Cygnus Operating System, released
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
25 // September 30, 1998.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
26 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
27 // The Initial Developer of the Original Code is Cygnus. Portions created
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
28 // by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions. All Rights Reserved.
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
29 // -------------------------------------------
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
30 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
31 //####COPYRIGHTEND####
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
32 //==========================================================================
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
33 //#####DESCRIPTIONBEGIN####
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
34 //
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
35 // Author(s): nickg
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
36 // Contributors: nickg
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
37 // Date: 1999-03-05
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
38 // Purpose: Wall Clock declarations
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
39 // Description: This file defines the interface to the wall clock device
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
40 // that provides real time stamps. This is either an interface
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
41 // to a hardware RTC like the Dallas DS12887, or it is emulated
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
42 // using the kernel clock.
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
43 // Usage: #include <cyg/devs/wallclock.hxx>
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
44 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
45 //####DESCRIPTIONEND####
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
46 //
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
47 //==========================================================================
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
48
2
443894e2e912 Block commit of eCos version 1.2.1
jlarmour
parents: 0
diff changeset
49 #include <cyg/infra/cyg_type.h>
0
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
50
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
51 // -------------------------------------------------------------------------
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
52 // Wallclock class
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
53
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
54 class Cyg_WallClock
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
55 {
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
56
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
57 public:
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
58
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
59 Cyg_WallClock();
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
60
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
61 // Returns the current timestamp. This may involve reading the
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
62 // hardware, so it may take anything up to a second to complete.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
63 cyg_uint32 get_current_time();
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
64
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
65 // Sets the value of the timestamp relative to now. This may involve
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
66 // writing to the hardware, so it may take anything up to a second to
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
67 // complete.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
68 void set_current_time( cyg_uint32 time_stamp );
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
69
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
70 // A static pointer to the single system defined wall clock device.
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
71 static Cyg_WallClock *wallclock;
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
72
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
73 };
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
74
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
75 // -------------------------------------------------------------------------
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
76
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
77 #endif // ifndef CYGONCE_DEVS_WALLCLOCK_HXX
3111d98ba7b3 Initial commit of eCos version 1.1
jlarmour
parents:
diff changeset
78 // EOF wallclock.hxx