Hi,
I am currently looking at some code and I am having difficulties
figuring out what this peace does:
Can anybody shed some light on this even if it is in a general sense.
I understand that enumFaults can have two values FAULT_TABLE_MAC RO and
NUMBER_OF_FAULT S but why is the #define #undef there.
I also do not see NUMBER_OF_FAULT S anywhere else in the code which is
strange. I know it's hard to help without the complete file but any
idea would help here. Thanks,
Amish
I am currently looking at some code and I am having difficulties
figuring out what this peace does:
Code:
#define FLT_INIT(iEnumValue,boolActive,iWord,iBitMask,iTDS,strDesc)
iEnumValue,
typedef enum { FAULT_TABLE_MACRO NUMBER_OF_FAULTS } enumFaults;
#undef FLT_INIT
//Format: (iEnumValue, boolActive, iWord, iBitMask, iTDS,
strDesc)
#define FAULT_TABLE_MACRO \
FLT_INIT(FAULT_PWRMOD_BULK_LOW_0, FALSE, 0, 0x00000001, 0, "Mod 0
Bulk V L")\
FLT_INIT(FAULT_PWRMOD_BULK_HIGH_0, FALSE, 0, 0x00000002, 0, "Mod 0
Bulk V H")\
..
..
..
..
I understand that enumFaults can have two values FAULT_TABLE_MAC RO and
NUMBER_OF_FAULT S but why is the #define #undef there.
I also do not see NUMBER_OF_FAULT S anywhere else in the code which is
strange. I know it's hard to help without the complete file but any
idea would help here. Thanks,
Amish
Comment