Something went wrong. Try again.
Reactos
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980/* * PROJECT: ReactOS HAL * LICENSE: BSD - See COPYING.ARM in the top level directory * FILE: hal/halarm/generic/rtc.c * PURPOSE: Real Time Clock and Environment Variable Support * PROGRAMMERS: ReactOS Portable Systems Group */
/* INCLUDES *******************************************************************/
#include <hal.h>#define NDEBUG#include <debug.h>
/* FUNCTIONS ******************************************************************/
#define RTC_DATA (PVOID)0x101E8000
/* * @implemented */BOOLEANNTAPIHalQueryRealTimeClock(IN PTIME_FIELDS Time){ LARGE_INTEGER LargeTime; ULONG Seconds;
/* Query the RTC value */ Seconds = READ_REGISTER_ULONG(RTC_DATA);
/* Convert to time */ RtlSecondsSince1970ToTime(Seconds, &LargeTime);
/* Convert to time-fields */ RtlTimeToTimeFields(&LargeTime, Time); return TRUE;}
/* * @unimplemented */BOOLEANNTAPIHalSetRealTimeClock(IN PTIME_FIELDS Time){ UNIMPLEMENTED; while (TRUE); return TRUE;}
/* * @unimplemented */ARC_STATUSNTAPIHalSetEnvironmentVariable(IN PCH Name, IN PCH Value){ UNIMPLEMENTED; while (TRUE); return ESUCCESS;}
/* * @unimplemented */ARC_STATUSNTAPIHalGetEnvironmentVariable(IN PCH Name, IN USHORT ValueLength, IN PCH Value){ UNIMPLEMENTED; while (TRUE); return ENOENT;}
/* EOF */