summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/bpc
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-01 21:40:55 +0200
committerLioncash <mathew1800@gmail.com>2018-08-01 22:13:04 +0200
commitd109279543c36d20b98ceabdd921e6a9a0015782 (patch)
tree24c4b73abf24a6106ce1f2a86da77f41736b6624 /src/core/hle/service/bpc
parentMerge pull request #885 from greggameplayer/R32-Float (diff)
downloadyuzu-d109279543c36d20b98ceabdd921e6a9a0015782.tar
yuzu-d109279543c36d20b98ceabdd921e6a9a0015782.tar.gz
yuzu-d109279543c36d20b98ceabdd921e6a9a0015782.tar.bz2
yuzu-d109279543c36d20b98ceabdd921e6a9a0015782.tar.lz
yuzu-d109279543c36d20b98ceabdd921e6a9a0015782.tar.xz
yuzu-d109279543c36d20b98ceabdd921e6a9a0015782.tar.zst
yuzu-d109279543c36d20b98ceabdd921e6a9a0015782.zip
Diffstat (limited to 'src/core/hle/service/bpc')
-rw-r--r--src/core/hle/service/bpc/bpc.cpp57
-rw-r--r--src/core/hle/service/bpc/bpc.h15
2 files changed, 72 insertions, 0 deletions
diff --git a/src/core/hle/service/bpc/bpc.cpp b/src/core/hle/service/bpc/bpc.cpp
new file mode 100644
index 000000000..1c1ecdb60
--- /dev/null
+++ b/src/core/hle/service/bpc/bpc.cpp
@@ -0,0 +1,57 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include <memory>
+
+#include "core/hle/service/bpc/bpc.h"
+#include "core/hle/service/service.h"
+#include "core/hle/service/sm/sm.h"
+
+namespace Service::BPC {
+
+class BPC final : public ServiceFramework<BPC> {
+public:
+ explicit BPC() : ServiceFramework{"bpc"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "ShutdownSystem"},
+ {1, nullptr, "RebootSystem"},
+ {2, nullptr, "GetWakeupReason"},
+ {3, nullptr, "GetShutdownReason"},
+ {4, nullptr, "GetAcOk"},
+ {5, nullptr, "GetBoardPowerControlEvent"},
+ {6, nullptr, "GetSleepButtonState"},
+ {7, nullptr, "GetPowerEvent"},
+ {8, nullptr, "Unknown1"},
+ {9, nullptr, "Unknown2"},
+ {10, nullptr, "Unknown3"},
+ };
+ // clang-format on
+
+ RegisterHandlers(functions);
+ }
+};
+
+class BPC_R final : public ServiceFramework<BPC_R> {
+public:
+ explicit BPC_R() : ServiceFramework{"bpc:r"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "GetExternalRtcValue"},
+ {1, nullptr, "SetExternalRtcValue"},
+ {2, nullptr, "ReadExternalRtcResetFlag"},
+ {3, nullptr, "ClearExternalRtcResetFlag"},
+ };
+ // clang-format on
+
+ RegisterHandlers(functions);
+ }
+};
+
+void InstallInterfaces(SM::ServiceManager& sm) {
+ std::make_shared<BPC>()->InstallAsService(sm);
+ std::make_shared<BPC_R>()->InstallAsService(sm);
+}
+
+} // namespace Service::BPC
diff --git a/src/core/hle/service/bpc/bpc.h b/src/core/hle/service/bpc/bpc.h
new file mode 100644
index 000000000..eaa37be8d
--- /dev/null
+++ b/src/core/hle/service/bpc/bpc.h
@@ -0,0 +1,15 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+namespace Service::SM {
+class ServiceManager;
+}
+
+namespace Service::BPC {
+
+void InstallInterfaces(SM::ServiceManager& sm);
+
+} // namespace Service::BPC