Changed indentation style across the code to make it more readable, added newlines before comments, moved patches to separate functions, made memory operations slightly faster by compiling them with O3 (thanks TuxSH!)

This commit is contained in:
Aurora
2016-04-02 17:58:06 +02:00
parent 6b64a10362
commit 3475cfe1e6
21 changed files with 333 additions and 186 deletions

View File

@@ -16,7 +16,7 @@ include $(DEVKITARM)/3ds_rules
# INCLUDES is a list of directories containing header files
# SPECS is the directory containing the important build and link files
#---------------------------------------------------------------------------------
export TARGET := $(shell basename $(CURDIR))
export TARGET := $(shell basename $(CURDIR))
BUILD := build
SOURCES := source source/fatfs source/fatfs/sdmmc

View File

@@ -4,9 +4,11 @@
#define PAYLOAD_ADDRESS 0x23F00000
static u32 loadPayload(const char *path){
static u32 loadPayload(const char *path)
{
FIL payload;
unsigned int br;
if(f_open(&payload, path, FA_READ) == FR_OK)
{
f_read(&payload, (void *)PAYLOAD_ADDRESS, f_size(&payload), &br);
@@ -18,7 +20,8 @@ static u32 loadPayload(const char *path){
return 0;
}
void main(void){
void main(void)
{
FATFS fs;
f_mount(&fs, "0:", 1);

View File

@@ -12,7 +12,4 @@ _start:
mcr p15, 0, r0, c7, c6, 0 @ flush D-cache
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
bl main
.die:
b .die
b main