1c2c66affSColin Finck /*
2c2c66affSColin Finck * PROJECT: ReactOS HAL
3*7e1510ebSHermès Bélusca-Maïto * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4*7e1510ebSHermès Bélusca-Maïto * PURPOSE: CMOS bus data handlers
5*7e1510ebSHermès Bélusca-Maïto * COPYRIGHT: Copyright 2023 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
6c2c66affSColin Finck */
7c2c66affSColin Finck
8c2c66affSColin Finck /* INCLUDES *******************************************************************/
9c2c66affSColin Finck
10c2c66affSColin Finck #include <hal.h>
11c2c66affSColin Finck
12c2c66affSColin Finck /* PRIVATE FUNCTIONS **********************************************************/
13c2c66affSColin Finck
14c2c66affSColin Finck ULONG
15c2c66affSColin Finck 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)16*7e1510ebSHermès Bélusca-Maïto HalpcGetCmosData(
17*7e1510ebSHermès Bélusca-Maïto _In_ PBUS_HANDLER BusHandler,
18*7e1510ebSHermès Bélusca-Maïto _In_ PBUS_HANDLER RootHandler,
19*7e1510ebSHermès Bélusca-Maïto _In_ ULONG SlotNumber,
20*7e1510ebSHermès Bélusca-Maïto _Out_writes_bytes_(Length) PVOID Buffer,
21*7e1510ebSHermès Bélusca-Maïto _In_ ULONG Offset,
22*7e1510ebSHermès Bélusca-Maïto _In_ ULONG Length)
23c2c66affSColin Finck {
24*7e1510ebSHermès Bélusca-Maïto UNREFERENCED_PARAMETER(RootHandler);
25*7e1510ebSHermès Bélusca-Maïto
26*7e1510ebSHermès Bélusca-Maïto /* CMOS reads do not support offsets */
27*7e1510ebSHermès Bélusca-Maïto if (Offset != 0)
28c2c66affSColin Finck return 0;
29*7e1510ebSHermès Bélusca-Maïto
30*7e1510ebSHermès Bélusca-Maïto return HalpGetCmosData(BusHandler->BusNumber,
31*7e1510ebSHermès Bélusca-Maïto SlotNumber,
32*7e1510ebSHermès Bélusca-Maïto Buffer,
33*7e1510ebSHermès Bélusca-Maïto Length);
34c2c66affSColin Finck }
35c2c66affSColin Finck
36c2c66affSColin Finck ULONG
37c2c66affSColin Finck 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)38*7e1510ebSHermès Bélusca-Maïto HalpcSetCmosData(
39*7e1510ebSHermès Bélusca-Maïto _In_ PBUS_HANDLER BusHandler,
40*7e1510ebSHermès Bélusca-Maïto _In_ PBUS_HANDLER RootHandler,
41*7e1510ebSHermès Bélusca-Maïto _In_ ULONG SlotNumber,
42*7e1510ebSHermès Bélusca-Maïto _In_reads_bytes_(Length) PVOID Buffer,
43*7e1510ebSHermès Bélusca-Maïto _In_ ULONG Offset,
44*7e1510ebSHermès Bélusca-Maïto _In_ ULONG Length)
45c2c66affSColin Finck {
46*7e1510ebSHermès Bélusca-Maïto UNREFERENCED_PARAMETER(RootHandler);
47*7e1510ebSHermès Bélusca-Maïto
48*7e1510ebSHermès Bélusca-Maïto /* CMOS writes do not support offsets */
49*7e1510ebSHermès Bélusca-Maïto if (Offset != 0)
50c2c66affSColin Finck return 0;
51*7e1510ebSHermès Bélusca-Maïto
52*7e1510ebSHermès Bélusca-Maïto return HalpSetCmosData(BusHandler->BusNumber,
53*7e1510ebSHermès Bélusca-Maïto SlotNumber,
54*7e1510ebSHermès Bélusca-Maïto Buffer,
55*7e1510ebSHermès Bélusca-Maïto Length);
56c2c66affSColin Finck }
57c2c66affSColin Finck
58c2c66affSColin Finck /* EOF */
59