hocclk: add input current override feature

Co-Authored-By: cat130504 <231865593+cat130504@users.noreply.github.com>
This commit is contained in:
souldbminersmwcandcat130504 committed 2026-06-04 19:29:25 -04:00
1 parent 2908d7520c
commit 82ce031851
8 files changed
+132 -18

No files matched your search

@@ -341,24 +341,29 @@ namespace clockManager {
}
void HandleMiscFeatures()
{
// these dont need to run that often, so dont bother
static u32 tick = 0;
if(++tick > 10) {
tick = 0;
if (config::GetConfigValue(HocClkConfigValue_BatteryChargeCurrent)) {
I2c_Bq24193_SetFastChargeCurrentLimit(config::GetConfigValue(HocClkConfigValue_BatteryChargeCurrent));
}
// these dont need to run that often, so dont bother
static u32 tick = 0;
if(++tick > 10) {
tick = 0;
I2c_BuckConverter_SetMvOut(&I2c_Display, config::GetConfigValue(HocClkConfigValue_DisplayVoltage));
if (config::GetConfigValue(HocClkConfigValue_BatteryChargeCurrent)) {
I2c_Bq24193_SetFastChargeCurrentLimit(config::GetConfigValue(HocClkConfigValue_BatteryChargeCurrent));
}
if(board::GetConsoleType() == HocClkConsoleType_Aula)
AulaDisplay::SetDisplayColorMode((AulaColorMode)config::GetConfigValue(HocClkConfigValue_AulaDisplayColorPreset));
if(config::GetConfigValue(HocClkConfigValue_LiveCpuUv)) {
board::HandleCpuUv();
}
if (config::GetConfigValue(HocClkConfigValue_InputCurrentLimit)) {
I2c_Bq24193_SetInputCurrentLimit(config::GetConfigValue(HocClkConfigValue_InputCurrentLimit));
}
I2c_BuckConverter_SetMvOut(&I2c_Display, config::GetConfigValue(HocClkConfigValue_DisplayVoltage));
if(board::GetConsoleType() == HocClkConsoleType_Aula)
AulaDisplay::SetDisplayColorMode((AulaColorMode)config::GetConfigValue(HocClkConfigValue_AulaDisplayColorPreset));
if(config::GetConfigValue(HocClkConfigValue_LiveCpuUv)) {
board::HandleCpuUv();
}
}
}
void ApplyGpuDvfs(u32 targetHz) {
s32 dvfsOffset = config::GetConfigValue(HocClkConfigValue_DVFSOffset);