//====================================================================== // IRISサブプロセッサ マクロ関数 //====================================================================== #ifndef _IRIS_SUBP_MON_MACRO_H #define _IRIS_SUBP_MON_MACRO_H #include #include "IrisSubpMonTarget.h" //---------------------------------------------------------------------- // CRC16bit(初期値 0xffff) 算出 //---------------------------------------------------------------------- #define GetInvCRC16(datap, size) \ \ GetCRC16(0xffff, datap, size) //---------------------------------------------------------------------- // メインプロセッサ・インタフェース受信 //---------------------------------------------------------------------- #define RecvMainpIntf() \ \ ((*(vMainpIntf *)REG_MAINPINTF).recvStatus) //---------------------------------------------------------------------- // CPU クリア //---------------------------------------------------------------------- #define CpuClear16_32(data, destp, size, bit) \ { \ u##bit tmp = (vu##bit )(data); \ CpuSet16_32((u8 *)&(tmp), (u8 *)(destp), ( \ DMA_SRC_FIX | \ DMA_##bit##BIT_BUS | (size)/((bit)/8))); \ } #define CpuArrayClear16_32( data, destp, bit) \ CpuClear16_32( data, destp, sizeof(destp), bit) //---------------------------------------------------------------------- // CPU コピー //---------------------------------------------------------------------- #define CpuCopy16_32(srcp, destp, size, bit) \ \ CpuSet16_32((u8 *)(srcp), (u8 *)(destp), ( \ DMA_SRC_INC | \ DMA_##bit##BIT_BUS | (size)/((bit)/8))) #define CpuArrayCopy16_32( srcp, destp, bit) \ CpuCopy16_32( srcp, destp, sizeof(srcp), bit) //---------------------------------------------------------------------- // CPU 高速クリア(32Byte単位) //---------------------------------------------------------------------- #define CpuClearFast32(data, destp, size) \ { \ u32 tmp = (vu32 )(data); \ CpuSetFast32((u8 *)&(tmp), (u8 *)(destp), ( \ DMA_SRC_FIX | (size)/(32/8))); \ } #define CpuArrayFastClear32( data, destp) \ CpuFastClear32( data, destp, sizeof(destp)) //---------------------------------------------------------------------- // CPU 高速コピー(32Byte単位) //---------------------------------------------------------------------- #define CpuCopyFast32(srcp, destp, size) \ \ CpuSetFast32((u8 *)(srcp), (u8 *)(destp), ( \ DMA_SRC_INC | (size)/(32/8))) #define CpuCopyFast32Fook(srcp, destp, size) \ \ CpuSetFast32Fook((u8 *)(srcp), (u8 *)(destp), ( \ DMA_SRC_INC | (size)/(32/8))) #define CpuArrayFastCopy32( srcp, destp) \ CpuFastCopy32( srcp, destp, sizeof(srcp)) #define CpuArrayFastCopy32Fook( srcp, destp) \ CpuFastCopy32Fook( srcp, destp, sizeof(srcp)) #endif /* _IRIS_SUBP_MON_MACRO_H */