btm: Updated structs/params for 13.0.0.

This commit is contained in:
yellows8 2021-09-25 11:00:52 -04:00
parent b5714296d6
commit c6dcbdfffb
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
3 changed files with 13 additions and 11 deletions

View File

@ -47,12 +47,12 @@ Result btmLegacyGetDeviceCondition(BtmDeviceCondition *out);
/**
* @brief GetDeviceCondition [13.0.0+]
* @param[in] id Id
* @param[in] profile \ref BtmProfile, when not ::BtmProfile_None entries are only returned which match this profile.
* @param[out] out \ref BtmConnectedDeviceV13
* @param[in] count Size of the out array in entries.
* @param[out] total_out Total output entries.
*/
Result btmGetDeviceCondition(u32 id, BtmConnectedDeviceV13 *out, size_t count, s32 *total_out);
Result btmGetDeviceCondition(BtmProfile profile, BtmConnectedDeviceV13 *out, size_t count, s32 *total_out);
/**
* @brief SetBurstMode
@ -95,12 +95,12 @@ Result btmLegacyGetDeviceInfo(BtmDeviceInfoList *out);
/**
* @brief GetDeviceInfo [13.0.0+]
* @param[in] id Id
* @param[in] profile \ref BtmProfile, when not ::BtmProfile_None entries are only returned which match this profile.
* @param[out] out \ref BtmDeviceInfoV13
* @param[in] count Size of the out array in entries.
* @param[out] total_out Total output entries.
*/
Result btmGetDeviceInfo(u32 id, BtmDeviceInfoV13 *out, size_t count, s32 *total_out);
Result btmGetDeviceInfo(BtmProfile profile, BtmDeviceInfoV13 *out, size_t count, s32 *total_out);
/**
* @brief AddDeviceInfo

View File

@ -118,10 +118,11 @@ typedef struct {
typedef struct {
BtdrvAddress address;
u8 pad[2];
u32 unk_x8;
u32 profile; ///< \ref BtmProfile
u8 unk_xC[0x40];
char name[0x20];
u8 unk_x6C[0xdc];
u8 unk_x6C[0xD9];
u8 pad2[3];
} BtmConnectedDeviceV13;
/// DeviceCondition [1.0.0-5.0.2]
@ -217,7 +218,8 @@ typedef struct {
BtmHidDeviceInfo hid_device_info; ///< \ref BtmHidDeviceInfo (Profile = Hid)
} profile_info;
u8 reserved2[0x1C]; ///< Reserved
char name[0xFC]; ///< Name
char name[0xF9]; ///< Name
u8 pad[3]; ///< Padding
} BtmDeviceInfoV13;
/// DeviceInfo [1.0.0-13.0.0]

View File

@ -178,11 +178,11 @@ Result btmLegacyGetDeviceCondition(BtmDeviceCondition *out) {
return _btmCmdOutBufPtrFixed(out, buff_size, 3);
}
Result btmGetDeviceCondition(u32 id, BtmConnectedDeviceV13 *out, size_t count, s32 *total_out) {
Result btmGetDeviceCondition(BtmProfile profile, BtmConnectedDeviceV13 *out, size_t count, s32 *total_out) {
if (hosversionBefore(13,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _btmCmdInIdOutBufPtr(id, out, sizeof(BtmConnectedDeviceV13)*count, total_out, 3);
return _btmCmdInIdOutBufPtr(profile, out, sizeof(BtmConnectedDeviceV13)*count, total_out, 3);
}
Result btmSetBurstMode(BtdrvAddress addr, bool flag) {
@ -215,11 +215,11 @@ Result btmLegacyGetDeviceInfo(BtmDeviceInfoList *out) {
return _btmCmdOutBufPtrFixed(out, sizeof(*out), 9);
}
Result btmGetDeviceInfo(u32 id, BtmDeviceInfoV13 *out, size_t count, s32 *total_out) {
Result btmGetDeviceInfo(BtmProfile profile, BtmDeviceInfoV13 *out, size_t count, s32 *total_out) {
if (hosversionBefore(13,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _btmCmdInIdOutBufPtr(id, out, sizeof(BtmDeviceInfoV13)*count, total_out, 9);
return _btmCmdInIdOutBufPtr(profile, out, sizeof(BtmDeviceInfoV13)*count, total_out, 9);
}
Result btmAddDeviceInfo(const BtmDeviceInfo *info) {