summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-27 00:00:50 +0200
committerLioncash <mathew1800@gmail.com>2018-07-27 00:06:17 +0200
commitf49248437e2ae65f5f55dd152ac22278682227a9 (patch)
treea4bee9346a4e2a4b8f336f919c3bec68ed8c16e2
parentMerge pull request #836 from FearlessTobi/port-3594 (diff)
downloadyuzu-f49248437e2ae65f5f55dd152ac22278682227a9.tar
yuzu-f49248437e2ae65f5f55dd152ac22278682227a9.tar.gz
yuzu-f49248437e2ae65f5f55dd152ac22278682227a9.tar.bz2
yuzu-f49248437e2ae65f5f55dd152ac22278682227a9.tar.lz
yuzu-f49248437e2ae65f5f55dd152ac22278682227a9.tar.xz
yuzu-f49248437e2ae65f5f55dd152ac22278682227a9.tar.zst
yuzu-f49248437e2ae65f5f55dd152ac22278682227a9.zip
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/btdrv/btdrv.cpp72
-rw-r--r--src/core/hle/service/btdrv/btdrv.h16
-rw-r--r--src/core/hle/service/service.cpp4
4 files changed, 93 insertions, 1 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 063e18d64..aeae7ac51 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -136,6 +136,8 @@ add_library(core STATIC
hle/service/bcat/bcat.h
hle/service/bcat/module.cpp
hle/service/bcat/module.h
+ hle/service/btdrv/btdrv.cpp
+ hle/service/btdrv/btdrv.h
hle/service/erpt/erpt.cpp
hle/service/erpt/erpt.h
hle/service/es/es.cpp
diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp
new file mode 100644
index 000000000..d0a15cc4c
--- /dev/null
+++ b/src/core/hle/service/btdrv/btdrv.cpp
@@ -0,0 +1,72 @@
+// Copyright 2018 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include "core/hle/service/btdrv/btdrv.h"
+#include "core/hle/service/service.h"
+#include "core/hle/service/sm/sm.h"
+
+namespace Service::BtDrv {
+
+class BtDrv final : public ServiceFramework<BtDrv> {
+public:
+ explicit BtDrv() : ServiceFramework{"btdrv"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "Unknown"},
+ {1, nullptr, "Init"},
+ {2, nullptr, "Enable"},
+ {3, nullptr, "Disable"},
+ {4, nullptr, "CleanupAndShutdown"},
+ {5, nullptr, "GetAdapterProperties"},
+ {6, nullptr, "GetAdapterProperty"},
+ {7, nullptr, "SetAdapterProperty"},
+ {8, nullptr, "StartDiscovery"},
+ {9, nullptr, "CancelDiscovery"},
+ {10, nullptr, "CreateBond"},
+ {11, nullptr, "RemoveBond"},
+ {12, nullptr, "CancelBond"},
+ {13, nullptr, "PinReply"},
+ {14, nullptr, "SspReply"},
+ {15, nullptr, "Unknown2"},
+ {16, nullptr, "InitInterfaces"},
+ {17, nullptr, "HidHostInterface_Connect"},
+ {18, nullptr, "HidHostInterface_Disconnect"},
+ {19, nullptr, "HidHostInterface_SendData"},
+ {20, nullptr, "HidHostInterface_SendData2"},
+ {21, nullptr, "HidHostInterface_SetReport"},
+ {22, nullptr, "HidHostInterface_GetReport"},
+ {23, nullptr, "HidHostInterface_WakeController"},
+ {24, nullptr, "HidHostInterface_AddPairedDevice"},
+ {25, nullptr, "HidHostInterface_GetPairedDevice"},
+ {26, nullptr, "HidHostInterface_CleanupAndShutdown"},
+ {27, nullptr, "Unknown3"},
+ {28, nullptr, "ExtInterface_SetTSI"},
+ {29, nullptr, "ExtInterface_SetBurstMode"},
+ {30, nullptr, "ExtInterface_SetZeroRetran"},
+ {31, nullptr, "ExtInterface_SetMcMode"},
+ {32, nullptr, "ExtInterface_StartLlrMode"},
+ {33, nullptr, "ExtInterface_ExitLlrMode"},
+ {34, nullptr, "ExtInterface_SetRadio"},
+ {35, nullptr, "ExtInterface_SetVisibility"},
+ {36, nullptr, "Unknown4"},
+ {37, nullptr, "Unknown5"},
+ {38, nullptr, "HidHostInterface_GetLatestPlr"},
+ {39, nullptr, "ExtInterface_GetPendingConnections"},
+ {40, nullptr, "HidHostInterface_GetChannelMap"},
+ {41, nullptr, "SetIsBluetoothBoostEnabled"},
+ {42, nullptr, "GetIsBluetoothBoostEnabled"},
+ {43, nullptr, "SetIsBluetoothAfhEnabled"},
+ {44, nullptr, "GetIsBluetoothAfhEnabled"},
+ };
+ // clang-format on
+
+ RegisterHandlers(functions);
+ }
+};
+
+void InstallInterfaces(SM::ServiceManager& sm) {
+ std::make_shared<BtDrv>()->InstallAsService(sm);
+}
+
+} // namespace Service::BtDrv
diff --git a/src/core/hle/service/btdrv/btdrv.h b/src/core/hle/service/btdrv/btdrv.h
new file mode 100644
index 000000000..164e56f43
--- /dev/null
+++ b/src/core/hle/service/btdrv/btdrv.h
@@ -0,0 +1,16 @@
+// 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::BtDrv {
+
+/// Registers all BtDrv services with the specified service manager.
+void InstallInterfaces(SM::ServiceManager& sm);
+
+} // namespace Service::BtDrv
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 8b84fd349..1654db231 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -21,6 +21,7 @@
#include "core/hle/service/apm/apm.h"
#include "core/hle/service/audio/audio.h"
#include "core/hle/service/bcat/bcat.h"
+#include "core/hle/service/btdrv/btdrv.h"
#include "core/hle/service/erpt/erpt.h"
#include "core/hle/service/es/es.h"
#include "core/hle/service/eupld/eupld.h"
@@ -193,8 +194,9 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
AM::InstallInterfaces(*sm, nv_flinger);
AOC::InstallInterfaces(*sm);
APM::InstallInterfaces(*sm);
- BCAT::InstallInterfaces(*sm);
Audio::InstallInterfaces(*sm);
+ BCAT::InstallInterfaces(*sm);
+ BtDrv::InstallInterfaces(*sm);
ERPT::InstallInterfaces(*sm);
ES::InstallInterfaces(*sm);
EUPLD::InstallInterfaces(*sm);