ReactOS 0.4.15-dev-8100-g1887773
cmosbus.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS HAL
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: CMOS bus data handlers
5 * COPYRIGHT: Copyright 2023 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
6 */
7
8/* INCLUDES *******************************************************************/
9
10#include <hal.h>
11
12/* PRIVATE FUNCTIONS **********************************************************/
13
17 _In_ PBUS_HANDLER BusHandler,
18 _In_ PBUS_HANDLER RootHandler,
23{
24 UNREFERENCED_PARAMETER(RootHandler);
25
26 /* CMOS reads do not support offsets */
27 if (Offset != 0)
28 return 0;
29
30 return HalpGetCmosData(BusHandler->BusNumber,
32 Buffer,
33 Length);
34}
35
39 _In_ PBUS_HANDLER BusHandler,
40 _In_ PBUS_HANDLER RootHandler,
45{
46 UNREFERENCED_PARAMETER(RootHandler);
47
48 /* CMOS writes do not support offsets */
49 if (Offset != 0)
50 return 0;
51
52 return HalpSetCmosData(BusHandler->BusNumber,
54 Buffer,
55 Length);
56}
57
58/* EOF */
Definition: bufpool.h:45
ULONG NTAPI HalpcGetCmosData(_In_ PBUS_HANDLER BusHandler, _In_ PBUS_HANDLER RootHandler, _In_ ULONG SlotNumber, _Out_writes_bytes_(Length) PVOID Buffer, _In_ ULONG Offset, _In_ ULONG Length)
Definition: cmosbus.c:16
ULONG NTAPI HalpcSetCmosData(_In_ PBUS_HANDLER BusHandler, _In_ PBUS_HANDLER RootHandler, _In_ ULONG SlotNumber, _In_reads_bytes_(Length) PVOID Buffer, _In_ ULONG Offset, _In_ ULONG Length)
Definition: cmosbus.c:38
ULONG NTAPI HalpSetCmosData(_In_ ULONG BusNumber, _In_ ULONG SlotNumber, _In_reads_bytes_(Length) PVOID Buffer, _In_ ULONG Length)
Definition: cmos.c:104
ULONG NTAPI HalpGetCmosData(_In_ ULONG BusNumber, _In_ ULONG SlotNumber, _Out_writes_bytes_(Length) PVOID Buffer, _In_ ULONG Length)
Definition: cmos.c:49
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _Out_writes_bytes_(size)
Definition: ms_sal.h:350
#define _In_
Definition: ms_sal.h:308
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
Definition: wdfresource.h:68