11 #include "../kernel/event.h"
12 #include "../services/btdrv_types.h"
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