Macro uno r4 wifi

I have a problem with the definition of a macro not working in Uno R4, for example, #define fcr (rs->fcr) in the file int.h.

I have a problem seeing your code.

when I compile the main program I got error for macro definition FCR (rs->fcr) in int.h for UNO R4 it works in UNO R3.

Hello

There is nothing wrong with the definition if it is executed on an UNO R3, the problem occurs when it is to be executed on an UNO R4. On R4, the compiler wants -> to be replaced by parentheses. What the macro does is uninteresting because it is wrong in the definition. But that's not enough, an addition to the name of the macro is also needed. Have seen a solution but lost it. If I remember correctly -> i (rs -> fcr) would be replaced by ((rs)(fcr))???? plus an addition to the macro name FCR.

/Bjorn

#definition FCR (rs->fcr) the R4 compiler tells me to replace -> with ) = (rs)fcr)) which does not works

Problem solved #define FCR(rs) ((rs)->fcr)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.