修改编译错误

This commit is contained in:
a92126 2024-10-02 22:07:21 +08:00
parent 2a1dc303a3
commit 64f64ffc42
4 changed files with 12 additions and 12 deletions

View File

@ -38,7 +38,7 @@ enum
const char* oafResult2String(Result res);
#ifdef ARM11
#ifdef __ARM11__
void printError(Result res);
void printErrorWaitInput(Result res, u32 waitKeys);
#endif // ifdef ARM11
#endif // ifdef __ARM11__

View File

@ -1,7 +1,7 @@
#pragma once
#include <stddef.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C"

View File

@ -19,10 +19,10 @@
#include "types.h"
#include "ipc_handler.h"
#include "drivers/pxi.h"
#ifdef ARM9
#ifdef __ARM9__
#include "arm9/drivers/interrupt.h"
#include "arm9/drivers/ndma.h"
#elif ARM11
#elif __ARM11__
#include "arm11/fmt.h"
#include "arm11/drivers/interrupt.h"
#endif
@ -35,23 +35,23 @@ noreturn void __fb_assert(const char *const str, u32 line)
{
enterCriticalSection();
#ifdef ARM9
#ifdef __ARM9__
// Get rid of the warnings.
(void)str;
(void)line;
PXI_sendCmd(IPC_CMD11_PANIC, NULL, 0);
#elif ARM11
#elif __ARM11__
ee_printf("Assertion failed: %s:%" PRIu32, str, line);
//PXI_sendCmd(IPC_CMD9_PANIC, NULL, 0);
#endif
while(1)
{
#ifdef ARM9
#ifdef __ARM9__
const u32 color = RGB8_to_565(0, 0, 255)<<16 | RGB8_to_565(0, 0, 255);
NDMA_fill((u32*)FRAMEBUF_BOT_A_1, color, SCREEN_SIZE_BOT);
NDMA_fill((u32*)FRAMEBUF_BOT_A_2, color, SCREEN_SIZE_BOT);
#elif ARM11
#elif __ARM11__
__wfi();
#endif
}

View File

@ -18,7 +18,7 @@
#include "oaf_error_codes.h"
#include "drivers/gfx.h"
#ifdef ARM11
#ifdef __ARM11__
#include "arm11/fmt.h"
#include "arm11/drivers/hid.h"
#endif
@ -36,7 +36,7 @@ const char* oafResult2String(Result res)
return (res < CUSTOM_ERR_OFFSET ? result2String(res) : oafResultStrings[res - CUSTOM_ERR_OFFSET]);
}
#ifdef ARM11
#ifdef __ARM11__
void printError(Result res)
{
// @MERGE 231006 START
@ -65,4 +65,4 @@ void printErrorWaitInput(Result res, u32 waitKeys)
if(hidGetExtraKeys(0) & (KEY_POWER_HELD | KEY_POWER)) break;
}
}
#endif // ifdef ARM11
#endif // ifdef __ARM11__