btdrv/btm: Updated/added various structs.

This commit is contained in:
yellows8 2020-08-16 18:34:24 -04:00
parent 4db3c621e8
commit 4fae8554f7
4 changed files with 50 additions and 10 deletions

View File

@ -115,7 +115,7 @@ Result btLeSendIndication(u8 unk, bool flag, const BtdrvGattAttributeUuid *uuid0
* @brief GetLeEventInfo * @brief GetLeEventInfo
* @note This is identical to \ref btdrvGetLeHidEventInfo except different state is used. * @note This is identical to \ref btdrvGetLeHidEventInfo except different state is used.
* @note The state used by this is reset after writing the data to output. * @note The state used by this is reset after writing the data to output.
* @param[in] buffer Output buffer. 0x400-bytes from state is written here. * @param[in] buffer Output buffer. 0x400-bytes from state is written here. See \ref BtdrvLeEventInfo.
* @param[in] size Output buffer size. * @param[in] size Output buffer size.
* @oaram[out] type Output BleEventType. * @oaram[out] type Output BleEventType.
*/ */

View File

@ -932,7 +932,7 @@ Result btdrvUnregisterGattNotification(bool flag, u32 unk, const BtdrvGattId *id
* @brief GetLeHidEventInfo * @brief GetLeHidEventInfo
* @note Only available on [5.0.0+]. * @note Only available on [5.0.0+].
* @note The state used by this is reset after writing the data to output. * @note The state used by this is reset after writing the data to output.
* @param[out] buffer Output buffer. 0x400-bytes from state is written here. * @param[out] buffer Output buffer. 0x400-bytes from state is written here. See \ref BtdrvLeEventInfo.
* @param[in] size Output buffer size. * @param[in] size Output buffer size.
* @oaram[out] type Output BleEventType. * @oaram[out] type Output BleEventType.
*/ */

View File

@ -135,7 +135,8 @@ typedef struct {
/// BleScanResult /// BleScanResult
typedef struct { typedef struct {
u8 unk_x0[0x148]; ///< Unknown u8 unk_x0[0x144]; ///< Unknown
s32 unk_x144; ///< Unknown
} BtdrvBleScanResult; } BtdrvBleScanResult;
/// BleConnectionInfo /// BleConnectionInfo
@ -153,6 +154,35 @@ typedef struct {
/// GattId /// GattId
typedef struct { typedef struct {
u8 unk_x0[0x18]; ///< Unknown u8 instance_id; ///< InstanceId
u8 pad[3]; ///< Padding
BtdrvGattAttributeUuid uuid; ///< \ref BtdrvGattAttributeUuid
} BtdrvGattId; } BtdrvGattId;
/// LeEventInfo
typedef struct {
u32 unk_x0; ///< Unknown
u32 unk_x4; ///< Unknown
u8 unk_x8; ///< Unknown
u8 pad[3]; ///< Padding
BtdrvGattAttributeUuid uuid0; ///< \ref BtdrvGattAttributeUuid
BtdrvGattAttributeUuid uuid1; ///< \ref BtdrvGattAttributeUuid
BtdrvGattAttributeUuid uuid2; ///< \ref BtdrvGattAttributeUuid
u16 size; ///< Size of the below data.
u8 data[0x3B6]; ///< Data.
} BtdrvLeEventInfo;
/// BleClientGattOperationInfo
typedef struct {
u8 unk_x0; ///< Converted from BtdrvLeEventInfo::unk_x0.
u8 pad[3]; ///< Padding
u32 unk_x4; ///< BtdrvLeEventInfo::unk_x4
u8 unk_x8; ///< BtdrvLeEventInfo::unk_x8
u8 pad2[3]; ///< Padding
BtdrvGattAttributeUuid uuid0; ///< BtdrvLeEventInfo::uuid0
BtdrvGattAttributeUuid uuid1; ///< BtdrvLeEventInfo::uuid1
BtdrvGattAttributeUuid uuid2; ///< BtdrvLeEventInfo::uuid2
u64 size; ///< BtdrvLeEventInfo::size
u8 data[0x200]; ///< BtdrvLeEventInfo::data
} BtdrvBleClientGattOperationInfo;

View File

@ -53,21 +53,31 @@ typedef struct {
typedef struct { typedef struct {
u8 unk_x0[0x4]; ///< Unknown u8 unk_x0[0x4]; ///< Unknown
BtdrvGattAttributeUuid uuid; ///< \ref BtdrvGattAttributeUuid BtdrvGattAttributeUuid uuid; ///< \ref BtdrvGattAttributeUuid
u16 unk_x18; ///< Unknown u16 handle; ///< Handle
u8 unk_x1A[0x4]; ///< Unknown u8 unk_x1A[0x2]; ///< Unknown
u16 unk_x1E; ///< Unknown u16 instance_id; ///< InstanceId
u8 unk_x20; ///< Unknown u16 end_group_handle; ///< EndGroupHandle
u8 primary_service; ///< PrimaryService
u8 pad[3]; ///< Padding u8 pad[3]; ///< Padding
} BtmGattService; } BtmGattService;
/// GattCharacteristic /// GattCharacteristic
typedef struct { typedef struct {
u8 unk_x0[0x24]; ///< Unknown u8 unk_x0[0x4]; ///< Unknown
BtdrvGattAttributeUuid uuid; ///< \ref BtdrvGattAttributeUuid
u16 handle; ///< Handle
u8 unk_x1A[0x2]; ///< Unknown
u16 instance_id; ///< InstanceId
u8 properties; ///< Properties
u8 unk_x1F[0x5]; ///< Unknown
} BtmGattCharacteristic; } BtmGattCharacteristic;
/// GattDescriptor /// GattDescriptor
typedef struct { typedef struct {
u8 unk_x0[0x20]; ///< Unknown u8 unk_x0[0x4]; ///< Unknown
BtdrvGattAttributeUuid uuid; ///< \ref BtdrvGattAttributeUuid
u16 handle; ///< Handle
u8 unk_x1A[0x6]; ///< Unknown
} BtmGattDescriptor; } BtmGattDescriptor;
/// BleDataPath /// BleDataPath