Passing macro parameters via function
-
Vaclav_Sal wrote:
#define portREGISTER(port,registerSAM) (&;(port->registerSAM))
Since you already have a
&
character in the macro definition, why do you have one in the macro call?Vaclav_Sal wrote:
P_CB[iIndex] = portREGISTER(digitalPinToPort(*TFT_LCD_ControlPins),&(cRegisterType));
The difficult we do right away... ...the impossible takes slightly longer.
-
Vaclav_Sal wrote:
#define portREGISTER(port,registerSAM) (&;(port->registerSAM))
Since you already have a
&
character in the macro definition, why do you have one in the macro call?Vaclav_Sal wrote:
P_CB[iIndex] = portREGISTER(digitalPinToPort(*TFT_LCD_ControlPins),&(cRegisterType));
The difficult we do right away... ...the impossible takes slightly longer.
-
I do not see any macro here, and I really cannot understand what all the above is supposed to do. It would really help, as I have suggested many times, if you showed the actual code clearly, and within <pre> tags so it is readable.
-
And I think you really do not know the answer and just wasting your time. If you bother to follow the thread I did mention I tested it without the & and it did not work. I suppose since I did not use code tags correctly it is my fault. Thanks, go back to policing the posts. You do that very well. Have a nice day.
-
And I think you really do not know the answer and just wasting your time. If you bother to follow the thread I did mention I tested it without the & and it did not work. I suppose since I did not use code tags correctly it is my fault. Thanks, go back to policing the posts. You do that very well. Have a nice day.