diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2020-05-10 15:18:26 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2020-05-10 15:18:26 -0400 |
commit | 66506824a796f28e9d926077024d319fa67d3aaf (patch) | |
tree | cd6e3643fac8506da97b9c3a553d364fefe2605a | |
parent | d6dcf8bf6522ccd5cacac774d57657cd1da313c1 (diff) |
SDK declaration of PM_GetBackLight
-rw-r--r-- | arm9/lib/include/SPI_pm.h | 16 | ||||
-rw-r--r-- | arm9/src/main.c | 5 | ||||
-rw-r--r-- | include/main.h | 6 |
3 files changed, 22 insertions, 5 deletions
diff --git a/arm9/lib/include/SPI_pm.h b/arm9/lib/include/SPI_pm.h new file mode 100644 index 00000000..1cf37f02 --- /dev/null +++ b/arm9/lib/include/SPI_pm.h @@ -0,0 +1,16 @@ +#ifndef NITRO_SPI_PM_H_ +#define NITRO_SPI_PM_H_ + +ENUMS_ALWAYS_INT_ON + +typedef enum +{ + PM_BACKLIGHT_OFF = 0, + PM_BACKLIGHT_ON = 1 +} PMBackLightSwitch; + +void PM_GetBackLight(PMBackLightSwitch * top, PMBackLightSwitch * bottom); + +ENUMS_ALWAYS_INT_RESET + +#endif //NITRO_SPI_PM_H_ diff --git a/arm9/src/main.c b/arm9/src/main.c index ea752438..527cd97e 100644 --- a/arm9/src/main.c +++ b/arm9/src/main.c @@ -7,8 +7,6 @@ FS_EXTERN_OVERLAY(MODULE_63); #define SOFT_RESET_KEY (REG_PAD_KEYINPUT_L_MASK | REG_PAD_KEYINPUT_R_MASK | REG_PAD_KEYINPUT_START_MASK | REG_PAD_KEYINPUT_SEL_MASK) -extern struct Unk2106FA0 gBacklightTop; -extern struct Unk2106FA0 gBacklightTop_2; // same as the first one, it's referenced twice in the constant pool... extern struct Unk21C48B8 gUnknown21C48B8; extern struct { @@ -17,7 +15,6 @@ extern struct { u8 unk8; } gUnk021C4918; -extern void PM_GetBackLight(); extern void OS_WaitIrq(); extern void FUN_02016438(s32); extern void InitSystemForTheGame(void); @@ -67,7 +64,7 @@ THUMB_FUNC void NitroMain(void) FUN_020163BC(); FUN_02016438(0); - PM_GetBackLight(&gBacklightTop_2, 0); + PM_GetBackLight(&gBacklightTop_2.unk0, NULL); FUN_02022294(); FUN_0201259C(); diff --git a/include/main.h b/include/main.h index 57cc5fef..da8d7921 100644 --- a/include/main.h +++ b/include/main.h @@ -2,6 +2,7 @@ #define GUARD_MAIN_H #include "FS_overlay.h" +#include "SPI_pm.h" struct Unk21DBE18 { @@ -10,7 +11,7 @@ struct Unk21DBE18 struct Unk2106FA0 { - s32 unk0; + PMBackLightSwitch unk0; s32 unk4; s32 unk8; s32 unkC; @@ -44,4 +45,7 @@ struct Unk21C48B8 s32 unk6C; }; +extern struct Unk2106FA0 gBacklightTop; +extern struct Unk2106FA0 gBacklightTop_2; // same as the first one, it's referenced twice in the constant pool... + #endif //GUARD_MAIN_H |