Added hidsysSetNotificationLedPatternWithTimeout. Updated docs with sysver requirements which were previously missing.

This commit is contained in:
yellows8 2019-10-19 19:51:51 -04:00
parent 2e2d227ac7
commit a774fb81cc
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 25 additions and 0 deletions

View File

@ -110,13 +110,25 @@ Result hidsysGetUniquePadIds(u64 *UniquePadIds, s32 count, s32 *total_entries);
/**
* @brief Sets the HOME-button notification LED pattern, for the specified controller.
* @note Generally this should only be used if \ref hidsysSetNotificationLedPatternWithTimeout is not usable.
* @note Only available on [7.0.0+].
* @param pattern \ref HidsysNotificationLedPattern
* @param UniquePadId UniquePadId for the controller.
*/
Result hidsysSetNotificationLedPattern(const HidsysNotificationLedPattern *pattern, u64 UniquePadId);
/**
* @brief Sets the HOME-button notification LED pattern, for the specified controller. The LED will automatically be disabled once the specified timeout occurs.
* @note Only available on [9.0.0+], and with controllers which have the [9.0.0+] firmware installed.
* @param[in] pattern \ref HidsysNotificationLedPattern
* @param[in] UniquePadId UniquePadId for the controller.
* @param[in] timeout Timeout in nanoseconds.
*/
Result hidsysSetNotificationLedPatternWithTimeout(const HidsysNotificationLedPattern *pattern, u64 UniquePadId, u64 timeout);
/**
* @brief Gets the unique pad's serial number.
* @note Only available on [5.0.0+].
* @param UniquePadId UniquePadId for the controller.
* @param serial Pointer to output the serial to. (The buffer size needs to be at least 0x19 bytes)
*/

View File

@ -146,6 +146,19 @@ Result hidsysSetNotificationLedPattern(const HidsysNotificationLedPattern *patte
return serviceDispatchIn(&g_hidsysSrv, 830, in);
}
Result hidsysSetNotificationLedPatternWithTimeout(const HidsysNotificationLedPattern *pattern, u64 UniquePadId, u64 timeout) {
if (hosversionBefore(9,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
const struct {
HidsysNotificationLedPattern pattern;
u64 UniquePadId;
u64 timeout;
} in = { *pattern, UniquePadId, timeout };
return serviceDispatchIn(&g_hidsysSrv, 831, in);
}
Result hidsysGetUniquePadSerialNumber(u64 UniquePadId, char *serial) {
if (hosversionBefore(5,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);