/****************************************************************************** * Title : primFunc_RWFifo.h * Version 0.0 * * Description: header file * Related files: primFunc_RWFifo.h * * Author: Lukas Tomasek, tomasekl@fzu.cz * ******************************************************************************/ #ifndef PRIM_FUNC_RW_FIFO_H /* multiple inclusion protection */ #define PRIM_FUNC_RW_FIFO_H /****************************************************************************** * Header files * ******************************************************************************/ #include "primParams.h" #include "fileUtility.h" /****************************************************************************** * Definitions * ******************************************************************************/ /* * prim function revision number - should be equal to R_RW_FIFO * defined on the DSP side in primParams.h */ #define R_RW_FIFO_HOST 104 /* * fifoIdAndBank - bits 0 and 1 define fifoBank, bits 2 and 3 fifoID */ #define GET_FIFO_ID(fifoIdAndBank) (((fifoIdAndBank)>>2)&3) #define GET_FIFO_BANK(fifoIdAndBank) ((fifoIdAndBank)&3) #define GET_FIFO_ID_AND_BANK(fifoId, fifoBank) (((fifoId)<<2)+(fifoBank)) /****************************************************************************** * Type definitions * ******************************************************************************/ /* * Primitive parameters */ struct PRIM_RWFIFO_PARAMS{ /* params for host */ struct RW_FIFO_IN inputParams; char dataFileName[PATHNAME_LENGTH]; }; /******************************************************************************/ int getFifoElementSize(UINT32 fifoId, UINT32 fifoBank); #endif /* PRIM_FUNC_RW_FIFO_H */ #ifdef PRIM_FUNC_DEFINED #include "globalDefinitions.h" PRIM_FUNCTION_TYPE primFunction_RWFifo; int getFifoElementSize(UINT32 fifoId, UINT32 fifoBank); #endif