summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Lioncash2019-01-29 21:47:25 -0500
committerGravatar Lioncash2019-01-29 22:50:26 -0500
commitc6c1c1b45f570c49cdb800d8093103e6a33eca1d (patch)
treed1c24b125684abd66dd2ef267ca0bd304db29352 /src/core
parentservice/btdrv: Update function tables (diff)
downloadyuzu-c6c1c1b45f570c49cdb800d8093103e6a33eca1d.tar.gz
yuzu-c6c1c1b45f570c49cdb800d8093103e6a33eca1d.tar.xz
yuzu-c6c1c1b45f570c49cdb800d8093103e6a33eca1d.zip
service/btm: Update function tables
Updates function tables based off information provided by SwitchBrew
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/btm/btm.cpp152
1 files changed, 97 insertions, 55 deletions
diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp
index ef7398a23..4f15c3f19 100644
--- a/src/core/hle/service/btm/btm.cpp
+++ b/src/core/hle/service/btm/btm.cpp
@@ -20,38 +20,38 @@ public:
20 explicit IBtmUserCore() : ServiceFramework{"IBtmUserCore"} { 20 explicit IBtmUserCore() : ServiceFramework{"IBtmUserCore"} {
21 // clang-format off 21 // clang-format off
22 static const FunctionInfo functions[] = { 22 static const FunctionInfo functions[] = {
23 {0, &IBtmUserCore::GetScanEvent, "GetScanEvent"}, 23 {0, &IBtmUserCore::AcquireBleScanEvent, "AcquireBleScanEvent"},
24 {1, nullptr, "Unknown1"}, 24 {1, nullptr, "GetBleScanFilterParameter"},
25 {2, nullptr, "Unknown2"}, 25 {2, nullptr, "GetBleScanFilterParameter2"},
26 {3, nullptr, "Unknown3"}, 26 {3, nullptr, "StartBleScanForGeneral"},
27 {4, nullptr, "Unknown4"}, 27 {4, nullptr, "StopBleScanForGeneral"},
28 {5, nullptr, "Unknown5"}, 28 {5, nullptr, "GetBleScanResultsForGeneral"},
29 {6, nullptr, "Unknown6"}, 29 {6, nullptr, "StartBleScanForPaired"},
30 {7, nullptr, "Unknown7"}, 30 {7, nullptr, "StopBleScanForPaired"},
31 {8, nullptr, "Unknown8"}, 31 {8, nullptr, "StartBleScanForSmartDevice"},
32 {9, nullptr, "Unknown9"}, 32 {9, nullptr, "StopBleScanForSmartDevice"},
33 {10, nullptr, "Unknown10"}, 33 {10, nullptr, "GetBleScanResultsForSmartDevice"},
34 {17, &IBtmUserCore::GetConnectionEvent, "GetConnectionEvent"}, 34 {17, &IBtmUserCore::AcquireBleConnectionEvent, "AcquireBleConnectionEvent"},
35 {18, nullptr, "Unknown18"}, 35 {18, nullptr, "BleConnect"},
36 {19, nullptr, "Unknown19"}, 36 {19, nullptr, "BleDisconnect"},
37 {20, nullptr, "Unknown20"}, 37 {20, nullptr, "BleGetConnectionState"},
38 {21, nullptr, "Unknown21"}, 38 {21, nullptr, "AcquireBlePairingEvent"},
39 {22, nullptr, "Unknown22"}, 39 {22, nullptr, "BlePairDevice"},
40 {23, nullptr, "Unknown23"}, 40 {23, nullptr, "BleUnPairDevice"},
41 {24, nullptr, "Unknown24"}, 41 {24, nullptr, "BleUnPairDevice2"},
42 {25, nullptr, "Unknown25"}, 42 {25, nullptr, "BleGetPairedDevices"},
43 {26, &IBtmUserCore::GetDiscoveryEvent, "AcquireBleServiceDiscoveryEventImpl"}, 43 {26, &IBtmUserCore::AcquireBleServiceDiscoveryEvent, "AcquireBleServiceDiscoveryEvent"},
44 {27, nullptr, "Unknown27"}, 44 {27, nullptr, "GetGattServices"},
45 {28, nullptr, "Unknown28"}, 45 {28, nullptr, "GetGattService"},
46 {29, nullptr, "Unknown29"}, 46 {29, nullptr, "GetGattIncludedServices"},
47 {30, nullptr, "Unknown30"}, 47 {30, nullptr, "GetBelongingGattService"},
48 {31, nullptr, "Unknown31"}, 48 {31, nullptr, "GetGattCharacteristics"},
49 {32, nullptr, "Unknown32"}, 49 {32, nullptr, "GetGattDescriptors"},
50 {33, &IBtmUserCore::GetConfigEvent, "GetConfigEvent"}, 50 {33, &IBtmUserCore::AcquireBleMtuConfigEvent, "AcquireBleMtuConfigEvent"},
51 {34, nullptr, "Unknown34"}, 51 {34, nullptr, "ConfigureBleMtu"},
52 {35, nullptr, "Unknown35"}, 52 {35, nullptr, "GetBleMtu"},
53 {36, nullptr, "Unknown36"}, 53 {36, nullptr, "RegisterBleGattDataPath"},
54 {37, nullptr, "Unknown37"}, 54 {37, nullptr, "UnregisterBleGattDataPath"},
55 }; 55 };
56 // clang-format on 56 // clang-format on
57 RegisterHandlers(functions); 57 RegisterHandlers(functions);
@@ -68,7 +68,7 @@ public:
68 } 68 }
69 69
70private: 70private:
71 void GetScanEvent(Kernel::HLERequestContext& ctx) { 71 void AcquireBleScanEvent(Kernel::HLERequestContext& ctx) {
72 LOG_WARNING(Service_BTM, "(STUBBED) called"); 72 LOG_WARNING(Service_BTM, "(STUBBED) called");
73 73
74 IPC::ResponseBuilder rb{ctx, 2, 1}; 74 IPC::ResponseBuilder rb{ctx, 2, 1};
@@ -76,7 +76,7 @@ private:
76 rb.PushCopyObjects(scan_event.readable); 76 rb.PushCopyObjects(scan_event.readable);
77 } 77 }
78 78
79 void GetConnectionEvent(Kernel::HLERequestContext& ctx) { 79 void AcquireBleConnectionEvent(Kernel::HLERequestContext& ctx) {
80 LOG_WARNING(Service_BTM, "(STUBBED) called"); 80 LOG_WARNING(Service_BTM, "(STUBBED) called");
81 81
82 IPC::ResponseBuilder rb{ctx, 2, 1}; 82 IPC::ResponseBuilder rb{ctx, 2, 1};
@@ -84,7 +84,7 @@ private:
84 rb.PushCopyObjects(connection_event.readable); 84 rb.PushCopyObjects(connection_event.readable);
85 } 85 }
86 86
87 void GetDiscoveryEvent(Kernel::HLERequestContext& ctx) { 87 void AcquireBleServiceDiscoveryEvent(Kernel::HLERequestContext& ctx) {
88 LOG_WARNING(Service_BTM, "(STUBBED) called"); 88 LOG_WARNING(Service_BTM, "(STUBBED) called");
89 89
90 IPC::ResponseBuilder rb{ctx, 2, 1}; 90 IPC::ResponseBuilder rb{ctx, 2, 1};
@@ -92,7 +92,7 @@ private:
92 rb.PushCopyObjects(service_discovery.readable); 92 rb.PushCopyObjects(service_discovery.readable);
93 } 93 }
94 94
95 void GetConfigEvent(Kernel::HLERequestContext& ctx) { 95 void AcquireBleMtuConfigEvent(Kernel::HLERequestContext& ctx) {
96 LOG_WARNING(Service_BTM, "(STUBBED) called"); 96 LOG_WARNING(Service_BTM, "(STUBBED) called");
97 97
98 IPC::ResponseBuilder rb{ctx, 2, 1}; 98 IPC::ResponseBuilder rb{ctx, 2, 1};
@@ -111,14 +111,14 @@ public:
111 explicit BTM_USR() : ServiceFramework{"btm:u"} { 111 explicit BTM_USR() : ServiceFramework{"btm:u"} {
112 // clang-format off 112 // clang-format off
113 static const FunctionInfo functions[] = { 113 static const FunctionInfo functions[] = {
114 {0, &BTM_USR::GetCoreImpl, "GetCoreImpl"}, 114 {0, &BTM_USR::GetCore, "GetCore"},
115 }; 115 };
116 // clang-format on 116 // clang-format on
117 RegisterHandlers(functions); 117 RegisterHandlers(functions);
118 } 118 }
119 119
120private: 120private:
121 void GetCoreImpl(Kernel::HLERequestContext& ctx) { 121 void GetCore(Kernel::HLERequestContext& ctx) {
122 LOG_DEBUG(Service_BTM, "called"); 122 LOG_DEBUG(Service_BTM, "called");
123 123
124 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 124 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
@@ -134,26 +134,64 @@ public:
134 static const FunctionInfo functions[] = { 134 static const FunctionInfo functions[] = {
135 {0, nullptr, "Unknown1"}, 135 {0, nullptr, "Unknown1"},
136 {1, nullptr, "Unknown2"}, 136 {1, nullptr, "Unknown2"},
137 {2, nullptr, "RegisterSystemEventForConnectedDeviceConditionImpl"}, 137 {2, nullptr, "RegisterSystemEventForConnectedDeviceCondition"},
138 {3, nullptr, "Unknown3"}, 138 {3, nullptr, "Unknown3"},
139 {4, nullptr, "Unknown4"}, 139 {4, nullptr, "Unknown4"},
140 {5, nullptr, "Unknown5"}, 140 {5, nullptr, "Unknown5"},
141 {6, nullptr, "Unknown6"}, 141 {6, nullptr, "Unknown6"},
142 {7, nullptr, "Unknown7"}, 142 {7, nullptr, "Unknown7"},
143 {8, nullptr, "RegisterSystemEventForRegisteredDeviceInfoImpl"}, 143 {8, nullptr, "RegisterSystemEventForRegisteredDeviceInfo"},
144 {9, nullptr, "Unknown8"}, 144 {9, nullptr, "Unknown8"},
145 {10, nullptr, "Unknown9"}, 145 {10, nullptr, "Unknown9"},
146 {11, nullptr, "Unknown10"}, 146 {11, nullptr, "Unknown10"},
147 {12, nullptr, "Unknown11"}, 147 {12, nullptr, "Unknown11"},
148 {13, nullptr, "Unknown12"}, 148 {13, nullptr, "Unknown12"},
149 {14, nullptr, "EnableRadioImpl"}, 149 {14, nullptr, "EnableRadio"},
150 {15, nullptr, "DisableRadioImpl"}, 150 {15, nullptr, "DisableRadio"},
151 {16, nullptr, "Unknown13"}, 151 {16, nullptr, "Unknown13"},
152 {17, nullptr, "Unknown14"}, 152 {17, nullptr, "Unknown14"},
153 {18, nullptr, "Unknown15"}, 153 {18, nullptr, "Unknown15"},
154 {19, nullptr, "Unknown16"}, 154 {19, nullptr, "Unknown16"},
155 {20, nullptr, "Unknown17"}, 155 {20, nullptr, "Unknown17"},
156 {21, nullptr, "Unknown18"}, 156 {21, nullptr, "Unknown18"},
157 {22, nullptr, "Unknown19"},
158 {23, nullptr, "Unknown20"},
159 {24, nullptr, "Unknown21"},
160 {25, nullptr, "Unknown22"},
161 {26, nullptr, "Unknown23"},
162 {27, nullptr, "Unknown24"},
163 {28, nullptr, "Unknown25"},
164 {29, nullptr, "Unknown26"},
165 {30, nullptr, "Unknown27"},
166 {31, nullptr, "Unknown28"},
167 {32, nullptr, "Unknown29"},
168 {33, nullptr, "Unknown30"},
169 {34, nullptr, "Unknown31"},
170 {35, nullptr, "Unknown32"},
171 {36, nullptr, "Unknown33"},
172 {37, nullptr, "Unknown34"},
173 {38, nullptr, "Unknown35"},
174 {39, nullptr, "Unknown36"},
175 {40, nullptr, "Unknown37"},
176 {41, nullptr, "Unknown38"},
177 {42, nullptr, "Unknown39"},
178 {43, nullptr, "Unknown40"},
179 {44, nullptr, "Unknown41"},
180 {45, nullptr, "Unknown42"},
181 {46, nullptr, "Unknown43"},
182 {47, nullptr, "Unknown44"},
183 {48, nullptr, "Unknown45"},
184 {49, nullptr, "Unknown46"},
185 {50, nullptr, "Unknown47"},
186 {51, nullptr, "Unknown48"},
187 {52, nullptr, "Unknown49"},
188 {53, nullptr, "Unknown50"},
189 {54, nullptr, "Unknown51"},
190 {55, nullptr, "Unknown52"},
191 {56, nullptr, "Unknown53"},
192 {57, nullptr, "Unknown54"},
193 {58, nullptr, "Unknown55"},
194 {59, nullptr, "Unknown56"},
157 }; 195 };
158 // clang-format on 196 // clang-format on
159 197
@@ -166,7 +204,7 @@ public:
166 explicit BTM_DBG() : ServiceFramework{"btm:dbg"} { 204 explicit BTM_DBG() : ServiceFramework{"btm:dbg"} {
167 // clang-format off 205 // clang-format off
168 static const FunctionInfo functions[] = { 206 static const FunctionInfo functions[] = {
169 {0, nullptr, "RegisterSystemEventForDiscoveryImpl"}, 207 {0, nullptr, "RegisterSystemEventForDiscovery"},
170 {1, nullptr, "Unknown1"}, 208 {1, nullptr, "Unknown1"},
171 {2, nullptr, "Unknown2"}, 209 {2, nullptr, "Unknown2"},
172 {3, nullptr, "Unknown3"}, 210 {3, nullptr, "Unknown3"},
@@ -175,6 +213,10 @@ public:
175 {6, nullptr, "Unknown6"}, 213 {6, nullptr, "Unknown6"},
176 {7, nullptr, "Unknown7"}, 214 {7, nullptr, "Unknown7"},
177 {8, nullptr, "Unknown8"}, 215 {8, nullptr, "Unknown8"},
216 {9, nullptr, "Unknown9"},
217 {10, nullptr, "Unknown10"},
218 {11, nullptr, "Unknown11"},
219 {12, nullptr, "Unknown11"},
178 }; 220 };
179 // clang-format on 221 // clang-format on
180 222
@@ -187,16 +229,16 @@ public:
187 explicit IBtmSystemCore() : ServiceFramework{"IBtmSystemCore"} { 229 explicit IBtmSystemCore() : ServiceFramework{"IBtmSystemCore"} {
188 // clang-format off 230 // clang-format off
189 static const FunctionInfo functions[] = { 231 static const FunctionInfo functions[] = {
190 {0, nullptr, "StartGamepadPairingImpl"}, 232 {0, nullptr, "StartGamepadPairing"},
191 {1, nullptr, "CancelGamepadPairingImpl"}, 233 {1, nullptr, "CancelGamepadPairing"},
192 {2, nullptr, "ClearGamepadPairingDatabaseImpl"}, 234 {2, nullptr, "ClearGamepadPairingDatabase"},
193 {3, nullptr, "GetPairedGamepadCountImpl"}, 235 {3, nullptr, "GetPairedGamepadCount"},
194 {4, nullptr, "EnableRadioImpl"}, 236 {4, nullptr, "EnableRadio"},
195 {5, nullptr, "DisableRadioImpl"}, 237 {5, nullptr, "DisableRadio"},
196 {6, nullptr, "GetRadioOnOffImpl"}, 238 {6, nullptr, "GetRadioOnOff"},
197 {7, nullptr, "AcquireRadioEventImpl"}, 239 {7, nullptr, "AcquireRadioEvent"},
198 {8, nullptr, "AcquireGamepadPairingEventImpl"}, 240 {8, nullptr, "AcquireGamepadPairingEvent"},
199 {9, nullptr, "IsGamepadPairingStartedImpl"}, 241 {9, nullptr, "IsGamepadPairingStarted"},
200 }; 242 };
201 // clang-format on 243 // clang-format on
202 244
@@ -209,7 +251,7 @@ public:
209 explicit BTM_SYS() : ServiceFramework{"btm:sys"} { 251 explicit BTM_SYS() : ServiceFramework{"btm:sys"} {
210 // clang-format off 252 // clang-format off
211 static const FunctionInfo functions[] = { 253 static const FunctionInfo functions[] = {
212 {0, &BTM_SYS::GetCoreImpl, "GetCoreImpl"}, 254 {0, &BTM_SYS::GetCore, "GetCore"},
213 }; 255 };
214 // clang-format on 256 // clang-format on
215 257
@@ -217,7 +259,7 @@ public:
217 } 259 }
218 260
219private: 261private:
220 void GetCoreImpl(Kernel::HLERequestContext& ctx) { 262 void GetCore(Kernel::HLERequestContext& ctx) {
221 LOG_DEBUG(Service_BTM, "called"); 263 LOG_DEBUG(Service_BTM, "called");
222 264
223 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 265 IPC::ResponseBuilder rb{ctx, 2, 0, 1};