ReactOS  r75907
rtc.c File Reference
#include <hal.h>
#include <debug.h>
Include dependency graph for rtc.c:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define RTC_DATA   (PVOID)0x101E8000
 

Functions

BOOLEAN NTAPI HalQueryRealTimeClock (IN PTIME_FIELDS Time)
 
BOOLEAN NTAPI HalSetRealTimeClock (IN PTIME_FIELDS Time)
 
ARC_STATUS NTAPI HalSetEnvironmentVariable (IN PCH Name, IN PCH Value)
 
ARC_STATUS NTAPI HalGetEnvironmentVariable (IN PCH Name, IN USHORT ValueLength, IN PCH Value)
 

Macro Definition Documentation

#define NDEBUG

Definition at line 12 of file rtc.c.

#define RTC_DATA   (PVOID)0x101E8000

Definition at line 17 of file rtc.c.

Referenced by HalQueryRealTimeClock().

Function Documentation

ARC_STATUS NTAPI HalGetEnvironmentVariable ( IN PCH  Name,
IN USHORT  ValueLength,
IN PCH  Value 
)

Definition at line 70 of file rtc.c.

Referenced by NtQuerySystemEnvironmentValue().

73 {
75  while (TRUE);
76  return ENOENT;
77 }
#define TRUE
Definition: types.h:120
Definition: arc.h:46
#define UNIMPLEMENTED
Definition: debug.h:114
BOOLEAN NTAPI HalQueryRealTimeClock ( IN PTIME_FIELDS  Time)

Definition at line 24 of file rtc.c.

Referenced by ExpSetTimeZoneInformation(), and Phase1InitializationDiscard().

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 }
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlSecondsSince1970ToTime(_In_ ULONG SecondsSince1970, _Out_ PLARGE_INTEGER Time)
NTKERNELAPI ULONG NTAPI READ_REGISTER_ULONG(IN PULONG Register)
#define RTC_DATA
Definition: rtc.c:17
BOOLEAN RtlTimeToTimeFields(IN PLARGE_INTEGER Time, IN PTIME_FIELDS TimeFields)
unsigned int ULONG
Definition: retypes.h:1
static PLARGE_INTEGER Time
Definition: time.c:28
ARC_STATUS NTAPI HalSetEnvironmentVariable ( IN PCH  Name,
IN PCH  Value 
)

Definition at line 57 of file rtc.c.

Referenced by NtSetSystemEnvironmentValue().

59 {
61  while (TRUE);
62  return ESUCCESS;
63 }
#define TRUE
Definition: types.h:120
Definition: arc.h:32
#define UNIMPLEMENTED
Definition: debug.h:114
BOOLEAN NTAPI HalSetRealTimeClock ( IN PTIME_FIELDS  Time)

Definition at line 45 of file rtc.c.

Referenced by KeSetSystemTime(), and NtSetSystemTime().

46 {
48  while (TRUE);
49  return TRUE;
50 }
#define TRUE
Definition: types.h:120
#define UNIMPLEMENTED
Definition: debug.h:114