2026-09-26 06:34:09

Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie
2026-09-26 06:34:09 +00:00
parent 548bc9ad92
commit bb33424964
48 changed files with 2390 additions and 2230 deletions
+9 -8
View File
@@ -27,13 +27,7 @@ public:
}
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key,
FunctionInfo{0, &IPsmSession::BindStateChangeEvent, "BindStateChangeEvent"},
FunctionInfo{1, &IPsmSession::UnbindStateChangeEvent, "UnbindStateChangeEvent"},
FunctionInfo{2, &IPsmSession::SetChargerTypeChangeEventEnabled, "SetChargerTypeChangeEventEnabled"},
FunctionInfo{3, &IPsmSession::SetPowerSupplyChangeEventEnabled, "SetPowerSupplyChangeEventEnabled"},
FunctionInfo{4, &IPsmSession::SetBatteryVoltageStateChangeEventEnabled, "SetBatteryVoltageStateChangeEventEnabled"}
);
return HandlerTableGenerateWithFind(key, functions);
}
~IPsmSession() override {
@@ -111,8 +105,15 @@ private:
rb.Push(ResultSuccess);
}
KernelHelpers::ServiceContext service_context;
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, &IPsmSession::BindStateChangeEvent, "BindStateChangeEvent"},
FunctionInfo{1, &IPsmSession::UnbindStateChangeEvent, "UnbindStateChangeEvent"},
FunctionInfo{2, &IPsmSession::SetChargerTypeChangeEventEnabled, "SetChargerTypeChangeEventEnabled"},
FunctionInfo{3, &IPsmSession::SetPowerSupplyChangeEventEnabled, "SetPowerSupplyChangeEventEnabled"},
FunctionInfo{4, &IPsmSession::SetBatteryVoltageStateChangeEventEnabled, "SetBatteryVoltageStateChangeEventEnabled"}
);
KernelHelpers::ServiceContext service_context;
bool should_signal_charger_type{};
bool should_signal_power_supply{};
bool should_signal_battery_voltage{};
+6 -4
View File
@@ -19,12 +19,13 @@ public:
explicit PSM_MANU(Core::System& system_)
: ServiceFramework{system_, "psm:manu"} {}
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key,
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "EnableVdd50StateControl"},
FunctionInfo{1, nullptr, "DisableVdd50StateControl"},
FunctionInfo{2, nullptr, "SetVdd50State"}
);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
};
@@ -33,10 +34,11 @@ public:
explicit POWCTL(Core::System& system_)
: ServiceFramework{system_, "powctl"} {}
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key,
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "OpenSession"}
);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
};
+7 -5
View File
@@ -22,11 +22,7 @@ public:
explicit ISession(Core::System& system_) : ServiceFramework{system_, "ISession"} {}
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key,
FunctionInfo{0, nullptr, "GetTemperatureRange"},
FunctionInfo{2, nullptr, "SetMeasurementMode"},
FunctionInfo{4, &ISession::GetTemperature, "GetTemperature"}
);
return HandlerTableGenerateWithFind(key, functions);
}
private:
@@ -37,6 +33,12 @@ private:
rb.Push(ResultSuccess);
rb.Push(temperature);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "GetTemperatureRange"},
FunctionInfo{2, nullptr, "SetMeasurementMode"},
FunctionInfo{4, &ISession::GetTemperature, "GetTemperature"}
);
};
TS::TS(Core::System& system_) : ServiceFramework{system_, "ts"} {