ReactOS  0.4.15-dev-994-ga9f6032
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

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file rtc.c.

◆ RTC_DATA

#define RTC_DATA   (PVOID)0x101E8000

Definition at line 17 of file rtc.c.

Function Documentation

◆ HalGetEnvironmentVariable()

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

Definition at line 70 of file rtc.c.

73 {
75  while (TRUE);
76  return ENOENT;
77 }
#define TRUE
Definition: types.h:120
Definition: arc.h:46
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by NtQuerySystemEnvironmentValue().

◆ HalQueryRealTimeClock()

BOOLEAN NTAPI HalQueryRealTimeClock ( IN PTIME_FIELDS  Time)

Definition at line 24 of file rtc.c.

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:105

Referenced by ExpSetTimeZoneInformation(), and Phase1InitializationDiscard().

◆ HalSetEnvironmentVariable()

ARC_STATUS NTAPI HalSetEnvironmentVariable ( IN PCH  Name,
IN PCH  Value 
)

Definition at line 57 of file rtc.c.

59 {
61  while (TRUE);
62  return ESUCCESS;
63 }
Definition: arc.h:32
#define TRUE
Definition: types.h:120
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by NtSetSystemEnvironmentValue().

◆ HalSetRealTimeClock()

BOOLEAN NTAPI HalSetRealTimeClock ( IN PTIME_FIELDS  Time)

Definition at line 45 of file rtc.c.

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

Referenced by KeSetSystemTime(), and NtSetSystemTime().