diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/hle/service/btdrv/btdrv.cpp | 72 | ||||
| -rw-r--r-- | src/core/hle/service/btdrv/btdrv.h | 16 | ||||
| -rw-r--r-- | src/core/hle/service/service.cpp | 4 |
4 files changed, 93 insertions, 1 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index e44ae05c3..525ba39bc 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -136,6 +136,8 @@ add_library(core STATIC | |||
| 136 | hle/service/bcat/bcat.h | 136 | hle/service/bcat/bcat.h |
| 137 | hle/service/bcat/module.cpp | 137 | hle/service/bcat/module.cpp |
| 138 | hle/service/bcat/module.h | 138 | hle/service/bcat/module.h |
| 139 | hle/service/btdrv/btdrv.cpp | ||
| 140 | hle/service/btdrv/btdrv.h | ||
| 139 | hle/service/erpt/erpt.cpp | 141 | hle/service/erpt/erpt.cpp |
| 140 | hle/service/erpt/erpt.h | 142 | hle/service/erpt/erpt.h |
| 141 | hle/service/es/es.cpp | 143 | 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 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/hle/service/btdrv/btdrv.h" | ||
| 6 | #include "core/hle/service/service.h" | ||
| 7 | #include "core/hle/service/sm/sm.h" | ||
| 8 | |||
| 9 | namespace Service::BtDrv { | ||
| 10 | |||
| 11 | class BtDrv final : public ServiceFramework<BtDrv> { | ||
| 12 | public: | ||
| 13 | explicit BtDrv() : ServiceFramework{"btdrv"} { | ||
| 14 | // clang-format off | ||
| 15 | static const FunctionInfo functions[] = { | ||
| 16 | {0, nullptr, "Unknown"}, | ||
| 17 | {1, nullptr, "Init"}, | ||
| 18 | {2, nullptr, "Enable"}, | ||
| 19 | {3, nullptr, "Disable"}, | ||
| 20 | {4, nullptr, "CleanupAndShutdown"}, | ||
| 21 | {5, nullptr, "GetAdapterProperties"}, | ||
| 22 | {6, nullptr, "GetAdapterProperty"}, | ||
| 23 | {7, nullptr, "SetAdapterProperty"}, | ||
| 24 | {8, nullptr, "StartDiscovery"}, | ||
| 25 | {9, nullptr, "CancelDiscovery"}, | ||
| 26 | {10, nullptr, "CreateBond"}, | ||
| 27 | {11, nullptr, "RemoveBond"}, | ||
| 28 | {12, nullptr, "CancelBond"}, | ||
| 29 | {13, nullptr, "PinReply"}, | ||
| 30 | {14, nullptr, "SspReply"}, | ||
| 31 | {15, nullptr, "Unknown2"}, | ||
| 32 | {16, nullptr, "InitInterfaces"}, | ||
| 33 | {17, nullptr, "HidHostInterface_Connect"}, | ||
| 34 | {18, nullptr, "HidHostInterface_Disconnect"}, | ||
| 35 | {19, nullptr, "HidHostInterface_SendData"}, | ||
| 36 | {20, nullptr, "HidHostInterface_SendData2"}, | ||
| 37 | {21, nullptr, "HidHostInterface_SetReport"}, | ||
| 38 | {22, nullptr, "HidHostInterface_GetReport"}, | ||
| 39 | {23, nullptr, "HidHostInterface_WakeController"}, | ||
| 40 | {24, nullptr, "HidHostInterface_AddPairedDevice"}, | ||
| 41 | {25, nullptr, "HidHostInterface_GetPairedDevice"}, | ||
| 42 | {26, nullptr, "HidHostInterface_CleanupAndShutdown"}, | ||
| 43 | {27, nullptr, "Unknown3"}, | ||
| 44 | {28, nullptr, "ExtInterface_SetTSI"}, | ||
| 45 | {29, nullptr, "ExtInterface_SetBurstMode"}, | ||
| 46 | {30, nullptr, "ExtInterface_SetZeroRetran"}, | ||
| 47 | {31, nullptr, "ExtInterface_SetMcMode"}, | ||
| 48 | {32, nullptr, "ExtInterface_StartLlrMode"}, | ||
| 49 | {33, nullptr, "ExtInterface_ExitLlrMode"}, | ||
| 50 | {34, nullptr, "ExtInterface_SetRadio"}, | ||
| 51 | {35, nullptr, "ExtInterface_SetVisibility"}, | ||
| 52 | {36, nullptr, "Unknown4"}, | ||
| 53 | {37, nullptr, "Unknown5"}, | ||
| 54 | {38, nullptr, "HidHostInterface_GetLatestPlr"}, | ||
| 55 | {39, nullptr, "ExtInterface_GetPendingConnections"}, | ||
| 56 | {40, nullptr, "HidHostInterface_GetChannelMap"}, | ||
| 57 | {41, nullptr, "SetIsBluetoothBoostEnabled"}, | ||
| 58 | {42, nullptr, "GetIsBluetoothBoostEnabled"}, | ||
| 59 | {43, nullptr, "SetIsBluetoothAfhEnabled"}, | ||
| 60 | {44, nullptr, "GetIsBluetoothAfhEnabled"}, | ||
| 61 | }; | ||
| 62 | // clang-format on | ||
| 63 | |||
| 64 | RegisterHandlers(functions); | ||
| 65 | } | ||
| 66 | }; | ||
| 67 | |||
| 68 | void InstallInterfaces(SM::ServiceManager& sm) { | ||
| 69 | std::make_shared<BtDrv>()->InstallAsService(sm); | ||
| 70 | } | ||
| 71 | |||
| 72 | } // 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 @@ | |||
| 1 | // Copyright 2018 yuzu emulator team | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::BtDrv { | ||
| 12 | |||
| 13 | /// Registers all BtDrv services with the specified service manager. | ||
| 14 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 15 | |||
| 16 | } // namespace Service::BtDrv | ||
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index eb3db1b4d..d2c05cc92 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include "core/hle/service/apm/apm.h" | 21 | #include "core/hle/service/apm/apm.h" |
| 22 | #include "core/hle/service/audio/audio.h" | 22 | #include "core/hle/service/audio/audio.h" |
| 23 | #include "core/hle/service/bcat/bcat.h" | 23 | #include "core/hle/service/bcat/bcat.h" |
| 24 | #include "core/hle/service/btdrv/btdrv.h" | ||
| 24 | #include "core/hle/service/erpt/erpt.h" | 25 | #include "core/hle/service/erpt/erpt.h" |
| 25 | #include "core/hle/service/es/es.h" | 26 | #include "core/hle/service/es/es.h" |
| 26 | #include "core/hle/service/eupld/eupld.h" | 27 | #include "core/hle/service/eupld/eupld.h" |
| @@ -194,8 +195,9 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) { | |||
| 194 | AM::InstallInterfaces(*sm, nv_flinger); | 195 | AM::InstallInterfaces(*sm, nv_flinger); |
| 195 | AOC::InstallInterfaces(*sm); | 196 | AOC::InstallInterfaces(*sm); |
| 196 | APM::InstallInterfaces(*sm); | 197 | APM::InstallInterfaces(*sm); |
| 197 | BCAT::InstallInterfaces(*sm); | ||
| 198 | Audio::InstallInterfaces(*sm); | 198 | Audio::InstallInterfaces(*sm); |
| 199 | BCAT::InstallInterfaces(*sm); | ||
| 200 | BtDrv::InstallInterfaces(*sm); | ||
| 199 | ERPT::InstallInterfaces(*sm); | 201 | ERPT::InstallInterfaces(*sm); |
| 200 | ES::InstallInterfaces(*sm); | 202 | ES::InstallInterfaces(*sm); |
| 201 | EUPLD::InstallInterfaces(*sm); | 203 | EUPLD::InstallInterfaces(*sm); |