Get rid of missing prototype warnings

This commit is contained in:
Lioncash 2015-05-14 21:30:39 -04:00
parent 24014cd41f
commit d3768d4fe8
9 changed files with 23 additions and 23 deletions

View File

@ -6,13 +6,13 @@
#include "protocol_ntr.h" #include "protocol_ntr.h"
void NTR_CmdReset() void NTR_CmdReset(void)
{ {
static const u32 reset_cmd[2] = { 0x9F000000, 0x00000000 }; static const u32 reset_cmd[2] = { 0x9F000000, 0x00000000 };
NTR_SendCommand(reset_cmd, 0x2000, NTRCARD_CLK_SLOW | NTRCARD_DELAY1(0x1FFF) | NTRCARD_DELAY2(0x18), NULL); NTR_SendCommand(reset_cmd, 0x2000, NTRCARD_CLK_SLOW | NTRCARD_DELAY1(0x1FFF) | NTRCARD_DELAY2(0x18), NULL);
} }
int NTR_CmdGetCartId() int NTR_CmdGetCartId(void)
{ {
int id; int id;
static const u32 getid_cmd[2] = { 0x90000000, 0x00000000 }; static const u32 getid_cmd[2] = { 0x90000000, 0x00000000 };
@ -20,7 +20,7 @@ int NTR_CmdGetCartId()
return id; return id;
} }
void NTR_CmdEnter16ByteMode() void NTR_CmdEnter16ByteMode(void)
{ {
static const u32 enter16bytemode_cmd[2] = { 0x3E000000, 0x00000000 }; static const u32 enter16bytemode_cmd[2] = { 0x3E000000, 0x00000000 };
NTR_SendCommand(enter16bytemode_cmd, 0x0, 0, NULL); NTR_SendCommand(enter16bytemode_cmd, 0x0, 0, NULL);

View File

@ -6,6 +6,6 @@
#include "common.h" #include "common.h"
void NTR_CmdReset(); void NTR_CmdReset(void);
int NTR_CmdGetCartId(); int NTR_CmdGetCartId(void);
void NTR_CmdEnter16ByteMode(); void NTR_CmdEnter16ByteMode(void);

View File

@ -33,7 +33,7 @@ u32 BSWAP32(u32 val) {
} }
// TODO: Verify // TODO: Verify
void ResetCartSlot() static void ResetCartSlot(void)
{ {
REG_CARDCONF2 = 0x0C; REG_CARDCONF2 = 0x0C;
REG_CARDCONF &= ~3; REG_CARDCONF &= ~3;
@ -52,7 +52,7 @@ void ResetCartSlot()
while(REG_CARDCONF2 != 0x8); while(REG_CARDCONF2 != 0x8);
} }
void SwitchToNTRCARD() static void SwitchToNTRCARD(void)
{ {
REG_NTRCARDROMCNT = 0x20000000; REG_NTRCARDROMCNT = 0x20000000;
REG_CARDCONF &= ~3; REG_CARDCONF &= ~3;
@ -60,23 +60,23 @@ void SwitchToNTRCARD()
REG_NTRCARDMCNT = NTRCARD_CR1_ENABLE; REG_NTRCARDMCNT = NTRCARD_CR1_ENABLE;
} }
void SwitchToCTRCARD() static void SwitchToCTRCARD(void)
{ {
REG_CTRCARDCNT = 0x10000000; REG_CTRCARDCNT = 0x10000000;
REG_CARDCONF = (REG_CARDCONF & ~3) | 2; REG_CARDCONF = (REG_CARDCONF & ~3) | 2;
} }
int Cart_IsInserted() int Cart_IsInserted(void)
{ {
return (0x9000E2C2 == CTR_CmdGetSecureId(rand1, rand2) ); return (0x9000E2C2 == CTR_CmdGetSecureId(rand1, rand2) );
} }
u32 Cart_GetID() u32 Cart_GetID(void)
{ {
return CartID; return CartID;
} }
void Cart_Init() void Cart_Init(void)
{ {
ResetCartSlot(); //Seems to reset the cart slot? ResetCartSlot(); //Seems to reset the cart slot?
@ -112,7 +112,7 @@ void Cart_Init()
} }
//returns 1 if MAC valid otherwise 0 //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; u8 tmp = REG_AESKEYCNT;
REG_AESCNT |= 0x2800000; REG_AESCNT |= 0x2800000;
REG_AESCTR[0] = buff[14]; 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); return ((REG_AESCNT >> 21) & 1);
} }
void AES_SetKeyControl(u32 a) { static void AES_SetKeyControl(u32 a) {
*((volatile u8*)0x10009011) = a | 0x80; *((volatile u8*)0x10009011) = a | 0x80;
} }

View File

@ -18,7 +18,7 @@
u32 BSWAP32(u32 val); u32 BSWAP32(u32 val);
void Cart_Init(); void Cart_Init(void);
int Cart_IsInserted(); int Cart_IsInserted(void);
u32 Cart_GetID(); u32 Cart_GetID(void);
void Cart_Secure_Init(u32* buf, u32* out); void Cart_Secure_Init(u32* buf, u32* out);

View File

@ -1,6 +1,6 @@
#include "hid.h" #include "hid.h"
u32 InputWait() { u32 InputWait(void) {
u32 pad_state_old = HID_STATE; u32 pad_state_old = HID_STATE;
while (true) { while (true) {
u32 pad_state = HID_STATE; u32 pad_state = HID_STATE;

View File

@ -17,4 +17,4 @@
#define BUTTON_X (1 << 10) #define BUTTON_X (1 << 10)
#define BUTTON_Y (1 << 11) #define BUTTON_Y (1 << 11)
u32 InputWait(); u32 InputWait(void);

View File

@ -15,13 +15,13 @@ extern s32 CartID2;
static FATFS fs; static FATFS fs;
static FIL file; static FIL file;
void ClearTop() { static void ClearTop(void) {
ClearScreen(TOP_SCREEN0, RGB(255, 255, 255)); ClearScreen(TOP_SCREEN0, RGB(255, 255, 255));
ClearScreen(TOP_SCREEN1, RGB(255, 255, 255)); ClearScreen(TOP_SCREEN1, RGB(255, 255, 255));
current_y = 0; current_y = 0;
} }
void wait_key() { static void wait_key(void) {
Debug(""); Debug("");
Debug("Press key to continue"); Debug("Press key to continue");
InputWait(); InputWait();

View File

@ -3,7 +3,7 @@
#define CONFIG_PLATFORM_REG ((volatile u32*)0x10140FFC) #define CONFIG_PLATFORM_REG ((volatile u32*)0x10140FFC)
Platform GetUnitPlatform() Platform GetUnitPlatform(void)
{ {
switch (*CONFIG_PLATFORM_REG) { switch (*CONFIG_PLATFORM_REG) {
case 7: case 7:

View File

@ -5,4 +5,4 @@ typedef enum {
PLATFORM_N3DS, PLATFORM_N3DS,
} Platform; } Platform;
Platform GetUnitPlatform(); Platform GetUnitPlatform(void);