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