flash.h 1.8 KB

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