// // Source: PRU_semahore.hp // Revision: 1.0 // // PRU Semaphore example constants. #ifndef _PRU_SEMAPHORE_HP_ #define _PRU_SEMAPHORE_HP_ // *************************************** // * Global Macro definitions * // *************************************** #define flag_rsize_addr 0x80000000 #define READSIZEINCR 0x000A #define CONST_DSPL2 C28 #define CONST_L3RAM C30 #define CONST_DDR C31 // Address for the Constant table Programmable Pointer Register 0(CTPPR_0) #define CTPPR_0 0x7028 // Address for the Constant table Programmable Pointer Register 1(CTPPR_1) #define CTPPR_1 0x702C .macro MOV32 .mparam dst, src MOV dst.w0, src & 0xFFFF MOV dst.w2, src >> 16 .endm .macro LD32 .mparam dst,src LBBO dst,src,#0x00,4 .endm .macro LD16 .mparam dst,src LBBO dst,src,#0x00,2 .endm .macro LD8 .mparam dst,src LBBO dst,src,#0x00,1 .endm .macro ST32 .mparam src,dst SBBO src,dst,#0x00,4 .endm .macro ST16 .mparam src,dst SBBO src,dst,#0x00,2 .endm .macro ST8 .mparam src,dst SBBO src,dst,#0x00,1 .endm // *************************************** // * Global Structure Definitions * // *************************************** .struct Global .u32 data .u32 tempSize .ends .struct SemParams .u32 semFlag .u32 readSize .u32 srcOffset .u32 dstOffset .u32 doneFlag .ends // *************************************** // * Global Register Assignments * // *************************************** .assign SemParams, R6, *, semParams .assign Global, R4, *, global #endif //_PRU_SEMAPHORE_HP_