From d383f2bcdb6ff13cc562fce1ff55d826035debad Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 6 Mar 2023 17:36:31 +0100 Subject: Simplify source tree Now just use make in the root directory to build. --- src/c_loader.iom | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/c_loader.iom (limited to 'src/c_loader.iom') diff --git a/src/c_loader.iom b/src/c_loader.iom new file mode 100644 index 0000000..80c8c4e --- /dev/null +++ b/src/c_loader.iom @@ -0,0 +1,85 @@ +// +// Date init 14.12.2004 +// +// Revision date $Date:: 24-06-09 8:53 $ +// +// Filename $Workfile:: c_loader.iom $ +// +// Version $Revision:: 15 $ +// +// Archive $Archive:: /LMS2006/Sys01/Main_V02/Firmware/Source/c_load $ +// +// 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 0x011D // x.y +#define FIRMWAREPATCH 2 // .z, the third number +#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, + CROPDATAFILE = 0x8D, /* New cmd for datalogging */ + 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 + + + -- cgit v1.2.3