libnx  v4.8.0
btdev.h
Go to the documentation of this file.
1 /**
2  * @file btdev.h
3  * @brief Wrapper around the bt/btmu services for using bluetooth BLE.
4  * @note Only available on [5.0.0+].
5  * @note See also: https://switchbrew.org/wiki/BTM_services
6  * @author yellows8
7  * @copyright libnx Authors
8  */
9 #pragma once
10 #include "../types.h"
11 #include "../kernel/event.h"
12 #include "../services/btdrv_types.h"
13 
14 /// GattAttribute
15 typedef struct {
16  u8 type; ///< Type
17  BtdrvGattAttributeUuid uuid; ///< \ref BtdrvGattAttributeUuid
18  u16 handle; ///< Handle
19  u32 connection_handle; ///< ConnectionHandle
21 
22 /// GattService
23 typedef struct {
24  BtdevGattAttribute attr; ///< \ref BtdevGattAttribute
25  u16 instance_id; ///< InstanceId
26  u16 end_group_handle; ///< EndGroupHandle
27  bool primary_service; ///< PrimaryService
29 
30 /// GattCharacteristic
31 typedef struct {
32  BtdevGattAttribute attr; ///< \ref BtdevGattAttribute
33  u16 instance_id; ///< InstanceId
34  u8 properties; ///< Properties
35  u64 value_size; ///< Size of value.
36  u8 value[0x200]; ///< Value
38 
39 /// GattDescriptor
40 typedef struct {
41  BtdevGattAttribute attr; ///< \ref BtdevGattAttribute
42  u64 value_size; ///< Size of value.
43  u8 value[0x200]; ///< Value
45 
46 /// Initialize bt/btmu.
48 
49 /// Exit bt/btmu.
50 void btdevExit(void);
51 
52 /// Compares two \ref BtdrvGattAttributeUuid, returning whether these match.
54 
55 /// Wrapper for \ref btmuAcquireBleScanEvent.
57 
58 /// Wrapper for \ref btmuGetBleScanFilterParameter.
60 
61 /// Wrapper for \ref btmuGetBleScanFilterParameter2.
63 
64 /// Wrapper for \ref btdevStartBleScanGeneral.
66 
67 /// Wrapper for \ref btmuStopBleScanForGeneral.
69 
70 /**
71  * @brief Wrapper for \ref btmuGetBleScanResultsForGeneral and \ref btmuGetBleScanResultsForSmartDevice.
72  * @param[out] results Output array of \ref BtdrvBleScanResult.
73  * @param[in] count Size of the results array in entries.
74  * @param[out] total_out Total output entries.
75  */
76 Result btdevGetBleScanResult(BtdrvBleScanResult *results, u8 count, u8 *total_out);
77 
78 /// Wrapper for \ref btmuStartBleScanForPaired.
80 
81 /// Wrapper for \ref btmuStopBleScanForPaired.
83 
84 /// Wrapper for \ref btmuStartBleScanForSmartDevice.
86 
87 /// Wrapper for \ref btmuStopBleScanForSmartDevice.
89 
90 /// Wrapper for \ref btmuAcquireBleConnectionEvent.
92 
93 /// Wrapper for \ref btmuBleConnect.
95 
96 /// Wrapper for \ref btmuBleDisconnect.
98 
99 /// Wrapper for \ref btmuBleGetConnectionState.
101 
102 /// Wrapper for \ref btmuAcquireBleServiceDiscoveryEvent.
104 
105 /**
106  * @brief Wrapper for \ref btmuGetGattServices.
107  * @param[in] connection_handle ConnectionHandle
108  * @param[out] services Output array of \ref BtdevGattService.
109  * @param[in] count Size of the services array in entries. The max is 100.
110  * @param[out] total_out Total output entries.
111  */
112 Result btdevGetGattServices(u32 connection_handle, BtdevGattService *services, u8 count, u8 *total_out);
113 
114 /**
115  * @brief Wrapper for \ref btmuGetGattService.
116  * @param[in] connection_handle ConnectionHandle
117  * @param[in] uuid \ref BtdrvGattAttributeUuid
118  * @param[out] service \ref BtdevGattService
119  * @param[out] flag Whether a \ref BtdevGattService was returned.
120  */
121 Result btdevGetGattService(u32 connection_handle, const BtdrvGattAttributeUuid *uuid, BtdevGattService *service, bool *flag);
122 
123 /// Wrapper for \ref btmuAcquireBlePairingEvent.
125 
126 /// Wrapper for \ref btmuBlePairDevice.
128 
129 /// Wrapper for \ref btmuBleUnPairDevice.
131 
132 /// Wrapper for \ref btmuBleUnPairDevice2.
134 
135 /// Wrapper for \ref btmuBleGetPairedDevices.
137 
138 /// Wrapper for \ref btmuAcquireBleMtuConfigEvent.
140 
141 /**
142  * @brief Wrapper for \ref btmuConfigureBleMtu.
143  * @param[in] connection_handle Same as \ref btmuBleDisconnect.
144  * @param[in] mtu MTU, must be 0x18-0x200.
145  */
146 Result btdevConfigureBleMtu(u32 connection_handle, u16 mtu);
147 
148 /// Wrapper for \ref btmuGetBleMtu.
149 Result btdevGetBleMtu(u32 connection_handle, u16 *out);
150 
151 /// Wrapper for \ref btRegisterBleEvent.
153 
154 /**
155  * @brief Wrapper for \ref btmuRegisterBleGattDataPath.
156  * @param[in] uuid \ref BtdrvGattAttributeUuid
157  */
159 
160 /**
161  * @brief Wrapper for \ref btmuUnregisterBleGattDataPath.
162  * @param[in] uuid \ref BtdrvGattAttributeUuid
163  */
165 
166 /**
167  * @brief Wrapper for \ref btGetLeEventInfo.
168  * @param[out] out \ref BtdrvBleClientGattOperationInfo
169  */
171 
172 /**
173  * @brief Wrapper for \ref btLeClientReadCharacteristic.
174  * @note An error is thrown if the properties from \ref btdevGattCharacteristicGetProperties don't allow using this.
175  * @param c \ref BtdevGattCharacteristic
176  */
178 
179 /**
180  * @brief Wrapper for \ref btLeClientWriteCharacteristic.
181  * @note An error is thrown if the properties from \ref btdevGattCharacteristicGetProperties don't allow using this.
182  * @note This uses the Value from \ref btdevGattCharacteristicSetValue.
183  * @param c \ref BtdevGattCharacteristic
184  */
186 
187 /**
188  * @brief Wrapper for \ref btLeClientRegisterNotification / \ref btLeClientDeregisterNotification.
189  * @note An error is thrown if the properties from \ref btdevGattCharacteristicGetProperties don't allow using this.
190  * @param c \ref BtdevGattCharacteristic
191  * @param[in] flag Whether to enable/disable, controls which func to call.
192  */
194 
195 /**
196  * @brief Wrapper for \ref btLeClientReadDescriptor.
197  * @param d \ref BtdevGattDescriptor
198  */
200 
201 /**
202  * @brief Wrapper for \ref btLeClientWriteDescriptor.
203  * @note This uses the Value from \ref btdevGattDescriptorSetValue.
204  * @param d \ref BtdevGattDescriptor
205  */
207 
208 ///@name GattAttribute
209 ///@{
210 
211 /**
212  * @brief Creates a \ref BtdevGattAttribute object. This is intended for internal use.
213  * @param a \ref BtdevGattAttribute
214  * @param[in] uuid \ref BtdrvGattAttributeUuid
215  * @param[in] handle Handle
216  * @param[in] connection_handle ConnectionHandle
217  */
218 void btdevGattAttributeCreate(BtdevGattAttribute *a, const BtdrvGattAttributeUuid *uuid, u16 handle, u32 connection_handle);
219 
220 /**
221  * @brief Gets the Type.
222  * @param a \ref BtdevGattAttribute
223  */
225  return a->type;
226 }
227 
228 /**
229  * @brief Gets the Uuid.
230  * @param a \ref BtdevGattAttribute
231  * @param[out] out \ref BtdrvGattAttributeUuid
232  */
234  *out = a->uuid;
235 }
236 
237 /**
238  * @brief Gets the Handle.
239  * @param a \ref BtdevGattAttribute
240  */
242  return a->handle;
243 }
244 
245 /**
246  * @brief Gets the ConnectionHandle.
247  * @param a \ref BtdevGattAttribute
248  */
250  return a->connection_handle;
251 }
252 
253 ///@}
254 
255 ///@name GattService
256 ///@{
257 
258 /**
259  * @brief Creates a \ref BtdevGattService object. This is intended for internal use.
260  * @param s \ref BtdevGattService
261  * @param[in] uuid \ref BtdrvGattAttributeUuid
262  * @param[in] handle Handle
263  * @param[in] connection_handle ConnectionHandle
264  * @param[in] instance_id InstanceId
265  * @param[in] end_group_handle EndGroupHandle
266  * @param[in] primary_service PrimaryService
267  */
268 void btdevGattServiceCreate(BtdevGattService *s, const BtdrvGattAttributeUuid *uuid, u16 handle, u32 connection_handle, u16 instance_id, u16 end_group_handle, bool primary_service);
269 
270 /**
271  * @brief Gets the InstanceId.
272  * @param s \ref BtdevGattService
273  */
275  return s->instance_id;
276 }
277 
278 /**
279  * @brief Gets the EndGroupHandle.
280  * @param s \ref BtdevGattService
281  */
283  return s->end_group_handle;
284 }
285 
286 /**
287  * @brief Gets whether this is the PrimaryService.
288  * @param s \ref BtdevGattService
289  */
291  return s->primary_service;
292 }
293 
294 /**
295  * @brief Wrapper for \ref btmuGetGattIncludedServices.
296  * @param s \ref BtdevGattService
297  * @param[out] services Output array of \ref BtdevGattService.
298  * @param[in] count Size of the services array in entries. The max is 100.
299  * @param[out] total_out Total output entries.
300  */
302 
303 /**
304  * @brief Wrapper for \ref btmuGetGattCharacteristics.
305  * @param s \ref BtdevGattService
306  * @param[out] characteristics Output array of \ref BtdevGattCharacteristic.
307  * @param[in] count Size of the characteristics array in entries. The max is 100.
308  * @param[out] total_out Total output entries.
309  */
311 
312 /**
313  * @brief Same as \ref btdevGattServiceGetCharacteristics except this only returns the \ref BtdevGattCharacteristic which contains a matching \ref BtdrvGattAttributeUuid.
314  * @param s \ref BtdevGattService
315  * @param[in] uuid \ref BtdrvGattAttributeUuid
316  * @param[out] characteristic \ref BtdevGattCharacteristic
317  * @param[out] flag Whether a \ref BtdevGattService was returned.
318  */
320 
321 ///@}
322 
323 ///@name GattCharacteristic
324 ///@{
325 
326 /**
327  * @brief Creates a \ref BtdevGattCharacteristic object. This is intended for internal use.
328  * @param c \ref BtdevGattCharacteristic
329  * @param[in] uuid \ref BtdrvGattAttributeUuid
330  * @param[in] handle Handle
331  * @param[in] connection_handle ConnectionHandle
332  * @param[in] instance_id InstanceId
333  * @param[in] properties Properties
334  */
335 void btdevGattCharacteristicCreate(BtdevGattCharacteristic *c, const BtdrvGattAttributeUuid *uuid, u16 handle, u32 connection_handle, u16 instance_id, u8 properties);
336 
337 /**
338  * @brief Gets the InstanceId.
339  * @param c \ref BtdevGattCharacteristic
340  */
342  return c->instance_id;
343 }
344 
345 /**
346  * @brief Gets the Properties.
347  * @param c \ref BtdevGattCharacteristic
348  */
350  return c->properties;
351 }
352 
353 /**
354  * @brief Wrapper for \ref btmuGetBelongingGattService.
355  * @note Gets the \ref BtdevGattService which belongs to this object.
356  * @param c \ref BtdevGattCharacteristic.
357  * @param[out] service \ref BtdevGattService
358  */
360 
361 /**
362  * @brief Wrapper for \ref btmuGetGattDescriptors.
363  * @note Gets the descriptors which belongs to this object.
364  * @param c \ref BtdevGattCharacteristic
365  * @param[out] descriptors Output array of \ref BtdevGattDescriptor.
366  * @param[in] count Size of the descriptors array in entries. The max is 100.
367  * @param[out] total_out Total output entries.
368  */
370 
371 /**
372  * @brief Same as \ref btdevGattCharacteristicGetDescriptors except this only returns a \ref BtdevGattDescriptor which contains a matching \ref BtdrvGattAttributeUuid.
373  * @param c \ref BtdevGattCharacteristic
374  * @param[in] uuid \ref BtdrvGattAttributeUuid
375  * @param[out] descriptor \ref BtdevGattDescriptor
376  * @param[out] flag Whether a \ref BtdevGattDescriptor was returned.
377  */
379 
380 /**
381  * @brief Sets the Value in the object.
382  * @note See also \ref btdevWriteGattCharacteristic.
383  * @param c \ref BtdevGattCharacteristic
384  * @param[in] buffer Input buffer.
385  * @param[in] size Input buffer size, max is 0x200.
386  */
387 void btdevGattCharacteristicSetValue(BtdevGattCharacteristic *c, const void* buffer, size_t size);
388 
389 /**
390  * @brief Gets the Value in the object, returns the copied value size.
391  * @param c \ref BtdevGattCharacteristic
392  * @param[out] buffer Output buffer.
393  * @param[in] size Output buffer size, max is 0x200.
394  */
396 
397 ///@}
398 
399 ///@name GattDescriptor
400 ///@{
401 
402 /**
403  * @brief Creates a \ref BtdevGattDescriptor object. This is intended for internal use.
404  * @param d \ref BtdevGattDescriptor
405  * @param[in] uuid \ref BtdrvGattAttributeUuid
406  * @param[in] handle Handle
407  * @param[in] connection_handle ConnectionHandle
408  */
409 void btdevGattDescriptorCreate(BtdevGattDescriptor *d, const BtdrvGattAttributeUuid *uuid, u16 handle, u32 connection_handle);
410 
411 /**
412  * @brief Wrapper for \ref btmuGetBelongingGattService.
413  * @note Gets the \ref BtdevGattService which belongs to this object.
414  * @param d \ref BtdevGattDescriptor
415  * @param[out] service \ref BtdevGattService
416  */
418 
419 /**
420  * @brief Wrapper for \ref btmuGetGattCharacteristics.
421  * @note Gets the \ref BtdevGattCharacteristic which belongs to this object.
422  * @param d \ref BtdevGattDescriptor
423  * @param[out] characteristic \ref BtdevGattCharacteristic
424  */
426 
427 /**
428  * @brief Sets the Value in the object.
429  * @note See also \ref btdevWriteGattDescriptor.
430  * @param d \ref BtdevGattDescriptor
431  * @param[in] buffer Input buffer.
432  * @param[in] size Input buffer size, max is 0x200.
433  */
434 void btdevGattDescriptorSetValue(BtdevGattDescriptor *d, const void* buffer, size_t size);
435 
436 /**
437  * @brief Gets the Value in the object, returns the copied value size.
438  * @param d \ref BtdevGattDescriptor
439  * @param[out] buffer Output buffer.
440  * @param[in] size Output buffer size, max is 0x200.
441  */
442 u64 btdevGattDescriptorGetValue(BtdevGattDescriptor *d, void* buffer, size_t size);
443 
444 ///@}
445 
Result btdevEnableGattCharacteristicNotification(BtdevGattCharacteristic *c, bool flag)
Wrapper for btLeClientRegisterNotification / btLeClientDeregisterNotification.
Result btdevConfigureBleMtu(u32 connection_handle, u16 mtu)
Wrapper for btmuConfigureBleMtu.
void btdevGattAttributeCreate(BtdevGattAttribute *a, const BtdrvGattAttributeUuid *uuid, u16 handle, u32 connection_handle)
Creates a BtdevGattAttribute object.
Result btdevUnpairGattServer(u32 connection_handle, BtdrvBleAdvertisePacketParameter param)
Wrapper for btmuBleUnPairDevice.
Result btdevAcquireBlePairingEvent(Event *out_event)
Wrapper for btmuAcquireBlePairingEvent.
void btdevGattCharacteristicSetValue(BtdevGattCharacteristic *c, const void *buffer, size_t size)
Sets the Value in the object.
Result btdevWriteGattDescriptor(BtdevGattDescriptor *d)
Wrapper for btLeClientWriteDescriptor.
Result btdevAcquireBleGattOperationEvent(Event *out_event)
Wrapper for btRegisterBleEvent.
Result btdevConnectToGattServer(BtdrvAddress addr)
Wrapper for btmuBleConnect.
Result btdevGattCharacteristicGetDescriptor(BtdevGattCharacteristic *c, const BtdrvGattAttributeUuid *uuid, BtdevGattDescriptor *descriptor, bool *flag)
Same as btdevGattCharacteristicGetDescriptors except this only returns a BtdevGattDescriptor which co...
static u16 btdevGattServiceGetEndGroupHandle(BtdevGattService *s)
Gets the EndGroupHandle.
Definition: btdev.h:282
Result btdevAcquireBleServiceDiscoveryEvent(Event *out_event)
Wrapper for btmuAcquireBleServiceDiscoveryEvent.
Result btdevGetBleScanParameter2(u16 parameter_id, BtdrvGattAttributeUuid *out)
Wrapper for btmuGetBleScanFilterParameter2.
Result btdevGattDescriptorGetService(BtdevGattDescriptor *d, BtdevGattService *service)
Wrapper for btmuGetBelongingGattService.
Result btdevGattCharacteristicGetDescriptors(BtdevGattCharacteristic *c, BtdevGattDescriptor *descriptors, u8 count, u8 *total_out)
Wrapper for btmuGetGattDescriptors.
Result btdevEnableBleAutoConnection(BtdrvBleAdvertisePacketParameter param)
Wrapper for btmuStartBleScanForPaired.
static u8 btdevGattAttributeGetType(BtdevGattAttribute *a)
Gets the Type.
Definition: btdev.h:224
static u32 btdevGattAttributeGetConnectionHandle(BtdevGattAttribute *a)
Gets the ConnectionHandle.
Definition: btdev.h:249
Result btdevGattCharacteristicGetService(BtdevGattCharacteristic *c, BtdevGattService *service)
Wrapper for btmuGetBelongingGattService.
void btdevGattDescriptorCreate(BtdevGattDescriptor *d, const BtdrvGattAttributeUuid *uuid, u16 handle, u32 connection_handle)
Creates a BtdevGattDescriptor object.
void btdevGattDescriptorSetValue(BtdevGattDescriptor *d, const void *buffer, size_t size)
Sets the Value in the object.
Result btdevGetGattOperationResult(BtdrvBleClientGattOperationInfo *out)
Wrapper for btGetLeEventInfo.
Result btdevGetBleMtu(u32 connection_handle, u16 *out)
Wrapper for btmuGetBleMtu.
Result btdevGattServiceGetCharacteristic(BtdevGattService *s, const BtdrvGattAttributeUuid *uuid, BtdevGattCharacteristic *characteristic, bool *flag)
Same as btdevGattServiceGetCharacteristics except this only returns the BtdevGattCharacteristic which...
Result btdevReadGattDescriptor(BtdevGattDescriptor *d)
Wrapper for btLeClientReadDescriptor.
static u16 btdevGattAttributeGetHandle(BtdevGattAttribute *a)
Gets the Handle.
Definition: btdev.h:241
Result btdevWriteGattCharacteristic(BtdevGattCharacteristic *c)
Wrapper for btLeClientWriteCharacteristic.
Result btdevGattDescriptorGetCharacteristic(BtdevGattDescriptor *d, BtdevGattCharacteristic *characteristic)
Wrapper for btmuGetGattCharacteristics.
Result btdevGetPairedGattServerAddress(BtdrvBleAdvertisePacketParameter param, BtdrvAddress *addrs, u8 count, u8 *total_out)
Wrapper for btmuBleGetPairedDevices.
Result btdevUnpairGattServer2(BtdrvAddress addr, BtdrvBleAdvertisePacketParameter param)
Wrapper for btmuBleUnPairDevice2.
Result btdevStopBleScanGeneral(void)
Wrapper for btmuStopBleScanForGeneral.
Result btdevRegisterGattOperationNotification(const BtdrvGattAttributeUuid *uuid)
Wrapper for btmuRegisterBleGattDataPath.
Result btdevDisconnectFromGattServer(u32 connection_handle)
Wrapper for btmuBleDisconnect.
static u8 btdevGattCharacteristicGetProperties(BtdevGattCharacteristic *c)
Gets the Properties.
Definition: btdev.h:349
Result btdevStartBleScanSmartDevice(const BtdrvGattAttributeUuid *uuid)
Wrapper for btmuStartBleScanForSmartDevice.
Result btdevAcquireBleConnectionStateChangedEvent(Event *out_event)
Wrapper for btmuAcquireBleConnectionEvent.
static void btdevGattAttributeGetUuid(BtdevGattAttribute *a, BtdrvGattAttributeUuid *out)
Gets the Uuid.
Definition: btdev.h:233
u64 btdevGattDescriptorGetValue(BtdevGattDescriptor *d, void *buffer, size_t size)
Gets the Value in the object, returns the copied value size.
static u16 btdevGattServiceIsPrimaryService(BtdevGattService *s)
Gets whether this is the PrimaryService.
Definition: btdev.h:290
Result btdevPairGattServer(u32 connection_handle, BtdrvBleAdvertisePacketParameter param)
Wrapper for btmuBlePairDevice.
void btdevGattCharacteristicCreate(BtdevGattCharacteristic *c, const BtdrvGattAttributeUuid *uuid, u16 handle, u32 connection_handle, u16 instance_id, u8 properties)
Creates a BtdevGattCharacteristic object.
Result btdevGetBleScanParameter(u16 parameter_id, BtdrvBleAdvertisePacketParameter *out)
Wrapper for btmuGetBleScanFilterParameter.
Result btdevAcquireBleScanEvent(Event *out_event)
Wrapper for btmuAcquireBleScanEvent.
Result btdevDisableBleAutoConnection(void)
Wrapper for btmuStopBleScanForPaired.
static u16 btdevGattCharacteristicGetInstanceId(BtdevGattCharacteristic *c)
Gets the InstanceId.
Definition: btdev.h:341
Result btdevUnregisterGattOperationNotification(const BtdrvGattAttributeUuid *uuid)
Wrapper for btmuUnregisterBleGattDataPath.
Result btdevAcquireBleMtuConfigEvent(Event *out_event)
Wrapper for btmuAcquireBleMtuConfigEvent.
Result btdevGattServiceGetCharacteristics(BtdevGattService *s, BtdevGattCharacteristic *characteristics, u8 count, u8 *total_out)
Wrapper for btmuGetGattCharacteristics.
Result btdevStartBleScanGeneral(BtdrvBleAdvertisePacketParameter param)
Wrapper for btdevStartBleScanGeneral.
Result btdevGattServiceGetIncludedServices(BtdevGattService *s, BtdevGattService *services, u8 count, u8 *total_out)
Wrapper for btmuGetGattIncludedServices.
void btdevExit(void)
Exit bt/btmu.
u64 btdevGattCharacteristicGetValue(BtdevGattCharacteristic *c, void *buffer, size_t size)
Gets the Value in the object, returns the copied value size.
Result btdevGetGattServices(u32 connection_handle, BtdevGattService *services, u8 count, u8 *total_out)
Wrapper for btmuGetGattServices.
Result btdevGetBleConnectionInfoList(BtdrvBleConnectionInfo *info, u8 count, u8 *total_out)
Wrapper for btmuBleGetConnectionState.
void btdevGattServiceCreate(BtdevGattService *s, const BtdrvGattAttributeUuid *uuid, u16 handle, u32 connection_handle, u16 instance_id, u16 end_group_handle, bool primary_service)
Creates a BtdevGattService object.
bool btdevGattAttributeUuidIsSame(const BtdrvGattAttributeUuid *a, const BtdrvGattAttributeUuid *b)
Compares two BtdrvGattAttributeUuid, returning whether these match.
Result btdevReadGattCharacteristic(BtdevGattCharacteristic *c)
Wrapper for btLeClientReadCharacteristic.
static u16 btdevGattServiceGetInstanceId(BtdevGattService *s)
Gets the InstanceId.
Definition: btdev.h:274
Result btdevGetGattService(u32 connection_handle, const BtdrvGattAttributeUuid *uuid, BtdevGattService *service, bool *flag)
Wrapper for btmuGetGattService.
Result btdevStopBleScanSmartDevice(void)
Wrapper for btmuStopBleScanForSmartDevice.
Result btdevGetBleScanResult(BtdrvBleScanResult *results, u8 count, u8 *total_out)
Wrapper for btmuGetBleScanResultsForGeneral and btmuGetBleScanResultsForSmartDevice.
Result btdevInitialize(void)
Initialize bt/btmu.
GattAttribute.
Definition: btdev.h:15
u16 handle
Handle.
Definition: btdev.h:18
u32 connection_handle
ConnectionHandle.
Definition: btdev.h:19
BtdrvGattAttributeUuid uuid
BtdrvGattAttributeUuid
Definition: btdev.h:17
u8 type
Type.
Definition: btdev.h:16
GattCharacteristic.
Definition: btdev.h:31
BtdevGattAttribute attr
BtdevGattAttribute
Definition: btdev.h:32
u8 properties
Properties.
Definition: btdev.h:34
u64 value_size
Size of value.
Definition: btdev.h:35
u16 instance_id
InstanceId.
Definition: btdev.h:33
GattDescriptor.
Definition: btdev.h:40
u64 value_size
Size of value.
Definition: btdev.h:42
BtdevGattAttribute attr
BtdevGattAttribute
Definition: btdev.h:41
GattService.
Definition: btdev.h:23
u16 end_group_handle
EndGroupHandle.
Definition: btdev.h:26
bool primary_service
PrimaryService.
Definition: btdev.h:27
BtdevGattAttribute attr
BtdevGattAttribute
Definition: btdev.h:24
u16 instance_id
InstanceId.
Definition: btdev.h:25
Address.
Definition: btdrv_types.h:214
BleAdvertisePacketParameter.
Definition: btdrv_types.h:348
BleClientGattOperationInfo.
Definition: btdrv_types.h:406
BleConnectionInfo.
Definition: btdrv_types.h:363
BleScanResult.
Definition: btdrv_types.h:354
GattAttributeUuid.
Definition: btdrv_types.h:370
Kernel-mode event structure.
Definition: event.h:13
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
uint16_t u16
16-bit unsigned integer.
Definition: types.h:20
u32 Result
Function error code result type.
Definition: types.h:44
#define NX_CONSTEXPR
Flags a function as constexpr in C++14 and above; or as (always) inline otherwise.
Definition: types.h:92
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21