Add ACU_GetLastErrorCode && ACU_GetLastDetailErrorCode
This commit is contained in:
parent
52be537b48
commit
8be21732f2
@ -36,3 +36,15 @@ Result ACU_GetSecurityMode(u32 *out);
|
||||
* @param out Pointer to output the current Wifi SSID length to.
|
||||
*/
|
||||
Result ACU_GetSSIDLength(u32 *out);
|
||||
|
||||
/**
|
||||
* @brief Gets the last error to occur during a connection.
|
||||
* @param errorCode Pointer to output the error code to.
|
||||
*/
|
||||
Result ACU_GetLastErrorCode(u32* errorCode);
|
||||
|
||||
/**
|
||||
* @brief Gets the last detailed error to occur during a connection.
|
||||
* @param errorCode Pointer to output the error code to.
|
||||
*/
|
||||
Result ACU_GetLastDetailErrorCode(u32* errorCode);
|
||||
|
@ -92,3 +92,31 @@ Result ACU_GetSSIDLength(u32 *out)
|
||||
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
Result ACU_GetLastErrorCode(u32* errorCode)
|
||||
{
|
||||
Result ret = 0;
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = IPC_MakeHeader(0xA,0,0); // 0xA0000
|
||||
|
||||
if(R_FAILED(ret = svcSendSyncRequest(acHandle)))return ret;
|
||||
|
||||
if(errorCode) *errorCode = cmdbuf[2];
|
||||
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
Result ACU_GetLastDetailErrorCode(u32* errorCode)
|
||||
{
|
||||
Result ret = 0;
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = IPC_MakeHeader(0xB,0,0); // 0xB0000
|
||||
|
||||
if(R_FAILED(ret = svcSendSyncRequest(acHandle)))return ret;
|
||||
|
||||
if(errorCode) *errorCode = cmdbuf[2];
|
||||
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user