mirror of
https://github.com/zeldaret/tmc
synced 2026-07-29 15:43:29 -04:00
clang-format
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user