mirror of
https://github.com/joel16/3DSident.git
synced 2024-11-23 03:29:45 +00:00
cf84991672
- Cleaned up a bunch of functions - Now builds with the latest toolchain. - GUI uses Citro2D.
30 lines
539 B
C
30 lines
539 B
C
#include "am.h"
|
|
|
|
static Handle amHandle;
|
|
|
|
Result amGetServiceHandle(void)
|
|
{
|
|
return srvGetServiceHandle(&amHandle, "am:net");
|
|
}
|
|
|
|
Result amCloseServiceHandle(void)
|
|
{
|
|
return svcCloseHandle(amHandle);
|
|
}
|
|
|
|
Result amNetGetDeviceCert(u8 const * buffer)
|
|
{
|
|
Result ret = 0;
|
|
u32 *cmdbuf = getThreadCommandBuffer();
|
|
|
|
cmdbuf[0] = IPC_MakeHeader(0x818, 1, 2); // 0x08180042
|
|
cmdbuf[1] = 0x180;
|
|
cmdbuf[2] = (0x180 << 4) | 0xC;
|
|
cmdbuf[3] = (u32)buffer;
|
|
|
|
if(R_FAILED(ret = svcSendSyncRequest(amHandle)))
|
|
return ret;
|
|
|
|
return (Result)cmdbuf[1];
|
|
}
|