First - sorry for my bad English :-( Second - I have some intresting task. Preface. Programm will be work on ATMega162. We use macro, becouse functions work very slowly. Even inline... Task. I have a macro:
#define ProvSetBit(reg, bit) (((reg) & (1<<(bit))) != 0)
and check bits turn in very long, unreadable string:
ProvSetBit(SystemStatus[0], COMMAND_ON_DF);
and #define COMMAND_ON_DF 0u
I want to modificate it in:
ProvSetBit(COMMAND_ON_DF);
where COMMAND_ON_DF:
#define COMMAND_ON_DF (SystemStatus[0], 0u)
or something there. But it don't work. Debugger write:"Error[Pe054]: too few arguments in macro invocation". What you can advice me?