From d3768d4fe8d1621ca7554f4ef8a6eb6ff410e590 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 14 May 2015 21:30:39 -0400 Subject: [PATCH] Get rid of missing prototype warnings --- source/gamecart/command_ntr.c | 6 +++--- source/gamecart/command_ntr.h | 6 +++--- source/gamecart/protocol.c | 16 ++++++++-------- source/gamecart/protocol.h | 6 +++--- source/hid.c | 2 +- source/hid.h | 2 +- source/main.c | 4 ++-- source/platform.c | 2 +- source/platform.h | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/source/gamecart/command_ntr.c b/source/gamecart/command_ntr.c index 4d31b49..2c27b1f 100644 --- a/source/gamecart/command_ntr.c +++ b/source/gamecart/command_ntr.c @@ -6,13 +6,13 @@ #include "protocol_ntr.h" -void NTR_CmdReset() +void NTR_CmdReset(void) { static const u32 reset_cmd[2] = { 0x9F000000, 0x00000000 }; NTR_SendCommand(reset_cmd, 0x2000, NTRCARD_CLK_SLOW | NTRCARD_DELAY1(0x1FFF) | NTRCARD_DELAY2(0x18), NULL); } -int NTR_CmdGetCartId() +int NTR_CmdGetCartId(void) { int id; static const u32 getid_cmd[2] = { 0x90000000, 0x00000000 }; @@ -20,7 +20,7 @@ int NTR_CmdGetCartId() return id; } -void NTR_CmdEnter16ByteMode() +void NTR_CmdEnter16ByteMode(void) { static const u32 enter16bytemode_cmd[2] = { 0x3E000000, 0x00000000 }; NTR_SendCommand(enter16bytemode_cmd, 0x0, 0, NULL); diff --git a/source/gamecart/command_ntr.h b/source/gamecart/command_ntr.h index 20aae6f..7c5459f 100644 --- a/source/gamecart/command_ntr.h +++ b/source/gamecart/command_ntr.h @@ -6,6 +6,6 @@ #include "common.h" -void NTR_CmdReset(); -int NTR_CmdGetCartId(); -void NTR_CmdEnter16ByteMode(); +void NTR_CmdReset(void); +int NTR_CmdGetCartId(void); +void NTR_CmdEnter16ByteMode(void); diff --git a/source/gamecart/protocol.c b/source/gamecart/protocol.c index 6cf6aaa..eb17c35 100644 --- a/source/gamecart/protocol.c +++ b/source/gamecart/protocol.c @@ -33,7 +33,7 @@ u32 BSWAP32(u32 val) { } // TODO: Verify -void ResetCartSlot() +static void ResetCartSlot(void) { REG_CARDCONF2 = 0x0C; REG_CARDCONF &= ~3; @@ -52,7 +52,7 @@ void ResetCartSlot() while(REG_CARDCONF2 != 0x8); } -void SwitchToNTRCARD() +static void SwitchToNTRCARD(void) { REG_NTRCARDROMCNT = 0x20000000; REG_CARDCONF &= ~3; @@ -60,23 +60,23 @@ void SwitchToNTRCARD() REG_NTRCARDMCNT = NTRCARD_CR1_ENABLE; } -void SwitchToCTRCARD() +static void SwitchToCTRCARD(void) { REG_CTRCARDCNT = 0x10000000; REG_CARDCONF = (REG_CARDCONF & ~3) | 2; } -int Cart_IsInserted() +int Cart_IsInserted(void) { return (0x9000E2C2 == CTR_CmdGetSecureId(rand1, rand2) ); } -u32 Cart_GetID() +u32 Cart_GetID(void) { return CartID; } -void Cart_Init() +void Cart_Init(void) { ResetCartSlot(); //Seems to reset the cart slot? @@ -112,7 +112,7 @@ void Cart_Init() } //returns 1 if MAC valid otherwise 0 -u8 card_aes(u32 *out, u32 *buff, size_t size) { // note size param ignored +static u8 card_aes(u32 *out, u32 *buff, size_t size) { // note size param ignored u8 tmp = REG_AESKEYCNT; REG_AESCNT |= 0x2800000; REG_AESCTR[0] = buff[14]; @@ -146,7 +146,7 @@ u8 card_aes(u32 *out, u32 *buff, size_t size) { // note size param ignored return ((REG_AESCNT >> 21) & 1); } -void AES_SetKeyControl(u32 a) { +static void AES_SetKeyControl(u32 a) { *((volatile u8*)0x10009011) = a | 0x80; } diff --git a/source/gamecart/protocol.h b/source/gamecart/protocol.h index c528580..f65c864 100644 --- a/source/gamecart/protocol.h +++ b/source/gamecart/protocol.h @@ -18,7 +18,7 @@ u32 BSWAP32(u32 val); -void Cart_Init(); -int Cart_IsInserted(); -u32 Cart_GetID(); +void Cart_Init(void); +int Cart_IsInserted(void); +u32 Cart_GetID(void); void Cart_Secure_Init(u32* buf, u32* out); diff --git a/source/hid.c b/source/hid.c index 5d32155..e0f5ffa 100644 --- a/source/hid.c +++ b/source/hid.c @@ -1,6 +1,6 @@ #include "hid.h" -u32 InputWait() { +u32 InputWait(void) { u32 pad_state_old = HID_STATE; while (true) { u32 pad_state = HID_STATE; diff --git a/source/hid.h b/source/hid.h index 2c07643..f10db9e 100644 --- a/source/hid.h +++ b/source/hid.h @@ -17,4 +17,4 @@ #define BUTTON_X (1 << 10) #define BUTTON_Y (1 << 11) -u32 InputWait(); +u32 InputWait(void); diff --git a/source/main.c b/source/main.c index 9807b3e..fb4bf63 100644 --- a/source/main.c +++ b/source/main.c @@ -15,13 +15,13 @@ extern s32 CartID2; static FATFS fs; static FIL file; -void ClearTop() { +static void ClearTop(void) { ClearScreen(TOP_SCREEN0, RGB(255, 255, 255)); ClearScreen(TOP_SCREEN1, RGB(255, 255, 255)); current_y = 0; } -void wait_key() { +static void wait_key(void) { Debug(""); Debug("Press key to continue"); InputWait(); diff --git a/source/platform.c b/source/platform.c index b56ef46..d060177 100644 --- a/source/platform.c +++ b/source/platform.c @@ -3,7 +3,7 @@ #define CONFIG_PLATFORM_REG ((volatile u32*)0x10140FFC) -Platform GetUnitPlatform() +Platform GetUnitPlatform(void) { switch (*CONFIG_PLATFORM_REG) { case 7: diff --git a/source/platform.h b/source/platform.h index ce04df1..42e792d 100644 --- a/source/platform.h +++ b/source/platform.h @@ -5,4 +5,4 @@ typedef enum { PLATFORM_N3DS, } Platform; -Platform GetUnitPlatform(); +Platform GetUnitPlatform(void);