clang-format

This commit is contained in:
theo
2020-06-13 17:02:27 -07:00
parent 8e1ca1936b
commit 66fcdf6186
86 changed files with 2320 additions and 2604 deletions
+9 -11
View File
@@ -1,16 +1,15 @@
#ifndef GUARD_GBA_FLASH_INTERNAL_H
#define GUARD_GBA_FLASH_INTERNAL_H
#define FLASH_BASE ((u8 *)0xE000000)
#define FLASH_BASE ((u8*)0xE000000)
#define FLASH_WRITE(addr, data) ((*(vu8 *)(FLASH_BASE + (addr))) = (data))
#define FLASH_WRITE(addr, data) ((*(vu8*)(FLASH_BASE + (addr))) = (data))
#define FLASH_ROM_SIZE_1M 131072 // 1 megabit ROM
#define SECTORS_PER_BANK 16
struct FlashSector
{
struct FlashSector {
u32 size;
u8 shift;
u16 count;
@@ -25,21 +24,20 @@ struct FlashType {
// TODO: add support for anonymous unions/structs if possible
union {
struct {
u8 makerId;
u8 deviceId;
u8 makerId;
u8 deviceId;
} separate;
u16 joined;
} ids;
};
struct FlashSetupInfo
{
struct FlashSetupInfo {
u16 (*programFlashByte)(u16, u32, u8);
u16 (*programFlashSector)(u16, void *);
u16 (*programFlashSector)(u16, void*);
u16 (*eraseFlashChip)(void);
u16 (*eraseFlashSector)(u16);
u16 (*WaitForFlashWrite)(u8, u8 *, u8);
const u16 *maxTime;
u16 (*WaitForFlashWrite)(u8, u8*, u8);
const u16* maxTime;
struct FlashType type;
};