Hi,
I am using CCS6.0, and C compiler v6.2.5. I have defined a MACRO and am having problems passing a local Uint32 variable into it.
Here's my code:
#define SET_ECanaShadow_DEL_CANME_bit_MExx(mbox1, val1) ECanaShadow_DEL.CANME.bit.ME##mbox1 = val1
...
for(j=0; j < NumSymIn; j++)
{
Uint32 tx_mbox=18+j;
// itoa(tx_mbox, chardebug);
//c = '0'+tx_mbox;
ECanaShadow_DEL.CANME.all = ECanaRegs.CANME.all;
SET_ECanaShadow_DEL_CANME_bit_MExx(tx_mbox, 0);
...
}
When I build I get the following error:
Description Resource Path Location Type
#137 struct "CANME_BITS" has no field "MEtx_mbox" DelfinoSimple.c /CANprot_DEL line 368 C/C++ Problem
If I pass in the following parameters everything works fine:
SET_ECanaShadow_DEL_CANME_bit_MExx(18, 0);
Do you have any advice to fix this?
It's odd that the following MACRO and call works just fine:
#define SET_ECanaMboxes_MBOXxx_MDH_word_HI_WORD(mbox3, val3) ECanaMboxes.MBOX##mbox3.MDH.word.HI_WORD = val3
SET_ECanaMboxes_MBOXxx_MDH_word_HI_WORD(17, NumSymIn);
Thanks,
Rick