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:
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user