libnx  v4.2.0
btdrv_types.h
Go to the documentation of this file.
1 /**
2  * @file btdrv_types.h
3  * @brief Bluetooth driver (btdrv) service types (see btdrv.h for the rest).
4  * @author yellows8, ndeadly
5  * @copyright libnx Authors
6  */
7 #pragma once
8 #include "../types.h"
9 
10 /// BluetoothPropertyType [1.0.0-11.0.1]
11 typedef enum {
12  BtdrvBluetoothPropertyType_Name = 1, ///< Name. String, max length 0xF8 excluding NUL-terminator.
13  BtdrvBluetoothPropertyType_Address = 2, ///< \ref BtdrvAddress
14  BtdrvBluetoothPropertyType_Unknown3 = 3, ///< Only available with \ref btdrvSetAdapterProperty. Unknown, \ref BtdrvAddress.
15  BtdrvBluetoothPropertyType_ClassOfDevice = 5, ///< 3-bytes, Class of Device.
16  BtdrvBluetoothPropertyType_FeatureSet = 6, ///< 1-byte, FeatureSet. The default is value 0x68.
18 
19 /// AdapterPropertyType [12.0.0+]
20 typedef enum {
21  BtdrvAdapterPropertyType_Address = 0, ///< \ref BtdrvAddress
22  BtdrvAdapterPropertyType_Name = 1, ///< Name. String, max length 0xF8 excluding NUL-terminator.
23  BtdrvAdapterPropertyType_ClassOfDevice = 2, ///< 3-bytes, Class of Device.
24  BtdrvAdapterPropertyType_Unknown3 = 3, ///< Only available with \ref btdrvSetAdapterProperty. Unknown, \ref BtdrvAddress.
26 
27 /// EventType
28 typedef enum {
29  ///< BtdrvEventType_* should be used on [12.0.0+]
30  BtdrvEventType_InquiryDevice = 0, ///< Device found during Inquiry.
31  BtdrvEventType_InquiryStatus = 1, ///< Inquiry status changed.
32  BtdrvEventType_PairingPinCodeRequest = 2, ///< Pairing PIN code request.
33  BtdrvEventType_SspRequest = 3, ///< SSP confirm request / SSP passkey notification.
34  BtdrvEventType_Connection = 4, ///< Connection
35  BtdrvEventType_Tsi = 5, ///< SetTsi (\ref btdrvSetTsi)
36  BtdrvEventType_BurstMode = 6, ///< SetBurstMode (\ref btdrvEnableBurstMode)
37  BtdrvEventType_SetZeroRetransmission = 7, ///< \ref btdrvSetZeroRetransmission
38  BtdrvEventType_PendingConnections = 8, ///< \ref btdrvGetPendingConnections
39  BtdrvEventType_MoveToSecondaryPiconet = 9, ///< \ref btdrvMoveToSecondaryPiconet
40  BtdrvEventType_BluetoothCrash = 10, ///< BluetoothCrash
41 
42  ///< BtdrvEventTypeOld_* should be used on [1.0.0-11.0.1]
43  BtdrvEventTypeOld_Unknown0 = 0, ///< Unused
44  BtdrvEventTypeOld_InquiryDevice = 3, ///< Device found during Inquiry.
45  BtdrvEventTypeOld_InquiryStatus = 4, ///< Inquiry status changed.
46  BtdrvEventTypeOld_PairingPinCodeRequest = 5, ///< Pairing PIN code request.
47  BtdrvEventTypeOld_SspRequest = 6, ///< SSP confirm request / SSP passkey notification.
48  BtdrvEventTypeOld_Connection = 7, ///< Connection
49  BtdrvEventTypeOld_BluetoothCrash = 13, ///< BluetoothCrash
51 
52 /// BtdrvInquiryStatus
53 typedef enum {
54  BtdrvInquiryStatus_Stopped = 0, ///< Inquiry stopped.
55  BtdrvInquiryStatus_Started = 1, ///< Inquiry started.
57 
58 /// ConnectionEventType
59 typedef enum {
60  BtdrvConnectionEventType_Status = 0, ///< BtdrvEventInfo::connection::status
61  BtdrvConnectionEventType_SspConfirmRequest = 1, ///< SSP confirm request.
62  BtdrvConnectionEventType_Suspended = 2, ///< ACL Link is now Suspended.
64 
65 /// ExtEventType [1.0.0-11.0.1]
66 typedef enum {
67  BtdrvExtEventType_SetTsi = 0, ///< SetTsi (\ref btdrvSetTsi)
68  BtdrvExtEventType_ExitTsi = 1, ///< ExitTsi (\ref btdrvSetTsi)
69  BtdrvExtEventType_SetBurstMode = 2, ///< SetBurstMode (\ref btdrvEnableBurstMode)
70  BtdrvExtEventType_ExitBurstMode = 3, ///< ExitBurstMode (\ref btdrvEnableBurstMode)
71  BtdrvExtEventType_SetZeroRetransmission = 4, ///< \ref btdrvSetZeroRetransmission
72  BtdrvExtEventType_PendingConnections = 5, ///< \ref btdrvGetPendingConnections
73  BtdrvExtEventType_MoveToSecondaryPiconet = 6, ///< \ref btdrvMoveToSecondaryPiconet
75 
76 /// BluetoothHhReportType
77 /// Bit0-1 directly control the HID bluetooth transaction report-type value.
78 /// Bit2-3: these directly control the Parameter Reserved field for SetReport, for GetReport these control the Parameter Reserved and Size bits.
79 typedef enum {
85 
86 /// HidEventType
87 typedef enum {
88  ///< BtdrvHidEventType_* should be used on [12.0.0+]
89  BtdrvHidEventType_Connection = 0, ///< Connection. Only used with \ref btdrvGetHidEventInfo.
90  BtdrvHidEventType_Data = 1, ///< DATA report on the Interrupt channel.
91  BtdrvHidEventType_SetReport = 2, ///< Response to SET_REPORT.
92  BtdrvHidEventType_GetReport = 3, ///< Response to GET_REPORT.
93 
94  ///< BtdrvHidEventTypeOld_* should be used on [1.0.0-11.0.1]
95  BtdrvHidEventTypeOld_Connection = 0, ///< Connection. Only used with \ref btdrvGetHidEventInfo.
96  BtdrvHidEventTypeOld_Data = 4, ///< DATA report on the Interrupt channel.
97  BtdrvHidEventTypeOld_Ext = 7, ///< Response for extensions. Only used with \ref btdrvGetHidEventInfo.
98  BtdrvHidEventTypeOld_SetReport = 8, ///< Response to SET_REPORT.
99  BtdrvHidEventTypeOld_GetReport = 9, ///< Response to GET_REPORT.
101 
102 /// HidConnectionStatus [12.0.0+]
103 typedef enum {
104  ///< BtdrvHidConnectionStatus_* should be used on [12.0.0+]
106  BtdrvHidConnectionStatus_Opened = 1,
108 
109  ///< BtdrvHidConnectionStatusOld_* should be used on [1.0.0-11.0.1]
110  BtdrvHidConnectionStatusOld_Opened = 0,
111  BtdrvHidConnectionStatusOld_Closed = 2,
112  BtdrvHidConnectionStatusOld_Failed = 8,
114 
115 /// This determines the u16 data to write into a CircularBuffer.
116 typedef enum {
117  BtdrvFatalReason_Invalid = 0, ///< Only for \ref BtdrvEventInfo: invalid.
118  BtdrvFatalReason_Unknown1 = 1, ///< Can only be triggered by \ref btdrvEmulateBluetoothCrash, not triggered by the sysmodule otherwise.
119  BtdrvFatalReason_CommandTimeout = 2, ///< HCI command timeout.
120  BtdrvFatalReason_HardwareError = 3, ///< HCI event HCI_Hardware_Error occurred.
121  BtdrvFatalReason_Enable = 7, ///< Only for \ref BtdrvEventInfo: triggered after enabling bluetooth, depending on the value of a global state field.
122  BtdrvFatalReason_Audio = 9, ///< [12.0.0+] Only for \ref BtdrvEventInfo: triggered by Audio cmds in some cases.
124 
125 /// BleEventType
126 typedef enum {
127  BtdrvBleEventType_Unknown0 = 0, ///< Unknown.
128  BtdrvBleEventType_Unknown1 = 1, ///< Unknown.
129  BtdrvBleEventType_Unknown2 = 2, ///< Unknown.
130  BtdrvBleEventType_Unknown3 = 3, ///< Unknown.
131  BtdrvBleEventType_Unknown4 = 4, ///< Unknown.
132  BtdrvBleEventType_Unknown5 = 5, ///< Unknown.
133  BtdrvBleEventType_Unknown6 = 6, ///< Unknown.
134  BtdrvBleEventType_Unknown7 = 7, ///< Unknown.
135  BtdrvBleEventType_Unknown8 = 8, ///< Unknown.
136  BtdrvBleEventType_Unknown9 = 9, ///< Unknown.
137  BtdrvBleEventType_Unknown10 = 10, ///< Unknown.
138  BtdrvBleEventType_Unknown11 = 11, ///< Unknown.
139  BtdrvBleEventType_Unknown12 = 12, ///< Unknown.
140  BtdrvBleEventType_Unknown13 = 13, ///< Unknown.
142 
143 /// AudioEventType
144 typedef enum {
146  BtdrvAudioEventType_Connection = 1, ///< Connection
148 
149 /// AudioOutState
150 typedef enum {
151  BtdrvAudioOutState_Stopped = 0, ///< Stopped
152  BtdrvAudioOutState_Started = 1, ///< Started
154 
155 /// AudioCodec
156 typedef enum {
157  BtdrvAudioCodec_Pcm = 0, ///< Raw PCM
159 
160 /// Address
161 typedef struct {
162  u8 address[0x6]; ///< Address
163 } BtdrvAddress;
164 
165 /// ClassOfDevice
166 typedef struct {
167  u8 class_of_device[0x3]; ///< ClassOfDevice
169 
170 /// AdapterProperty [1.0.0-11.0.1]
171 typedef struct {
172  BtdrvAddress addr; ///< Same as the data for ::BtdrvBluetoothPropertyType_Address.
173  BtdrvClassOfDevice class_of_device; ///< Same as the data for ::BtdrvBluetoothPropertyType_ClassOfDevice.
174  char name[0xF9]; ///< Same as the data for ::BtdrvBluetoothPropertyType_Name (last byte is not initialized).
175  u8 feature_set; ///< Set to hard-coded value 0x68 (same as the data for ::BtdrvBluetoothPropertyType_FeatureSet).
177 
178 /// AdapterProperty [12.0.0+]
179 typedef struct {
180  u8 type; ///< \ref BtdrvAdapterPropertyType
181  u8 size; ///< Data size.
182  u8 data[0x100]; ///< Data (above size), as specified by the type.
184 
185 /// AdapterPropertySet [12.0.0+]
186 typedef struct {
187  BtdrvAddress addr; ///< Same as the data for ::BtdrvBluetoothPropertyType_Address.
188  BtdrvClassOfDevice class_of_device; ///< Same as the data for ::BtdrvBluetoothPropertyType_ClassOfDevice.
189  char name[0xF9]; ///< Same as the data for ::BtdrvBluetoothPropertyType_Name.
191 
192 /// BluetoothPinCode [1.0.0-11.0.1]
193 typedef struct {
194  char code[0x10]; ///< PinCode
196 
197 /// BtdrvPinCode [12.0.0+]
198 typedef struct {
199  char code[0x10]; ///< PinCode
200  u8 length; ///< Length
201 } BtdrvPinCode;
202 
203 /// HidData [1.0.0-8.1.1]
204 typedef struct {
205  u16 size; ///< Size of data.
206  u8 data[0x280]; ///< Data
207 } BtdrvHidData;
208 
209 /// HidReport [9.0.0+].
210 typedef struct {
211  u16 size; ///< Size of data.
212  u8 data[0x2BC]; ///< Data
214 
215 /// PlrStatistics
216 typedef struct {
217  u8 unk_x0[0x84]; ///< Unknown
219 
220 /// PlrList
221 typedef struct {
222  u8 unk_x0[0xA4]; ///< Unknown
223 } BtdrvPlrList;
224 
225 /// ChannelMapList
226 typedef struct {
227  u8 unk_x0[0x88]; ///< Unknown
229 
230 /// LeConnectionParams
231 typedef struct {
232  u8 unk_x0[0x14]; ///< Unknown
234 
235 /// BleConnectionParameter
236 typedef struct {
237  u8 unk_x0[0xC]; ///< Unknown
239 
240 /// BtdrvBleAdvertisePacketDataEntry
241 typedef struct {
242  u16 unk_x0; ///< Unknown
243  u8 unused[0x12]; ///< Unused
245 
246 /// BleAdvertisePacketData
247 typedef struct {
248  u32 unk_x0; ///< Unknown
249  u8 unk_x4; ///< Unknown
250  u8 size0; ///< Size of the data at unk_x6.
251  u8 unk_x6[0x1F]; ///< Unknown, see size0.
252  u8 pad[3]; ///< Padding
253  u8 count; ///< Total array entries, see entries.
254  u8 pad2[7]; ///< Padding
255  BtdrvBleAdvertisePacketDataEntry entries[0x5]; ///< \ref BtdrvBleAdvertisePacketDataEntry
256  u8 pad3[0x10]; ///< Padding
257  u8 size2; ///< Size of the data at unk_xA8.
258  u8 unk_xA5; ///< Unknown
259  u8 pad4[2]; ///< Padding
260  u8 unk_xA8[0x1F]; ///< Unknown, see size2.
261  u8 unk_xC7; ///< Unknown
262  u8 unk_xC8; ///< Unknown
263  u8 pad5[3]; ///< Padding
265 
266 typedef struct {
267  u8 length;
268  u8 type;
269  u8 value[0x1d];
271 
272 /// BleAdvertiseFilter
273 typedef struct {
274  u8 unk_x0[0x3E]; ///< Unknown
276 
277 /// BleAdvertisePacketParameter
278 typedef struct {
279  u8 data[0x8]; ///< Unknown
281 
282 /// BleScanResult
283 typedef struct {
284  u8 unk_x0; ///< Unknown
285  BtdrvAddress addr; ///< \ref BtdrvAddress
286  u8 unk_x7[0x139]; ///< Unknown
287  s32 unk_x140; ///< Unknown
288  s32 unk_x144; ///< Unknown
290 
291 /// BleConnectionInfo
292 typedef struct {
293  u32 connection_handle; ///< ConnectionHandle, 0xFFFFFFFF ([5.0.0-5.0.2] 0xFFFF) is invalid.
294  BtdrvAddress addr; ///< \ref BtdrvAddress
295  u8 pad[2]; ///< Padding
297 
298 /// GattAttributeUuid
299 typedef struct {
300  u32 size; ///< UUID size, must be 0x2, 0x4, or 0x10.
301  u8 uuid[0x10]; ///< UUID with the above size.
303 
304 /// GattId
305 typedef struct {
306  u8 instance_id; ///< InstanceId
307  u8 pad[3]; ///< Padding
308  BtdrvGattAttributeUuid uuid; ///< \ref BtdrvGattAttributeUuid
309 } BtdrvGattId;
310 
311 /// LeEventInfo
312 typedef struct {
313  u32 unk_x0; ///< Unknown
314  u32 unk_x4; ///< Unknown
315  u8 unk_x8; ///< Unknown
316  u8 pad[3]; ///< Padding
317  BtdrvGattAttributeUuid uuid0; ///< \ref BtdrvGattAttributeUuid
318  BtdrvGattAttributeUuid uuid1; ///< \ref BtdrvGattAttributeUuid
319  BtdrvGattAttributeUuid uuid2; ///< \ref BtdrvGattAttributeUuid
320  u16 size; ///< Size of the below data.
321  u8 data[0x3B6]; ///< Data.
323 
324 /// BleClientGattOperationInfo
325 typedef struct {
326  u8 unk_x0; ///< Converted from BtdrvLeEventInfo::unk_x0.
327  u8 pad[3]; ///< Padding
328  u32 unk_x4; ///< BtdrvLeEventInfo::unk_x4
329  u8 unk_x8; ///< BtdrvLeEventInfo::unk_x8
330  u8 pad2[3]; ///< Padding
331  BtdrvGattAttributeUuid uuid0; ///< BtdrvLeEventInfo::uuid0
332  BtdrvGattAttributeUuid uuid1; ///< BtdrvLeEventInfo::uuid1
333  BtdrvGattAttributeUuid uuid2; ///< BtdrvLeEventInfo::uuid2
334  u64 size; ///< BtdrvLeEventInfo::size
335  u8 data[0x200]; ///< BtdrvLeEventInfo::data
337 
338 /// PcmParameter
339 typedef struct {
340  u32 unk_x0; ///< Must be 0-3. Controls number of channels: 0 = mono, non-zero = stereo.
341  s32 sample_rate; ///< Sample rate. Must be one of the following: 16000, 32000, 44100, 48000.
342  u32 bits_per_sample; ///< Bits per sample. Must be 8 or 16.
344 
345 /// AudioControlButtonState
346 typedef struct {
347  u8 unk_x0[0x10]; ///< Unknown
349 
BtdrvEventTypeOld_SspRequest
@ BtdrvEventTypeOld_SspRequest
SSP confirm request / SSP passkey notification.
Definition: btdrv_types.h:47
BtdrvBleAdvertisePacketData::unk_xA5
u8 unk_xA5
Unknown.
Definition: btdrv_types.h:258
BtdrvLeEventInfo::size
u16 size
Size of the below data.
Definition: btdrv_types.h:320
BtdrvBluetoothHhReportType_Other
@ BtdrvBluetoothHhReportType_Other
Other.
Definition: btdrv_types.h:80
BtdrvEventTypeOld_Unknown0
@ BtdrvEventTypeOld_Unknown0
Unused.
Definition: btdrv_types.h:43
BtdrvAudioOutState_Stopped
@ BtdrvAudioOutState_Stopped
Stopped.
Definition: btdrv_types.h:151
BtdrvInquiryStatus_Started
@ BtdrvInquiryStatus_Started
Inquiry started.
Definition: btdrv_types.h:55
BtdrvBleAdvertisePacketData::size0
u8 size0
Size of the data at unk_x6.
Definition: btdrv_types.h:250
BtdrvBluetoothHhReportType_Input
@ BtdrvBluetoothHhReportType_Input
Input.
Definition: btdrv_types.h:81
BtdrvBleAdvertisePacketData::unk_xC7
u8 unk_xC7
Unknown.
Definition: btdrv_types.h:261
BtdrvHidConnectionStatus_Failed
@ BtdrvHidConnectionStatus_Failed
BtdrvHidConnectionStatusOld_* should be used on [1.0.0-11.0.1].
Definition: btdrv_types.h:107
BtdrvBleClientGattOperationInfo::unk_x4
u32 unk_x4
BtdrvLeEventInfo::unk_x4.
Definition: btdrv_types.h:328
BtdrvAdapterPropertyOld::feature_set
u8 feature_set
Set to hard-coded value 0x68 (same as the data for BtdrvBluetoothPropertyType_FeatureSet).
Definition: btdrv_types.h:175
BtdrvHidReport::size
u16 size
Size of data.
Definition: btdrv_types.h:211
BtdrvBleClientGattOperationInfo::uuid1
BtdrvGattAttributeUuid uuid1
BtdrvLeEventInfo::uuid1.
Definition: btdrv_types.h:332
BtdrvFatalReason_Invalid
@ BtdrvFatalReason_Invalid
Only for BtdrvEventInfo: invalid.
Definition: btdrv_types.h:117
BtdrvBleClientGattOperationInfo
BleClientGattOperationInfo.
Definition: btdrv_types.h:325
BtdrvBleClientGattOperationInfo::uuid2
BtdrvGattAttributeUuid uuid2
BtdrvLeEventInfo::uuid2.
Definition: btdrv_types.h:333
BtdrvHidData
HidData [1.0.0-8.1.1].
Definition: btdrv_types.h:204
BtdrvEventTypeOld_Connection
@ BtdrvEventTypeOld_Connection
Connection.
Definition: btdrv_types.h:48
BtdrvEventType_MoveToSecondaryPiconet
@ BtdrvEventType_MoveToSecondaryPiconet
btdrvMoveToSecondaryPiconet
Definition: btdrv_types.h:39
u8
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
BtdrvFatalReason_Enable
@ BtdrvFatalReason_Enable
Only for BtdrvEventInfo: triggered after enabling bluetooth, depending on the value of a global state...
Definition: btdrv_types.h:121
BtdrvBleEventType_Unknown6
@ BtdrvBleEventType_Unknown6
Unknown.
Definition: btdrv_types.h:133
BtdrvBleScanResult::unk_x140
s32 unk_x140
Unknown.
Definition: btdrv_types.h:287
BtdrvAudioOutState
BtdrvAudioOutState
AudioOutState.
Definition: btdrv_types.h:150
BtdrvFatalReason_Audio
@ BtdrvFatalReason_Audio
[12.0.0+] Only for BtdrvEventInfo: triggered by Audio cmds in some cases.
Definition: btdrv_types.h:122
BtdrvEventTypeOld_PairingPinCodeRequest
@ BtdrvEventTypeOld_PairingPinCodeRequest
Pairing PIN code request.
Definition: btdrv_types.h:46
BtdrvBleConnectionInfo::connection_handle
u32 connection_handle
ConnectionHandle, 0xFFFFFFFF ([5.0.0-5.0.2] 0xFFFF) is invalid.
Definition: btdrv_types.h:293
BtdrvAdapterPropertyOld::addr
BtdrvAddress addr
Same as the data for BtdrvBluetoothPropertyType_Address.
Definition: btdrv_types.h:172
BtdrvBluetoothPropertyType
BtdrvBluetoothPropertyType
BluetoothPropertyType [1.0.0-11.0.1].
Definition: btdrv_types.h:11
BtdrvAudioCodec_Pcm
@ BtdrvAudioCodec_Pcm
Raw PCM.
Definition: btdrv_types.h:157
BtdrvExtEventType_PendingConnections
@ BtdrvExtEventType_PendingConnections
btdrvGetPendingConnections
Definition: btdrv_types.h:72
BtdrvAdapterPropertyType_Unknown3
@ BtdrvAdapterPropertyType_Unknown3
Only available with btdrvSetAdapterProperty. Unknown, BtdrvAddress.
Definition: btdrv_types.h:24
BtdrvConnectionEventType_Status
@ BtdrvConnectionEventType_Status
BtdrvEventInfo::connection::status.
Definition: btdrv_types.h:60
BtdrvHidData::size
u16 size
Size of data.
Definition: btdrv_types.h:205
BtdrvPcmParameter
PcmParameter.
Definition: btdrv_types.h:339
BtdrvBleAdvertiseFilter
BleAdvertiseFilter.
Definition: btdrv_types.h:273
BtdrvExtEventType_SetBurstMode
@ BtdrvExtEventType_SetBurstMode
SetBurstMode (btdrvEnableBurstMode)
Definition: btdrv_types.h:69
BtdrvBleEventType_Unknown13
@ BtdrvBleEventType_Unknown13
Unknown.
Definition: btdrv_types.h:140
s32
int32_t s32
32-bit signed integer.
Definition: types.h:27
BtdrvBluetoothPropertyType_Address
@ BtdrvBluetoothPropertyType_Address
BtdrvAddress
Definition: btdrv_types.h:13
BtdrvAudioControlButtonState
AudioControlButtonState.
Definition: btdrv_types.h:346
BtdrvExtEventType
BtdrvExtEventType
ExtEventType [1.0.0-11.0.1].
Definition: btdrv_types.h:66
BtdrvHidReport
HidReport [9.0.0+].
Definition: btdrv_types.h:210
BtdrvClassOfDevice
ClassOfDevice.
Definition: btdrv_types.h:166
BtdrvBleAdvertisePacketData::unk_x4
u8 unk_x4
Unknown.
Definition: btdrv_types.h:249
BtdrvBleAdvertisePacketData::size2
u8 size2
Size of the data at unk_xA8.
Definition: btdrv_types.h:257
BtdrvBleEventType_Unknown1
@ BtdrvBleEventType_Unknown1
Unknown.
Definition: btdrv_types.h:128
BtdrvBleConnectionInfo::addr
BtdrvAddress addr
BtdrvAddress
Definition: btdrv_types.h:294
BtdrvBleEventType_Unknown11
@ BtdrvBleEventType_Unknown11
Unknown.
Definition: btdrv_types.h:138
BtdrvHidEventType_SetReport
@ BtdrvHidEventType_SetReport
Response to SET_REPORT.
Definition: btdrv_types.h:91
BtdrvBleClientGattOperationInfo::unk_x8
u8 unk_x8
BtdrvLeEventInfo::unk_x8.
Definition: btdrv_types.h:329
BtdrvLeEventInfo::uuid1
BtdrvGattAttributeUuid uuid1
BtdrvGattAttributeUuid
Definition: btdrv_types.h:318
BtdrvConnectionEventType
BtdrvConnectionEventType
ConnectionEventType.
Definition: btdrv_types.h:59
BtdrvFatalReason_HardwareError
@ BtdrvFatalReason_HardwareError
HCI event HCI_Hardware_Error occurred.
Definition: btdrv_types.h:120
BtdrvBleAdvertisePacketDataEntry::unk_x0
u16 unk_x0
Unknown.
Definition: btdrv_types.h:242
BtdrvBluetoothPropertyType_Name
@ BtdrvBluetoothPropertyType_Name
Name. String, max length 0xF8 excluding NUL-terminator.
Definition: btdrv_types.h:12
BtdrvExtEventType_MoveToSecondaryPiconet
@ BtdrvExtEventType_MoveToSecondaryPiconet
btdrvMoveToSecondaryPiconet
Definition: btdrv_types.h:73
BtdrvAdapterPropertyOld::class_of_device
BtdrvClassOfDevice class_of_device
Same as the data for BtdrvBluetoothPropertyType_ClassOfDevice.
Definition: btdrv_types.h:173
BtdrvBleEventType_Unknown8
@ BtdrvBleEventType_Unknown8
Unknown.
Definition: btdrv_types.h:135
BtdrvAdapterPropertyType_ClassOfDevice
@ BtdrvAdapterPropertyType_ClassOfDevice
3-bytes, Class of Device.
Definition: btdrv_types.h:23
BtdrvLeConnectionParams
LeConnectionParams.
Definition: btdrv_types.h:231
BtdrvBleAdvertisementData
Definition: btdrv_types.h:266
BtdrvBluetoothHhReportType_Feature
@ BtdrvBluetoothHhReportType_Feature
Feature.
Definition: btdrv_types.h:83
BtdrvHidEventType_GetReport
@ BtdrvHidEventType_GetReport
Response to GET_REPORT.
Definition: btdrv_types.h:92
BtdrvPlrStatistics
PlrStatistics.
Definition: btdrv_types.h:216
u32
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
BtdrvHidConnectionStatus_Closed
@ BtdrvHidConnectionStatus_Closed
BtdrvHidConnectionStatus_* should be used on [12.0.0+].
Definition: btdrv_types.h:105
BtdrvBleEventType_Unknown4
@ BtdrvBleEventType_Unknown4
Unknown.
Definition: btdrv_types.h:131
BtdrvBleAdvertisePacketData::count
u8 count
Total array entries, see entries.
Definition: btdrv_types.h:253
BtdrvFatalReason
BtdrvFatalReason
This determines the u16 data to write into a CircularBuffer.
Definition: btdrv_types.h:116
BtdrvConnectionEventType_Suspended
@ BtdrvConnectionEventType_Suspended
ACL Link is now Suspended.
Definition: btdrv_types.h:62
BtdrvGattId::instance_id
u8 instance_id
InstanceId.
Definition: btdrv_types.h:306
BtdrvPcmParameter::sample_rate
s32 sample_rate
Sample rate. Must be one of the following: 16000, 32000, 44100, 48000.
Definition: btdrv_types.h:341
BtdrvEventTypeOld_BluetoothCrash
@ BtdrvEventTypeOld_BluetoothCrash
BluetoothCrash.
Definition: btdrv_types.h:49
BtdrvBleAdvertisePacketDataEntry
BtdrvBleAdvertisePacketDataEntry.
Definition: btdrv_types.h:241
BtdrvBleEventType_Unknown10
@ BtdrvBleEventType_Unknown10
Unknown.
Definition: btdrv_types.h:137
BtdrvBleEventType_Unknown5
@ BtdrvBleEventType_Unknown5
Unknown.
Definition: btdrv_types.h:132
BtdrvAdapterPropertySet
AdapterPropertySet [12.0.0+].
Definition: btdrv_types.h:186
u64
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
BtdrvBluetoothPropertyType_ClassOfDevice
@ BtdrvBluetoothPropertyType_ClassOfDevice
3-bytes, Class of Device.
Definition: btdrv_types.h:15
BtdrvAdapterPropertySet::addr
BtdrvAddress addr
Same as the data for BtdrvBluetoothPropertyType_Address.
Definition: btdrv_types.h:187
BtdrvAudioCodec
BtdrvAudioCodec
AudioCodec.
Definition: btdrv_types.h:156
BtdrvPcmParameter::unk_x0
u32 unk_x0
Must be 0-3. Controls number of channels: 0 = mono, non-zero = stereo.
Definition: btdrv_types.h:340
BtdrvPinCode::length
u8 length
Length.
Definition: btdrv_types.h:200
BtdrvExtEventType_SetTsi
@ BtdrvExtEventType_SetTsi
SetTsi (btdrvSetTsi)
Definition: btdrv_types.h:67
BtdrvLeEventInfo::unk_x4
u32 unk_x4
Unknown.
Definition: btdrv_types.h:314
BtdrvBleClientGattOperationInfo::size
u64 size
BtdrvLeEventInfo::size.
Definition: btdrv_types.h:334
BtdrvAdapterProperty::size
u8 size
Data size.
Definition: btdrv_types.h:181
BtdrvBleAdvertisePacketData::unk_xC8
u8 unk_xC8
Unknown.
Definition: btdrv_types.h:262
BtdrvExtEventType_SetZeroRetransmission
@ BtdrvExtEventType_SetZeroRetransmission
btdrvSetZeroRetransmission
Definition: btdrv_types.h:71
BtdrvEventTypeOld_InquiryDevice
@ BtdrvEventTypeOld_InquiryDevice
Device found during Inquiry.
Definition: btdrv_types.h:44
BtdrvFatalReason_CommandTimeout
@ BtdrvFatalReason_CommandTimeout
HCI command timeout.
Definition: btdrv_types.h:119
BtdrvBleClientGattOperationInfo::uuid0
BtdrvGattAttributeUuid uuid0
BtdrvLeEventInfo::uuid0.
Definition: btdrv_types.h:331
BtdrvBleEventType_Unknown3
@ BtdrvBleEventType_Unknown3
Unknown.
Definition: btdrv_types.h:130
BtdrvLeEventInfo::uuid2
BtdrvGattAttributeUuid uuid2
BtdrvGattAttributeUuid
Definition: btdrv_types.h:319
BtdrvHidEventTypeOld_SetReport
@ BtdrvHidEventTypeOld_SetReport
Response to SET_REPORT.
Definition: btdrv_types.h:98
BtdrvEventType_InquiryDevice
@ BtdrvEventType_InquiryDevice
BtdrvEventType_* should be used on [12.0.0+].
Definition: btdrv_types.h:30
BtdrvLeEventInfo::unk_x0
u32 unk_x0
Unknown.
Definition: btdrv_types.h:313
BtdrvGattAttributeUuid::size
u32 size
UUID size, must be 0x2, 0x4, or 0x10.
Definition: btdrv_types.h:300
BtdrvBluetoothHhReportType
BtdrvBluetoothHhReportType
BluetoothHhReportType Bit0-1 directly control the HID bluetooth transaction report-type value.
Definition: btdrv_types.h:79
BtdrvGattAttributeUuid
GattAttributeUuid.
Definition: btdrv_types.h:299
BtdrvBluetoothPinCode
BluetoothPinCode [1.0.0-11.0.1].
Definition: btdrv_types.h:193
BtdrvEventType_Tsi
@ BtdrvEventType_Tsi
SetTsi (btdrvSetTsi)
Definition: btdrv_types.h:35
BtdrvInquiryStatus_Stopped
@ BtdrvInquiryStatus_Stopped
Inquiry stopped.
Definition: btdrv_types.h:54
BtdrvBleEventType_Unknown2
@ BtdrvBleEventType_Unknown2
Unknown.
Definition: btdrv_types.h:129
BtdrvBleEventType_Unknown12
@ BtdrvBleEventType_Unknown12
Unknown.
Definition: btdrv_types.h:139
BtdrvEventType_BluetoothCrash
@ BtdrvEventType_BluetoothCrash
BluetoothCrash.
Definition: btdrv_types.h:40
BtdrvLeEventInfo
LeEventInfo.
Definition: btdrv_types.h:312
BtdrvBleScanResult::unk_x144
s32 unk_x144
Unknown.
Definition: btdrv_types.h:288
BtdrvBleConnectionInfo
BleConnectionInfo.
Definition: btdrv_types.h:292
BtdrvEventType_SetZeroRetransmission
@ BtdrvEventType_SetZeroRetransmission
btdrvSetZeroRetransmission
Definition: btdrv_types.h:37
BtdrvConnectionEventType_SspConfirmRequest
@ BtdrvConnectionEventType_SspConfirmRequest
SSP confirm request.
Definition: btdrv_types.h:61
BtdrvBleEventType
BtdrvBleEventType
BleEventType.
Definition: btdrv_types.h:126
BtdrvAdapterPropertyOld
AdapterProperty [1.0.0-11.0.1].
Definition: btdrv_types.h:171
BtdrvBluetoothPropertyType_Unknown3
@ BtdrvBluetoothPropertyType_Unknown3
Only available with btdrvSetAdapterProperty. Unknown, BtdrvAddress.
Definition: btdrv_types.h:14
BtdrvHidEventType
BtdrvHidEventType
HidEventType.
Definition: btdrv_types.h:87
BtdrvChannelMapList
ChannelMapList.
Definition: btdrv_types.h:226
BtdrvAudioEventType_Connection
@ BtdrvAudioEventType_Connection
Connection.
Definition: btdrv_types.h:146
BtdrvEventType_Connection
@ BtdrvEventType_Connection
Connection.
Definition: btdrv_types.h:34
BtdrvLeEventInfo::unk_x8
u8 unk_x8
Unknown.
Definition: btdrv_types.h:315
BtdrvEventType_PairingPinCodeRequest
@ BtdrvEventType_PairingPinCodeRequest
Pairing PIN code request.
Definition: btdrv_types.h:32
BtdrvBleClientGattOperationInfo::unk_x0
u8 unk_x0
Converted from BtdrvLeEventInfo::unk_x0.
Definition: btdrv_types.h:326
BtdrvGattId
GattId.
Definition: btdrv_types.h:305
BtdrvLeEventInfo::uuid0
BtdrvGattAttributeUuid uuid0
BtdrvGattAttributeUuid
Definition: btdrv_types.h:317
BtdrvEventType
BtdrvEventType
EventType.
Definition: btdrv_types.h:28
BtdrvAdapterPropertySet::class_of_device
BtdrvClassOfDevice class_of_device
Same as the data for BtdrvBluetoothPropertyType_ClassOfDevice.
Definition: btdrv_types.h:188
BtdrvBleScanResult::unk_x0
u8 unk_x0
Unknown.
Definition: btdrv_types.h:284
BtdrvHidEventTypeOld_GetReport
@ BtdrvHidEventTypeOld_GetReport
Response to GET_REPORT.
Definition: btdrv_types.h:99
BtdrvInquiryStatus
BtdrvInquiryStatus
BtdrvInquiryStatus.
Definition: btdrv_types.h:53
BtdrvAdapterPropertyType
BtdrvAdapterPropertyType
AdapterPropertyType [12.0.0+].
Definition: btdrv_types.h:20
BtdrvEventType_SspRequest
@ BtdrvEventType_SspRequest
SSP confirm request / SSP passkey notification.
Definition: btdrv_types.h:33
BtdrvAddress
Address.
Definition: btdrv_types.h:161
BtdrvPlrList
PlrList.
Definition: btdrv_types.h:221
BtdrvPinCode
BtdrvPinCode [12.0.0+].
Definition: btdrv_types.h:198
BtdrvHidEventType_Data
@ BtdrvHidEventType_Data
DATA report on the Interrupt channel.
Definition: btdrv_types.h:90
BtdrvBleAdvertisePacketData
BleAdvertisePacketData.
Definition: btdrv_types.h:247
BtdrvGattId::uuid
BtdrvGattAttributeUuid uuid
BtdrvGattAttributeUuid
Definition: btdrv_types.h:308
BtdrvAdapterPropertyType_Address
@ BtdrvAdapterPropertyType_Address
BtdrvAddress
Definition: btdrv_types.h:21
BtdrvBleAdvertisePacketData::unk_x0
u32 unk_x0
Unknown.
Definition: btdrv_types.h:248
BtdrvBleConnectionParameter
BleConnectionParameter.
Definition: btdrv_types.h:236
BtdrvExtEventType_ExitBurstMode
@ BtdrvExtEventType_ExitBurstMode
ExitBurstMode (btdrvEnableBurstMode)
Definition: btdrv_types.h:70
BtdrvBleEventType_Unknown7
@ BtdrvBleEventType_Unknown7
Unknown.
Definition: btdrv_types.h:134
BtdrvExtEventType_ExitTsi
@ BtdrvExtEventType_ExitTsi
ExitTsi (btdrvSetTsi)
Definition: btdrv_types.h:68
BtdrvPcmParameter::bits_per_sample
u32 bits_per_sample
Bits per sample. Must be 8 or 16.
Definition: btdrv_types.h:342
BtdrvBleScanResult
BleScanResult.
Definition: btdrv_types.h:283
BtdrvAdapterProperty::type
u8 type
BtdrvAdapterPropertyType
Definition: btdrv_types.h:180
BtdrvAudioEventType_None
@ BtdrvAudioEventType_None
None.
Definition: btdrv_types.h:145
BtdrvBleEventType_Unknown9
@ BtdrvBleEventType_Unknown9
Unknown.
Definition: btdrv_types.h:136
BtdrvEventType_PendingConnections
@ BtdrvEventType_PendingConnections
btdrvGetPendingConnections
Definition: btdrv_types.h:38
BtdrvHidEventTypeOld_Ext
@ BtdrvHidEventTypeOld_Ext
Response for extensions. Only used with btdrvGetHidEventInfo.
Definition: btdrv_types.h:97
BtdrvBleAdvertisePacketParameter
BleAdvertisePacketParameter.
Definition: btdrv_types.h:278
BtdrvBluetoothHhReportType_Output
@ BtdrvBluetoothHhReportType_Output
Output.
Definition: btdrv_types.h:82
BtdrvBleScanResult::addr
BtdrvAddress addr
BtdrvAddress
Definition: btdrv_types.h:285
BtdrvEventType_BurstMode
@ BtdrvEventType_BurstMode
SetBurstMode (btdrvEnableBurstMode)
Definition: btdrv_types.h:36
BtdrvBleEventType_Unknown0
@ BtdrvBleEventType_Unknown0
Unknown.
Definition: btdrv_types.h:127
BtdrvEventType_InquiryStatus
@ BtdrvEventType_InquiryStatus
Inquiry status changed.
Definition: btdrv_types.h:31
BtdrvAudioEventType
BtdrvAudioEventType
AudioEventType.
Definition: btdrv_types.h:144
BtdrvAdapterPropertyType_Name
@ BtdrvAdapterPropertyType_Name
Name. String, max length 0xF8 excluding NUL-terminator.
Definition: btdrv_types.h:22
u16
uint16_t u16
16-bit unsigned integer.
Definition: types.h:20
BtdrvFatalReason_Unknown1
@ BtdrvFatalReason_Unknown1
Can only be triggered by btdrvEmulateBluetoothCrash, not triggered by the sysmodule otherwise.
Definition: btdrv_types.h:118
BtdrvEventTypeOld_InquiryStatus
@ BtdrvEventTypeOld_InquiryStatus
Inquiry status changed.
Definition: btdrv_types.h:45
BtdrvHidEventType_Connection
@ BtdrvHidEventType_Connection
BtdrvHidEventType_* should be used on [12.0.0+].
Definition: btdrv_types.h:89
BtdrvAudioOutState_Started
@ BtdrvAudioOutState_Started
Started.
Definition: btdrv_types.h:152
BtdrvHidConnectionStatus
BtdrvHidConnectionStatus
HidConnectionStatus [12.0.0+].
Definition: btdrv_types.h:103
BtdrvHidEventTypeOld_Connection
@ BtdrvHidEventTypeOld_Connection
Connection. Only used with btdrvGetHidEventInfo.
Definition: btdrv_types.h:95
BtdrvHidEventTypeOld_Data
@ BtdrvHidEventTypeOld_Data
DATA report on the Interrupt channel.
Definition: btdrv_types.h:96
BtdrvBluetoothPropertyType_FeatureSet
@ BtdrvBluetoothPropertyType_FeatureSet
1-byte, FeatureSet. The default is value 0x68.
Definition: btdrv_types.h:16
BtdrvAdapterProperty
AdapterProperty [12.0.0+].
Definition: btdrv_types.h:179