mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
Added hidsysSetNotificationLedPatternWithTimeout. Updated docs with sysver requirements which were previously missing.
This commit is contained in:
parent
2e2d227ac7
commit
a774fb81cc
@ -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.
|
* @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 pattern \ref HidsysNotificationLedPattern
|
||||||
* @param UniquePadId UniquePadId for the controller.
|
* @param UniquePadId UniquePadId for the controller.
|
||||||
*/
|
*/
|
||||||
Result hidsysSetNotificationLedPattern(const HidsysNotificationLedPattern *pattern, u64 UniquePadId);
|
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.
|
* @brief Gets the unique pad's serial number.
|
||||||
|
* @note Only available on [5.0.0+].
|
||||||
* @param UniquePadId UniquePadId for the controller.
|
* @param UniquePadId UniquePadId for the controller.
|
||||||
* @param serial Pointer to output the serial to. (The buffer size needs to be at least 0x19 bytes)
|
* @param serial Pointer to output the serial to. (The buffer size needs to be at least 0x19 bytes)
|
||||||
*/
|
*/
|
||||||
|
@ -146,6 +146,19 @@ Result hidsysSetNotificationLedPattern(const HidsysNotificationLedPattern *patte
|
|||||||
return serviceDispatchIn(&g_hidsysSrv, 830, in);
|
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) {
|
Result hidsysGetUniquePadSerialNumber(u64 UniquePadId, char *serial) {
|
||||||
if (hosversionBefore(5,0,0))
|
if (hosversionBefore(5,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
Loading…
Reference in New Issue
Block a user