This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28388D: The return value of ERAD_getOwnership() in erad.h

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hi champs,

I import CPU1 led_ex1_blinky project and modify led_ex1_blinky.c to led_ex1_blinky.cpp, build this project and will face one error, compiler complains 'error #121: return value type does not match the function type' of ERAD_getOwnership() in erad.h.

I check it and think the return statement of ERAD_getOwnership() should be modified as below(marked in RED),

return(ERAD_Owner)((HWREGH(ERAD_GLOBAL_BASE + ERAD_O_GLBL_OWNER) &
                                     ERAD_GLBL_OWNER_OWNER_M) >> ERAD_GLBL_OWNER_OWNER_S);

I build this project without problem after this modification. Is it correct? Please advise, thanks for help.

-Luke