forked from aluveitie/RadeonSensor
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add power readings for SI, CI, VI, AI
- Loading branch information
1 parent
ab2a9c8
commit ff08956
Showing
7 changed files
with
393 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
// Copyright © 2023-2024 ChefKiss. Licensed under the Thou Shalt Not Profit License version 1.5. See LICENSE for | ||
// details. | ||
// Copyright © 2023-2024 ChefKiss. Licensed under the Thou Shalt Not Profit License version 1.5. | ||
// See LICENSE for details. | ||
|
||
#include "KeyImplementations.hpp" | ||
|
||
SMC_RESULT RGPUTempValue::readAccess() { | ||
auto value = this->provider->getTemperature(this->index); | ||
*reinterpret_cast<UInt16 *>(this->data) = VirtualSMCAPI::encodeIntSp(SmcKeyTypeSp78, value); | ||
*reinterpret_cast<UInt16 *>(this->data) = VirtualSMCAPI::encodeIntSp(this->type, value); | ||
return SmcSuccess; | ||
} | ||
|
||
SMC_RESULT RGPUPowerValue::readAccess() { | ||
auto value = this->provider->getPower(this->index); | ||
*reinterpret_cast<UInt16 *>(data) = VirtualSMCAPI::encodeSp(this->type, static_cast<double>(value)); | ||
return SmcSuccess; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.