forked from neobrain/citra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c9157b
commit de993dc
Showing
6 changed files
with
94 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2024 Citra Emulator Project | ||
// Licensed under GPLv2 or any later version | ||
// Refer to the license.txt file included. | ||
|
||
#include "core/core.h" | ||
#include "core/hle/service/mcu/mcu.h" | ||
#include "core/hle/service/mcu/mcu_hwc.h" | ||
|
||
namespace Service::MCU { | ||
|
||
void InstallInterfaces(Core::System& system) { | ||
auto& service_manager = system.ServiceManager(); | ||
std::make_shared<HWC>()->InstallAsService(service_manager); | ||
} | ||
|
||
} // namespace Service::MCU |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2024 Citra Emulator Project | ||
// Licensed under GPLv2 or any later version | ||
// Refer to the license.txt file included. | ||
|
||
#pragma once | ||
|
||
namespace Core { | ||
class System; | ||
} | ||
|
||
namespace Service::MCU { | ||
|
||
void InstallInterfaces(Core::System& system); | ||
|
||
} // namespace Service::MCU |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright 2024 Citra Emulator Project | ||
// Licensed under GPLv2 or any later version | ||
// Refer to the license.txt file included. | ||
|
||
#include "common/archives.h" | ||
#include "core/hle/service/mcu/mcu_hwc.h" | ||
|
||
SERIALIZE_EXPORT_IMPL(Service::MCU::HWC) | ||
|
||
namespace Service::MCU { | ||
|
||
HWC::HWC() : ServiceFramework("mcu::HWC", 1) { | ||
static const FunctionInfo functions[] = { | ||
// clang-format off | ||
{0x0001, nullptr, "ReadRegister"}, | ||
{0x0002, nullptr, "WriteRegister"}, | ||
{0x0003, nullptr, "GetInfoRegisters"}, | ||
{0x0004, nullptr, "GetBatteryVoltage"}, | ||
{0x0005, nullptr, "GetBatteryLevel"}, | ||
{0x0006, nullptr, "SetPowerLEDPattern"}, | ||
{0x0007, nullptr, "SetWifiLEDState"}, | ||
{0x0008, nullptr, "SetCameraLEDPattern"}, | ||
{0x0009, nullptr, "Set3DLEDState"}, | ||
{0x000A, nullptr, "SetInfoLEDPattern"}, | ||
{0x000B, nullptr, "GetSoundVolume"}, | ||
{0x000C, nullptr, "SetTopScreenFlicker"}, | ||
{0x000D, nullptr, "SetBottomScreenFlicker"}, | ||
{0x000F, nullptr, "GetRtcTime"}, | ||
{0x0010, nullptr, "GetMcuFwVerHigh"}, | ||
{0x0011, nullptr, "GetMcuFwVerLow"}, | ||
// clang-format on | ||
}; | ||
RegisterHandlers(functions); | ||
} | ||
|
||
} // namespace Service::MCU |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2024 Citra Emulator Project | ||
// Licensed under GPLv2 or any later version | ||
// Refer to the license.txt file included. | ||
|
||
#pragma once | ||
|
||
#include "core/hle/service/service.h" | ||
|
||
namespace Service::MCU { | ||
|
||
class HWC final : public ServiceFramework<HWC> { | ||
public: | ||
explicit HWC(); | ||
|
||
private: | ||
SERVICE_SERIALIZATION_SIMPLE | ||
}; | ||
|
||
} // namespace Service::MCU | ||
|
||
BOOST_CLASS_EXPORT_KEY(Service::MCU::HWC) |
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