ReactOS 0.4.15-dev-8109-gd7be748
rtc.c
Go to the documentation of this file.
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 */
25{
26 LARGE_INTEGER LargeTime;
27 ULONG Seconds;
28
29 /* Query the RTC value */
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 */
46{
48 while (TRUE);
49 return TRUE;
50}
51
52/*
53 * @unimplemented
54 */
58 IN PCH Value)
59{
61 while (TRUE);
62 return ESUCCESS;
63}
64
65/*
66 * @unimplemented
67 */
72 IN PCH Value)
73{
75 while (TRUE);
76 return ENOENT;
77}
78
79/* EOF */
unsigned char BOOLEAN
#define ENOENT
Definition: acclib.h:79
#define READ_REGISTER_ULONG(r)
Definition: arm.h:26
#define UNIMPLEMENTED
Definition: debug.h:118
#define TRUE
Definition: types.h:120
BOOLEAN RtlTimeToTimeFields(IN PLARGE_INTEGER Time, IN PTIME_FIELDS TimeFields)
static PLARGE_INTEGER Time
Definition: time.c:105
NTSYSAPI VOID NTAPI RtlSecondsSince1970ToTime(_In_ ULONG SecondsSince1970, _Out_ PLARGE_INTEGER Time)
CHAR * PCH
Definition: ntbasedef.h:391
unsigned short USHORT
Definition: pedump.c:61
BOOLEAN NTAPI HalQueryRealTimeClock(IN PTIME_FIELDS Time)
Definition: rtc.c:24
ARC_STATUS NTAPI HalGetEnvironmentVariable(IN PCH Name, IN USHORT ValueLength, IN PCH Value)
Definition: rtc.c:70
#define RTC_DATA
Definition: rtc.c:17
BOOLEAN NTAPI HalSetRealTimeClock(IN PTIME_FIELDS Time)
Definition: rtc.c:45
ARC_STATUS NTAPI HalSetEnvironmentVariable(IN PCH Name, IN PCH Value)
Definition: rtc.c:57
@ ESUCCESS
Definition: arc.h:32
ULONG ARC_STATUS
Definition: arc.h:4
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength
Definition: wdfregistry.h:275
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413