|
libnx v4.9.0
|
btm service IPC wrapper. More...
#include "../types.h"#include "../kernel/event.h"#include "../services/btdrv_types.h"#include "../services/btm_types.h"#include "../sf/service.h"Go to the source code of this file.
Functions | |
| Result | btmInitialize (void) |
| Initialize btm. | |
| void | btmExit (void) |
| Exit btm. | |
| Service * | btmGetServiceSession (void) |
| Gets the Service object for the actual btm service session. | |
| Result | btmGetState (BtmState *out) |
| GetState. | |
| Result | btmGetHostDeviceProperty (BtmHostDeviceProperty *out) |
| GetHostDeviceProperty. | |
| Result | btmAcquireDeviceConditionEvent (Event *out_event) |
| AcquireDeviceConditionEvent. | |
| Result | btmLegacyGetDeviceCondition (BtmDeviceCondition *out) |
| GetDeviceCondition [1.0.0-12.1.0]. | |
| Result | btmGetDeviceCondition (BtmProfile profile, BtmConnectedDeviceV13 *out, size_t count, s32 *total_out) |
| GetDeviceCondition [13.0.0+]. | |
| Result | btmSetBurstMode (BtdrvAddress addr, bool flag) |
| SetBurstMode. | |
| Result | btmSetSlotMode (const BtmDeviceSlotModeList *list) |
| SetSlotMode. | |
| Result | btmSetBluetoothMode (BtmBluetoothMode mode) |
| SetBluetoothMode. | |
| Result | btmSetWlanMode (BtmWlanMode mode) |
| SetWlanMode. | |
| Result | btmAcquireDeviceInfoEvent (Event *out_event) |
| AcquireDeviceInfoEvent. | |
| Result | btmLegacyGetDeviceInfo (BtmDeviceInfoList *out) |
| GetDeviceInfo [1.0.0-12.1.0]. | |
| Result | btmGetDeviceInfo (BtmProfile profile, BtmDeviceInfoV13 *out, size_t count, s32 *total_out) |
| GetDeviceInfo [13.0.0+]. | |
| Result | btmAddDeviceInfo (const BtmDeviceInfo *info) |
| AddDeviceInfo. | |
| Result | btmRemoveDeviceInfo (BtdrvAddress addr) |
| RemoveDeviceInfo. | |
| Result | btmIncreaseDeviceInfoOrder (BtdrvAddress addr) |
| IncreaseDeviceInfoOrder. | |
| Result | btmLlrNotify (BtdrvAddress addr, s32 unk) |
| LlrNotify. | |
| Result | btmEnableRadio (void) |
| EnableRadio. | |
| Result | btmDisableRadio (void) |
| DisableRadio. | |
| Result | btmHidDisconnect (BtdrvAddress addr) |
| HidDisconnect. | |
| Result | btmHidSetRetransmissionMode (BtdrvAddress addr, const BtmZeroRetransmissionList *list) |
| HidSetRetransmissionMode. | |
| Result | btmAcquireAwakeReqEvent (Event *out_event) |
| AcquireAwakeReqEvent. | |
| Result | btmAcquireLlrStateEvent (Event *out_event) |
| AcquireLlrStateEvent. | |
| Result | btmIsLlrStarted (bool *out) |
| IsLlrStarted. | |
| Result | btmEnableSlotSaving (bool flag) |
| EnableSlotSaving. | |
| Result | btmProtectDeviceInfo (BtdrvAddress addr, bool flag) |
| ProtectDeviceInfo. | |
| Result | btmAcquireBleScanEvent (Event *out_event) |
| AcquireBleScanEvent. | |
| Result | btmGetBleScanParameterGeneral (u16 parameter_id, BtdrvBleAdvertisePacketParameter *out) |
| GetBleScanParameterGeneral. | |
| Result | btmGetBleScanParameterSmartDevice (u16 parameter_id, BtdrvGattAttributeUuid *out) |
| GetBleScanParameterSmartDevice. | |
| Result | btmStartBleScanForGeneral (BtdrvBleAdvertisePacketParameter param) |
| StartBleScanForGeneral. | |
| Result | btmStopBleScanForGeneral (void) |
| StopBleScanForGeneral. | |
| Result | btmGetBleScanResultsForGeneral (BtdrvBleScanResult *results, u8 count, u8 *total_out) |
| GetBleScanResultsForGeneral. | |
| Result | btmStartBleScanForPaired (BtdrvBleAdvertisePacketParameter param) |
| StartBleScanForPaired. | |
| Result | btmStopBleScanForPaired (void) |
| StopBleScanForPaired. | |
| Result | btmStartBleScanForSmartDevice (const BtdrvGattAttributeUuid *uuid) |
| StartBleScanForSmartDevice. | |
| Result | btmStopBleScanForSmartDevice (void) |
| StopBleScanForSmartDevice. | |
| Result | btmGetBleScanResultsForSmartDevice (BtdrvBleScanResult *results, u8 count, u8 *total_out) |
| GetBleScanResultsForSmartDevice. | |
| Result | btmAcquireBleConnectionEvent (Event *out_event) |
| AcquireBleConnectionEvent. | |
| Result | btmBleConnect (BtdrvAddress addr) |
| BleConnect. | |
| Result | btmBleOverrideConnection (u32 id) |
| BleOverrideConnection. | |
| Result | btmBleDisconnect (u32 connection_handle) |
| BleDisconnect. | |
| Result | btmBleGetConnectionState (BtdrvBleConnectionInfo *info, u8 count, u8 *total_out) |
| BleGetConnectionState. | |
| Result | btmBleGetGattClientConditionList (BtmGattClientConditionList *list) |
| BleGetGattClientConditionList. | |
| Result | btmAcquireBlePairingEvent (Event *out_event) |
| AcquireBlePairingEvent. | |
| Result | btmBlePairDevice (u32 connection_handle, BtdrvBleAdvertisePacketParameter param) |
| BlePairDevice. | |
| Result | btmBleUnpairDeviceOnBoth (u32 connection_handle, BtdrvBleAdvertisePacketParameter param) |
| BleUnpairDeviceOnBoth. | |
| Result | btmBleUnPairDevice (BtdrvAddress addr, BtdrvBleAdvertisePacketParameter param) |
| BleUnPairDevice. | |
| Result | btmBleGetPairedAddresses (BtdrvBleAdvertisePacketParameter param, BtdrvAddress *addrs, u8 count, u8 *total_out) |
| BleGetPairedAddresses. | |
| Result | btmAcquireBleServiceDiscoveryEvent (Event *out_event) |
| AcquireBleServiceDiscoveryEvent. | |
| Result | btmGetGattServices (u32 connection_handle, BtmGattService *services, u8 count, u8 *total_out) |
| GetGattServices. | |
| Result | btmGetGattService (u32 connection_handle, const BtdrvGattAttributeUuid *uuid, BtmGattService *service, bool *flag) |
| Same as btmGetGattServices except this only returns the BtmGattService which matches the input BtdrvGattAttributeUuid. | |
| Result | btmGetGattIncludedServices (u32 connection_handle, u16 service_handle, BtmGattService *services, u8 count, u8 *out) |
| Same as btmGetGattServices except this only returns BtmGattService entries where various checks pass with u16 fields. | |
| Result | btmGetBelongingService (u32 connection_handle, u16 attribute_handle, BtmGattService *service, bool *flag) |
| This is similar to btmGetGattIncludedServices except this only returns 1 BtmGattService. | |
| Result | btmGetGattCharacteristics (u32 connection_handle, u16 service_handle, BtmGattCharacteristic *characteristics, u8 count, u8 *total_out) |
| GetGattCharacteristics. | |
| Result | btmGetGattDescriptors (u32 connection_handle, u16 char_handle, BtmGattDescriptor *descriptors, u8 count, u8 *total_out) |
| GetGattDescriptors. | |
| Result | btmAcquireBleMtuConfigEvent (Event *out_event) |
| AcquireBleMtuConfigEvent. | |
| Result | btmConfigureBleMtu (u32 connection_handle, u16 mtu) |
| ConfigureBleMtu. | |
| Result | btmGetBleMtu (u32 connection_handle, u16 *out) |
| GetBleMtu. | |
| Result | btmRegisterBleGattDataPath (const BtmBleDataPath *path) |
| RegisterBleGattDataPath. | |
| Result | btmUnregisterBleGattDataPath (const BtmBleDataPath *path) |
| UnregisterBleGattDataPath. | |
| Result | btmRegisterAppletResourceUserId (u64 AppletResourceUserId, u32 unk) |
| RegisterAppletResourceUserId. | |
| Result | btmUnregisterAppletResourceUserId (u64 AppletResourceUserId) |
| UnregisterAppletResourceUserId. | |
| Result | btmSetAppletResourceUserId (u64 AppletResourceUserId) |
| SetAppletResourceUserId. | |
btm service IPC wrapper.
| Result btmAddDeviceInfo | ( | const BtmDeviceInfo * | info | ) |
AddDeviceInfo.
| [in] | info | BtmDeviceInfo |
| Result btmBleConnect | ( | BtdrvAddress | addr | ) |
BleConnect.
| [in] | addr | BtdrvAddress |
BleDisconnect.
| [in] | connection_handle | This must match a BtdrvBleConnectionInfo::id from btmBleGetConnectionState. [5.1.0+] 0xFFFFFFFF is invalid. |
| Result btmBleGetConnectionState | ( | BtdrvBleConnectionInfo * | info, |
| u8 | count, | ||
| u8 * | total_out | ||
| ) |
BleGetConnectionState.
| [out] | info | Output array of BtdrvBleConnectionInfo. |
| [in] | count | Size of the info array in entries. Other cmds which use this internally use count=4. |
| [out] | total_out | Total output entries. |
| Result btmBleGetGattClientConditionList | ( | BtmGattClientConditionList * | list | ) |
BleGetGattClientConditionList.
| [out] | list | BtmGattClientConditionList |
| Result btmBleGetPairedAddresses | ( | BtdrvBleAdvertisePacketParameter | param, |
| BtdrvAddress * | addrs, | ||
| u8 | count, | ||
| u8 * | total_out | ||
| ) |
BleGetPairedAddresses.
| [in] | param | BtdrvBleAdvertisePacketParameter |
| [out] | addrs | Output array of BtdrvAddress. |
| [in] | count | Size of the addrs array in entries. |
| [out] | total_out | Total output entries. The max is 10. |
| Result btmBlePairDevice | ( | u32 | connection_handle, |
| BtdrvBleAdvertisePacketParameter | param | ||
| ) |
BlePairDevice.
| [in] | connection_handle | Same as btmBleDisconnect. |
| [in] | param | BtdrvBleAdvertisePacketParameter |
| Result btmBleUnPairDevice | ( | BtdrvAddress | addr, |
| BtdrvBleAdvertisePacketParameter | param | ||
| ) |
BleUnPairDevice.
| [in] | addr | BtdrvAddress |
| [in] | param | BtdrvBleAdvertisePacketParameter |
| Result btmBleUnpairDeviceOnBoth | ( | u32 | connection_handle, |
| BtdrvBleAdvertisePacketParameter | param | ||
| ) |
BleUnpairDeviceOnBoth.
| [in] | connection_handle | Same as btmBleDisconnect. |
| [in] | param | BtdrvBleAdvertisePacketParameter |
ConfigureBleMtu.
| [in] | connection_handle | Same as btmBleDisconnect. |
| [in] | mtu | MTU |
| Result btmEnableSlotSaving | ( | bool | flag | ) |
EnableSlotSaving.
| [in] | flag | Flag |
| Result btmGetBelongingService | ( | u32 | connection_handle, |
| u16 | attribute_handle, | ||
| BtmGattService * | service, | ||
| bool * | flag | ||
| ) |
This is similar to btmGetGattIncludedServices except this only returns 1 BtmGattService.
| [in] | connection_handle | Same as btmBleDisconnect. |
| [in] | attribute_handle | AttributeHandle |
| [out] | service | BtmGattService |
| [out] | flag | Whether a BtmGattService was returned. |
GetBleMtu.
| [in] | connection_handle | Same as btmBleDisconnect. |
| [out] | out | Output MTU. |
| Result btmGetBleScanParameterGeneral | ( | u16 | parameter_id, |
| BtdrvBleAdvertisePacketParameter * | out | ||
| ) |
GetBleScanParameterGeneral.
| [in] | parameter_id | Must be value 0x1 or 0xFFFF. |
| [out] | out | BtdrvBleAdvertisePacketParameter |
| Result btmGetBleScanParameterSmartDevice | ( | u16 | parameter_id, |
| BtdrvGattAttributeUuid * | out | ||
| ) |
GetBleScanParameterSmartDevice.
| [in] | parameter_id | Must be value 0x2. |
| [out] | out | BtdrvGattAttributeUuid. The first 4-bytes is always 0. |
| Result btmGetBleScanResultsForGeneral | ( | BtdrvBleScanResult * | results, |
| u8 | count, | ||
| u8 * | total_out | ||
| ) |
GetBleScanResultsForGeneral.
| [out] | results | Output array of BtdrvBleScanResult. |
| [in] | count | Size of the results array in entries. The max is 10. |
| [out] | total_out | Total output entries. |
| Result btmGetBleScanResultsForSmartDevice | ( | BtdrvBleScanResult * | results, |
| u8 | count, | ||
| u8 * | total_out | ||
| ) |
GetBleScanResultsForSmartDevice.
| [out] | results | Output array of BtdrvBleScanResult. |
| [in] | count | Size of the results array in entries. The max is 10. |
| [out] | total_out | Total output entries. |
| Result btmGetDeviceCondition | ( | BtmProfile | profile, |
| BtmConnectedDeviceV13 * | out, | ||
| size_t | count, | ||
| s32 * | total_out | ||
| ) |
GetDeviceCondition [13.0.0+].
| [in] | profile | BtmProfile, when not BtmProfile_None entries are only returned which match this profile. |
| [out] | out | BtmConnectedDeviceV13 |
| [in] | count | Size of the out array in entries. |
| [out] | total_out | Total output entries. |
| Result btmGetDeviceInfo | ( | BtmProfile | profile, |
| BtmDeviceInfoV13 * | out, | ||
| size_t | count, | ||
| s32 * | total_out | ||
| ) |
GetDeviceInfo [13.0.0+].
| [in] | profile | BtmProfile, when not BtmProfile_None entries are only returned which match this profile. |
| [out] | out | BtmDeviceInfoV13 |
| [in] | count | Size of the out array in entries. |
| [out] | total_out | Total output entries. |
| Result btmGetGattCharacteristics | ( | u32 | connection_handle, |
| u16 | service_handle, | ||
| BtmGattCharacteristic * | characteristics, | ||
| u8 | count, | ||
| u8 * | total_out | ||
| ) |
GetGattCharacteristics.
| [in] | connection_handle | Same as btmBleDisconnect. |
| [in] | service_handle | This controls which BtmGattCharacteristic entries to return. |
| [out] | characteristics | BtmGattCharacteristic |
| [in] | count | Size of the characteristics array in entries. The max is 100. |
| [out] | total_out | Total output entries. |
| Result btmGetGattDescriptors | ( | u32 | connection_handle, |
| u16 | char_handle, | ||
| BtmGattDescriptor * | descriptors, | ||
| u8 | count, | ||
| u8 * | total_out | ||
| ) |
GetGattDescriptors.
| [in] | connection_handle | Same as btmBleDisconnect. |
| [in] | char_handle | Characteristic handle. This controls which BtmGattDescriptor entries to return. |
| [out] | descriptors | BtmGattDescriptor |
| [in] | count | Size of the descriptors array in entries. The max is 100. |
| [out] | total_out | Total output entries. |
| Result btmGetGattIncludedServices | ( | u32 | connection_handle, |
| u16 | service_handle, | ||
| BtmGattService * | services, | ||
| u8 | count, | ||
| u8 * | out | ||
| ) |
Same as btmGetGattServices except this only returns BtmGattService entries where various checks pass with u16 fields.
| [in] | connection_handle | Same as btmBleDisconnect. |
| [in] | service_handle | ServiceHandle |
| [out] | services | BtmGattService |
| [in] | count | Size of the services array in entries. The max is 100. |
| [out] | out | Output value. |
| Result btmGetGattService | ( | u32 | connection_handle, |
| const BtdrvGattAttributeUuid * | uuid, | ||
| BtmGattService * | service, | ||
| bool * | flag | ||
| ) |
Same as btmGetGattServices except this only returns the BtmGattService which matches the input BtdrvGattAttributeUuid.
| [in] | connection_handle | Same as btmBleDisconnect. |
| [in] | uuid | BtdrvGattAttributeUuid |
| [out] | service | BtmGattService |
| [out] | flag | Whether a BtmGattService was returned. |
| Result btmGetGattServices | ( | u32 | connection_handle, |
| BtmGattService * | services, | ||
| u8 | count, | ||
| u8 * | total_out | ||
| ) |
GetGattServices.
| [in] | connection_handle | Same as btmBleDisconnect. |
| [out] | services | Output array of BtmGattService. |
| [in] | count | Size of the services array in entries. The max is 100. |
| [out] | total_out | Total output entries. |
| Result btmGetHostDeviceProperty | ( | BtmHostDeviceProperty * | out | ) |
GetHostDeviceProperty.
| [out] | out | BtmHostDeviceProperty |
| Result btmHidDisconnect | ( | BtdrvAddress | addr | ) |
HidDisconnect.
| [in] | addr | BtdrvAddress |
| Result btmHidSetRetransmissionMode | ( | BtdrvAddress | addr, |
| const BtmZeroRetransmissionList * | list | ||
| ) |
HidSetRetransmissionMode.
| [in] | addr | BtdrvAddress |
| [in] | list | BtmZeroRetransmissionList |
| Result btmIncreaseDeviceInfoOrder | ( | BtdrvAddress | addr | ) |
IncreaseDeviceInfoOrder.
| [in] | addr | BtdrvAddress |
| Result btmIsLlrStarted | ( | bool * | out | ) |
IsLlrStarted.
| [out] | out | Output flag. |
| Result btmLegacyGetDeviceCondition | ( | BtmDeviceCondition * | out | ) |
GetDeviceCondition [1.0.0-12.1.0].
| [out] | out | BtmDeviceCondition |
| Result btmLegacyGetDeviceInfo | ( | BtmDeviceInfoList * | out | ) |
GetDeviceInfo [1.0.0-12.1.0].
| [out] | out | BtmDeviceInfoList |
| Result btmLlrNotify | ( | BtdrvAddress | addr, |
| s32 | unk | ||
| ) |
LlrNotify.
| [in] | addr | BtdrvAddress |
| [in] | unk | [9.0.0+] Unknown |
| Result btmProtectDeviceInfo | ( | BtdrvAddress | addr, |
| bool | flag | ||
| ) |
RegisterAppletResourceUserId.
| [in] | AppletResourceUserId | AppletResourceUserId |
| [in] | unk | Unknown |
| Result btmRegisterBleGattDataPath | ( | const BtmBleDataPath * | path | ) |
| Result btmRemoveDeviceInfo | ( | BtdrvAddress | addr | ) |
RemoveDeviceInfo.
| [in] | addr | BtdrvAddress |
SetAppletResourceUserId.
| [in] | AppletResourceUserId | AppletResourceUserId |
| Result btmSetBluetoothMode | ( | BtmBluetoothMode | mode | ) |
| Result btmSetBurstMode | ( | BtdrvAddress | addr, |
| bool | flag | ||
| ) |
SetBurstMode.
| [in] | addr | BtdrvAddress |
| [in] | flag | Flag |
| Result btmSetSlotMode | ( | const BtmDeviceSlotModeList * | list | ) |
SetSlotMode.
| [in] | list | BtmDeviceSlotModeList |
| Result btmSetWlanMode | ( | BtmWlanMode | mode | ) |
SetWlanMode.
| [in] | mode | BtmWlanMode |
| Result btmStartBleScanForGeneral | ( | BtdrvBleAdvertisePacketParameter | param | ) |
StartBleScanForGeneral.
| [in] | param | BtdrvBleAdvertisePacketParameter |
| Result btmStartBleScanForPaired | ( | BtdrvBleAdvertisePacketParameter | param | ) |
StartBleScanForPaired.
| [in] | param | BtdrvBleAdvertisePacketParameter |
| Result btmStartBleScanForSmartDevice | ( | const BtdrvGattAttributeUuid * | uuid | ) |
StartBleScanForSmartDevice.
| [in] | uuid | BtdrvGattAttributeUuid |
| Result btmStopBleScanForGeneral | ( | void | ) |
StopBleScanForGeneral.
| Result btmStopBleScanForPaired | ( | void | ) |
StopBleScanForPaired.
| Result btmStopBleScanForSmartDevice | ( | void | ) |
StopBleScanForSmartDevice.
UnregisterAppletResourceUserId.
| [in] | AppletResourceUserId | AppletResourceUserId |
| Result btmUnregisterBleGattDataPath | ( | const BtmBleDataPath * | path | ) |