1 #ifndef __FLASH 2 #define __FLASH 3 4 #include <default.h> 5 6 #define __EM_findEmptySlot _rom_call(void*,(long,short),15F) 7 8 /* Begin Auto-Generated Part */ 9 #define NULL ((void*)0) 10 #ifndef __HAVE_Bool 11 #define __HAVE_Bool 12 enum Bool{FALSE,TRUE}; 13 #endif 14 #ifndef __HAVE_HANDLE 15 #define __HAVE_HANDLE 16 typedef unsigned short HANDLE; 17 #endif 18 #ifndef __HAVE_size_t 19 #define __HAVE_size_t 20 typedef unsigned long size_t; 21 #endif 22 typedef struct{unsigned short len;unsigned long hardwareID;unsigned long hardwareRevision;unsigned long bootMajor;unsigned long bootRevision;unsigned long bootBuild;unsigned long gateArray;unsigned long physDisplayBitsWide;unsigned long physDisplayBitsTall;unsigned long LCDBitsWide;unsigned long LCDBitsTall;}HARDWARE_PARM_BLOCK; 23 #define EM_abandon _rom_call(void,(HANDLE),15B) 24 #define EM_blockVerifyErase _rom_call(short,(void*),15D) 25 #define EM_findEmptySlot(s) (__EM_findEmptySlot((s),0)) 26 #define EM_GC _rom_call(short,(short),160) 27 #define EM_survey _rom_call(void,(__pulong,__pulong,__pulong,__pulong,__pulong,__pulong),165) 28 #define EM_write _rom_call(void,(const void*,void*,long),167) 29 #define FL_addCert _rom_call(unsigned short,(void*,long),169) 30 #define FL_download _rom_call_attr(void,(long),__attribute__((__noreturn__)),16A) 31 #define FL_getCert _rom_call(void,(HANDLE*,__pulong,short),16C) 32 #define FL_getHardwareParmBlock() (MIN_AMS<101&&TIOS_entries<0x3CC?(const void*)"\0\x6\0\0\0\x1":_rom_call(const void*,(void),16B)()) 33 #define FL_getVerNum _rom_call(unsigned short,(void),16D) 34 #define FL_write _rom_call(void,(const void*,void*,long),171) 35 #define GetAMSSize() ((*((unsigned long*)(((char*)ROM_base)+0x12002)))+0x49) 36 #if MIN_AMS>=200 37 #define FlashMemoryEnd ((unsigned char*const)(_rom_call_addr(43D))) 38 #define BatTooLowFlash _rom_call(short,(short),434) 39 #endif 40 /* End Auto-Generated Part */ 41 42 #endif 43