mirror of
https://github.com/joel16/3DSident.git
synced 2024-11-23 11:39:43 +00:00
827f1772d2
Removed ir:u service because it isn't required in this program. Besides I had to make room for mcu::HWC. I also forgot to mention I got the ACTU functions from MrCheeze. Many thanks to him.
21 lines
377 B
C
21 lines
377 B
C
#include "mcu.h"
|
|
|
|
Result mcuInit()
|
|
{
|
|
return srvGetServiceHandle(&mcuhwcHandle, "mcu::HWC");
|
|
}
|
|
|
|
Result mcuExit()
|
|
{
|
|
return svcCloseHandle(mcuhwcHandle);
|
|
}
|
|
|
|
Result mcuGetBatteryLevel(u8* out)
|
|
{
|
|
u32* ipc = getThreadCommandBuffer();
|
|
ipc[0] = 0x50000;
|
|
Result ret = svcSendSyncRequest(mcuhwcHandle);
|
|
if(ret < 0) return ret;
|
|
*out = ipc[2];
|
|
return ipc[1];
|
|
} |