ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

rtc.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:         ReactOS HAL
00003  * LICENSE:         BSD - See COPYING.ARM in the top level directory
00004  * FILE:            hal/halarm/generic/rtc.c
00005  * PURPOSE:         Real Time Clock and Environment Variable Support
00006  * PROGRAMMERS:     ReactOS Portable Systems Group
00007  */
00008 
00009 /* INCLUDES *******************************************************************/
00010 
00011 #include <hal.h>
00012 #define NDEBUG
00013 #include <debug.h>
00014 
00015 /* FUNCTIONS ******************************************************************/
00016 
00017 #define RTC_DATA   (PVOID)0x101E8000
00018 
00019 /*
00020  * @implemented
00021  */
00022 BOOLEAN
00023 NTAPI
00024 HalQueryRealTimeClock(IN PTIME_FIELDS Time)
00025 {
00026     LARGE_INTEGER LargeTime;
00027     ULONG Seconds;
00028     
00029     /* Query the RTC value */
00030     Seconds = READ_REGISTER_ULONG(RTC_DATA);
00031     
00032     /* Convert to time */
00033     RtlSecondsSince1970ToTime(Seconds, &LargeTime);
00034     
00035     /* Convert to time-fields */
00036     RtlTimeToTimeFields(&LargeTime, Time);
00037     return TRUE;
00038 }
00039 
00040 /*
00041  * @unimplemented
00042  */
00043 BOOLEAN
00044 NTAPI
00045 HalSetRealTimeClock(IN PTIME_FIELDS Time)
00046 {
00047     UNIMPLEMENTED;
00048     while (TRUE);
00049     return TRUE;
00050 }
00051 
00052 /*
00053  * @unimplemented
00054  */
00055 ARC_STATUS
00056 NTAPI
00057 HalSetEnvironmentVariable(IN PCH Name,
00058                           IN PCH Value)
00059 {
00060     UNIMPLEMENTED;
00061     while (TRUE);
00062     return ESUCCESS;
00063 }
00064 
00065 /*
00066  * @unimplemented
00067  */
00068 ARC_STATUS
00069 NTAPI
00070 HalGetEnvironmentVariable(IN PCH Name,
00071                           IN USHORT ValueLength,
00072                           IN PCH Value)
00073 {
00074     UNIMPLEMENTED;
00075     while (TRUE);
00076     return ENOENT;
00077 }
00078 
00079 /* EOF */

Generated on Sat May 26 2012 04:27:16 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.