⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c_loader.iom

📁 乐高机器人的源码,开发平台是IAR_for_AVR.
💻 IOM
字号:
//
// Date init       14.12.2004
//
// Revision date   $Date:: 16-05-06 8:27                                     $
//
// Filename        $Workfile:: c_loader.iom                                  $
//
// Version         $Revision:: 44                                            $
//
// Archive         $Archive:: /LMS2006/Sys01/Main/Firmware/Source/c_loader.i $
//
// Platform        C
//

#ifndef   CLOADER_IOM
#define   CLOADER_IOM

#define   pMapLoader ((IOMAPLOADER*)(pHeaders[ENTRY_LOADER]->pIOMap))

//Version numbers are two bytes, MAJOR.MINOR (big-endian)
//For example, version 1.5 would be 0x0105
//If these switch to little-endian, be sure to update
//definition and usages of VM_OLDEST_COMPATIBLE_VERSION, too!
#define   FIRMWAREVERSION               0x0104 //1.04
#define   PROTOCOLVERSION               0x017C //1.124

enum
{
  OPENREAD        = 0x80,
  OPENWRITE       = 0x81,
  READ            = 0x82,
  WRITE           = 0x83,
  CLOSE           = 0x84,
  DELETE          = 0x85,
  FINDFIRST       = 0x86,
  FINDNEXT        = 0x87,
  VERSIONS        = 0x88,
  OPENWRITELINEAR = 0x89,
  OPENREADLINEAR  = 0x8A,
  OPENWRITEDATA   = 0x8B,
  OPENAPPENDDATA  = 0x8C,
  FINDFIRSTMODULE = 0x90,
  FINDNEXTMODULE  = 0x91,
  CLOSEMODHANDLE  = 0x92,
  IOMAPREAD       = 0x94,
  IOMAPWRITE      = 0x95,
  BOOTCMD         = 0x97,     /* external command only */
  SETBRICKNAME    = 0x98,
  BTGETADR        = 0x9A,
  DEVICEINFO      = 0x9B,
  DELETEUSERFLASH = 0xA0,
  POLLCMDLEN      = 0xA1,
  POLLCMD         = 0xA2,
  RENAMEFILE      = 0xA3,
  BTFACTORYRESET  = 0xA4

};

typedef UWORD LOADER_STATUS;

//Mask out handle byte of Loader status word for error code checks
#define LOADER_ERR(StatusWord) ((StatusWord & 0xFF00))

//Byte value of error half of Loader status word
#define LOADER_ERR_BYTE(StatusWord) ((UBYTE)((StatusWord & 0xFF00) >> 8))

//Value of handle inside Loader status word
#define LOADER_HANDLE(StatusWord) ((UBYTE)(StatusWord))

//Pointer to lower byte of Loader status word
#define LOADER_HANDLE_P(StatusWord) ((UBYTE*)(&StatusWord))

typedef   struct
{
  UWORD   (*pFunc)(UBYTE, UBYTE *, UBYTE *, ULONG *);
  ULONG   FreeUserFlash;
}IOMAPLOADER;


#endif



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -