mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
btm: Updated structs/params for 13.0.0.
This commit is contained in:
parent
b5714296d6
commit
c6dcbdfffb
@ -47,12 +47,12 @@ Result btmLegacyGetDeviceCondition(BtmDeviceCondition *out);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief GetDeviceCondition [13.0.0+]
|
* @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[out] out \ref BtmConnectedDeviceV13
|
||||||
* @param[in] count Size of the out array in entries.
|
* @param[in] count Size of the out array in entries.
|
||||||
* @param[out] total_out Total output 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
|
* @brief SetBurstMode
|
||||||
@ -95,12 +95,12 @@ Result btmLegacyGetDeviceInfo(BtmDeviceInfoList *out);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief GetDeviceInfo [13.0.0+]
|
* @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[out] out \ref BtmDeviceInfoV13
|
||||||
* @param[in] count Size of the out array in entries.
|
* @param[in] count Size of the out array in entries.
|
||||||
* @param[out] total_out Total output 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
|
* @brief AddDeviceInfo
|
||||||
|
@ -118,10 +118,11 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
BtdrvAddress address;
|
BtdrvAddress address;
|
||||||
u8 pad[2];
|
u8 pad[2];
|
||||||
u32 unk_x8;
|
u32 profile; ///< \ref BtmProfile
|
||||||
u8 unk_xC[0x40];
|
u8 unk_xC[0x40];
|
||||||
char name[0x20];
|
char name[0x20];
|
||||||
u8 unk_x6C[0xdc];
|
u8 unk_x6C[0xD9];
|
||||||
|
u8 pad2[3];
|
||||||
} BtmConnectedDeviceV13;
|
} BtmConnectedDeviceV13;
|
||||||
|
|
||||||
/// DeviceCondition [1.0.0-5.0.2]
|
/// DeviceCondition [1.0.0-5.0.2]
|
||||||
@ -217,7 +218,8 @@ typedef struct {
|
|||||||
BtmHidDeviceInfo hid_device_info; ///< \ref BtmHidDeviceInfo (Profile = Hid)
|
BtmHidDeviceInfo hid_device_info; ///< \ref BtmHidDeviceInfo (Profile = Hid)
|
||||||
} profile_info;
|
} profile_info;
|
||||||
u8 reserved2[0x1C]; ///< Reserved
|
u8 reserved2[0x1C]; ///< Reserved
|
||||||
char name[0xFC]; ///< Name
|
char name[0xF9]; ///< Name
|
||||||
|
u8 pad[3]; ///< Padding
|
||||||
} BtmDeviceInfoV13;
|
} BtmDeviceInfoV13;
|
||||||
|
|
||||||
/// DeviceInfo [1.0.0-13.0.0]
|
/// DeviceInfo [1.0.0-13.0.0]
|
||||||
|
@ -178,11 +178,11 @@ Result btmLegacyGetDeviceCondition(BtmDeviceCondition *out) {
|
|||||||
return _btmCmdOutBufPtrFixed(out, buff_size, 3);
|
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))
|
if (hosversionBefore(13,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
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) {
|
Result btmSetBurstMode(BtdrvAddress addr, bool flag) {
|
||||||
@ -215,11 +215,11 @@ Result btmLegacyGetDeviceInfo(BtmDeviceInfoList *out) {
|
|||||||
return _btmCmdOutBufPtrFixed(out, sizeof(*out), 9);
|
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))
|
if (hosversionBefore(13,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
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) {
|
Result btmAddDeviceInfo(const BtmDeviceInfo *info) {
|
||||||
|
Loading…
Reference in New Issue
Block a user