fatal: update to use clkrst api on 8.0.0+

This commit is contained in:
Michael Scire
2019-04-24 16:36:35 -07:00
parent d44b91826d
commit 14683405be
3 changed files with 48 additions and 11 deletions

View File

@@ -102,9 +102,16 @@ void __appInit(void) {
std::abort();
}
rc = pcvInitialize();
if (R_FAILED(rc)) {
std::abort();
if (GetRuntimeFirmwareVersion() >= FirmwareVersion_800) {
rc = clkrstInitialize();
if (R_FAILED(rc)) {
std::abort();
}
} else {
rc = pcvInitialize();
if (R_FAILED(rc)) {
std::abort();
}
}
rc = lblInitialize();
@@ -155,7 +162,11 @@ void __appExit(void) {
spsmExit();
psmExit();
lblExit();
pcvExit();
if (GetRuntimeFirmwareVersion() >= FirmwareVersion_800) {
clkrstExit();
} else {
pcvExit();
}
bpcExit();
i2cExit();
pminfoExit();