Reactos
at master 79 lines 1.5 kB view raw
1/* 2 * PROJECT: ReactOS HAL 3 * LICENSE: BSD - See COPYING.ARM in the top level directory 4 * FILE: hal/halarm/generic/rtc.c 5 * PURPOSE: Real Time Clock and Environment Variable Support 6 * PROGRAMMERS: ReactOS Portable Systems Group 7 */ 8 9/* INCLUDES *******************************************************************/ 10 11#include <hal.h> 12#define NDEBUG 13#include <debug.h> 14 15/* FUNCTIONS ******************************************************************/ 16 17#define RTC_DATA (PVOID)0x101E8000 18 19/* 20 * @implemented 21 */ 22BOOLEAN 23NTAPI 24HalQueryRealTimeClock(IN PTIME_FIELDS Time) 25{ 26 LARGE_INTEGER LargeTime; 27 ULONG Seconds; 28 29 /* Query the RTC value */ 30 Seconds = READ_REGISTER_ULONG(RTC_DATA); 31 32 /* Convert to time */ 33 RtlSecondsSince1970ToTime(Seconds, &LargeTime); 34 35 /* Convert to time-fields */ 36 RtlTimeToTimeFields(&LargeTime, Time); 37 return TRUE; 38} 39 40/* 41 * @unimplemented 42 */ 43BOOLEAN 44NTAPI 45HalSetRealTimeClock(IN PTIME_FIELDS Time) 46{ 47 UNIMPLEMENTED; 48 while (TRUE); 49 return TRUE; 50} 51 52/* 53 * @unimplemented 54 */ 55ARC_STATUS 56NTAPI 57HalSetEnvironmentVariable(IN PCH Name, 58 IN PCH Value) 59{ 60 UNIMPLEMENTED; 61 while (TRUE); 62 return ESUCCESS; 63} 64 65/* 66 * @unimplemented 67 */ 68ARC_STATUS 69NTAPI 70HalGetEnvironmentVariable(IN PCH Name, 71 IN USHORT ValueLength, 72 IN PCH Value) 73{ 74 UNIMPLEMENTED; 75 while (TRUE); 76 return ENOENT; 77} 78 79/* EOF */