Skip to content

Commit 30a250c

Browse files
Steve-TechCalcProgrammer1
authored andcommitted
Replace WinRing0 with PawnIO for SMBus and Super-IO access on Windows
Commits squashed, files cleaned up, and rebased by Adam Honse <calcprogrammer1@gmail.com>
1 parent a1449d9 commit 30a250c

34 files changed

Lines changed: 878 additions & 1067 deletions

OpenRGB.pro

Lines changed: 41 additions & 28 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ This project interacts directly with hardware using reverse engineered protocols
132132
## Projects Used
133133

134134
* OpenRGB directly relies upon these projects.
135-
136-
* WinRing0: https://openlibsys.org/
135+
* PawnIO: https://pawnio.eu/
137136
* libusb: https://github.com/libusb/libusb
138137
* hidapi: https://github.com/libusb/hidapi
139138
* libe131: https://github.com/hhromic/libe131

dependencies/PawnIO/PawnIOLib.dll

4 KB
Binary file not shown.

dependencies/PawnIO/PawnIOLib.h

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// PawnIOLib - Library and tooling source to be used with PawnIO.
2+
// Copyright (C) 2023 namazso <admin@namazso.eu>
3+
//
4+
// This library is free software; you can redistribute it and/or
5+
// modify it under the terms of the GNU Lesser General Public
6+
// License as published by the Free Software Foundation; either
7+
// version 2.1 of the License, or (at your option) any later version.
8+
//
9+
// This library is distributed in the hope that it will be useful,
10+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
// Lesser General Public License for more details.
13+
//
14+
// You should have received a copy of the GNU Lesser General Public
15+
// License along with this library; if not, write to the Free Software
16+
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17+
18+
#ifndef PAWNIOLIB_LIBRARY_H
19+
#define PAWNIOLIB_LIBRARY_H
20+
21+
#ifdef PawnIOLib_EXPORTS
22+
#define PAWNIO_EXPORT __declspec(dllexport)
23+
#else
24+
#define PAWNIO_EXPORT __declspec(dllimport)
25+
#endif
26+
27+
#define PAWNIOAPI EXTERN_C PAWNIO_EXPORT HRESULT STDAPICALLTYPE
28+
29+
/// Get PawnIOLib version.
30+
///
31+
/// @p version A pointer to a ULONG which receives the version.
32+
/// @return A HRESULT.
33+
PAWNIOAPI pawnio_version(PULONG version);
34+
35+
/// Open a PawnIO executor.
36+
///
37+
/// @p handle A handle to the executor, or NULL.
38+
/// @return A HRESULT.
39+
PAWNIOAPI pawnio_open(PHANDLE handle);
40+
41+
/// Load a PawnIO blob.
42+
///
43+
/// @p handle Handle from @c pawnio_open.
44+
/// @p blob Blob to load.
45+
/// @p size Size of blob.
46+
/// @return A HRESULT.
47+
PAWNIOAPI pawnio_load(HANDLE handle, const UCHAR* blob, SIZE_T size);
48+
49+
/// Executes a function from the loaded blob.
50+
///
51+
/// @p handle Handle from @c pawnio_open.
52+
/// @p name Function name to execute.
53+
/// @p in Input buffer.
54+
/// @p in_size Input buffer count.
55+
/// @p out Output buffer.
56+
/// @p out_size Output buffer count.
57+
/// @p return_size Entries written in out_size.
58+
/// @return A HRESULT.
59+
PAWNIOAPI pawnio_execute(
60+
HANDLE handle,
61+
PCSTR name,
62+
const ULONG64* in,
63+
SIZE_T in_size,
64+
PULONG64 out,
65+
SIZE_T out_size,
66+
PSIZE_T return_size
67+
);
68+
69+
/// Close a PawnIO executor.
70+
///
71+
/// @p handle Handle from @c pawnio_open.
72+
/// @return A HRESULT.
73+
PAWNIOAPI pawnio_close(HANDLE handle);
74+
75+
#endif //PAWNIOLIB_LIBRARY_H

dependencies/PawnIO/PawnIOLib.lib

2.45 KB
Binary file not shown.
26.6 KB
Binary file not shown.
38.9 KB
Binary file not shown.
34.2 KB
Binary file not shown.
-64 KB
Binary file not shown.
-14.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)