Minor changes

This commit is contained in:
Aurora 2016-03-17 04:51:07 +01:00
parent 078fce4b3d
commit 6dfb33191f
14 changed files with 18 additions and 24 deletions

View File

@ -32,7 +32,7 @@ INCLUDES := include source/fatfs source/fatfs/sdmmc
ARCH := -mthumb -mthumb-interwork
CFLAGS := -g -Wall -O2\
-march=armv5te -mtune=arm946e-s -fomit-frame-pointer\
-march=armv5te -mtune=arm946e-s\
-ffast-math -Wno-main -std=c99\
$(ARCH)

View File

@ -811,7 +811,7 @@ FRESULT sync_fs ( /* FR_OK: successful, FR_DISK_ERR: failed */
/*-----------------------------------------------------------------------*/
/* Hidden API for hacks and disk tools */
DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
static DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
FATFS* fs, /* File system object */
DWORD clst /* Cluster# to be converted */
)
@ -829,7 +829,7 @@ DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
/*-----------------------------------------------------------------------*/
/* Hidden API for hacks and disk tools */
DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluster status */
static DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluster status */
FATFS* fs, /* File system object */
DWORD clst /* FAT index number (cluster number) to get the value */
)
@ -884,7 +884,7 @@ DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluste
/* Hidden API for hacks and disk tools */
#if !_FS_READONLY
FRESULT put_fat (
static FRESULT put_fat (
FATFS* fs, /* File system object */
DWORD clst, /* FAT index number (cluster number) to be changed */
DWORD val /* New value to be set to the entry */

View File

@ -1,4 +1,3 @@
#pragma once
#include <stdbool.h>
#include "../../types.h"

View File

@ -2,8 +2,6 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "common.h"
#include "sdmmc.h"
#include "delay.h"

View File

@ -1,6 +1,6 @@
#pragma once
#include "common.h"
#include "types.h"
#define I2C1_REG_OFF 0x10161000
#define I2C2_REG_OFF 0x10144000

View File

@ -5,7 +5,7 @@
#define PAYLOAD_ADDRESS 0x23F00000
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)
@ -19,7 +19,7 @@ u32 loadPayload(const char *path){
return 0;
}
void main(){
void main(void){
FATFS fs;
f_mount(&fs, "0:", 1);

View File

@ -1,12 +1,10 @@
#include "screeninit.h"
#include "i2c.h"
void initLCD()
{
void initLCD(void){
vu32 *const arm11 = (u32 *)0x1FFFFFF8;
void __attribute__((naked)) ARM11()
{
void __attribute__((naked)) ARM11(void){
*(vu32 *)0x10141200 = 0x1007F;
*(vu32 *)0x10202014 = 0x00000001;
*(vu32 *)0x1020200C &= 0xFFFEFFFE;

View File

@ -2,4 +2,4 @@
#include "types.h"
void initLCD();
void initLCD(void);

View File

@ -6,6 +6,7 @@
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>

View File

@ -811,7 +811,7 @@ FRESULT sync_fs ( /* FR_OK: successful, FR_DISK_ERR: failed */
/*-----------------------------------------------------------------------*/
/* Hidden API for hacks and disk tools */
DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
static DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
FATFS* fs, /* File system object */
DWORD clst /* Cluster# to be converted */
)
@ -829,7 +829,7 @@ DWORD clust2sect ( /* !=0: Sector number, 0: Failed - invalid cluster# */
/*-----------------------------------------------------------------------*/
/* Hidden API for hacks and disk tools */
DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluster status */
static DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluster status */
FATFS* fs, /* File system object */
DWORD clst /* FAT index number (cluster number) to get the value */
)
@ -884,7 +884,7 @@ DWORD get_fat ( /* 0xFFFFFFFF:Disk error, 1:Internal error, 2..0x0FFFFFFF:Cluste
/* Hidden API for hacks and disk tools */
#if !_FS_READONLY
FRESULT put_fat (
static FRESULT put_fat (
FATFS* fs, /* File system object */
DWORD clst, /* FAT index number (cluster number) to be changed */
DWORD val /* New value to be set to the entry */

View File

@ -2,8 +2,6 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "common.h"
#include "sdmmc.h"
#include "delay.h"

View File

@ -9,12 +9,12 @@
#include "fs.h"
#include "firm.h"
void main(){
void main(void){
mountSD();
setupCFW();
}
void startCFW(){
void startCFW(void){
if(!loadFirm()) return;
if(!patchFirm()) return;
launchFirm();