/****************************************************************************** * Title : commandFunc_readWriteMaster.h * Version 0.0 * * Description: header file * Related files: commandFunc_readWriteMaster.c * * Author: Lukas Tomasek, tomasekl@fzu.cz * ******************************************************************************/ #ifndef COMMAND_RW_MASTER /* multiple inclusion protection */ #define COMMAND_RW_MASTER /****************************************************************************** * Header files * ******************************************************************************/ #include "fileUtility.h" /****************************************************************************** * Definitions * ******************************************************************************/ /****************************************************************************** * Type definitions * ******************************************************************************/ /* * Command parameters */ struct RW_MASTER_PARAMS { int readNotWrite; UINT32 startAddress; UINT32 length; /* data write/read block length in bytes */ int blockAccess; unsigned int delay; union{ struct{ /* input */ int dataNotFile; /* input data option */ UINT32 data; /* input 32b data - valid if dataNotFile!=0, length ==4 bytes */ char fileName[PATHNAME_LENGTH]; /* input data file - valid if dataNotFile==0 */ }write; struct{ /* output */ int compareWithData; /* valid only if length<=4 bytes */ UINT32 compData; /* data for comparison - valid if compareWithData!=0 */ UINT32 dataMask; /* bit data mask for comparison - valid if compareWithData!=0*/ int appendNotWrite; char fileName[PATHNAME_LENGTH]; /* output data file */ }read; }; }; /******************************************************************************/ #endif /* COMMAND_RW_MASTER */ #ifdef COMMAND_FUNC_DEFINED #include "commandListDefinitions.h" COMMAND_FUNCTION_TYPE commandFunction_readWriteMaster; #endif