Ah Îoon Ah Îoon - 3 months ago 24
C Question

Insert two variable inside one argument of a function

I have a question, can I declare two variables in an argument of a function? For ex,

void Led_On(uint8 port, uint8 pin)
. I want turn on LED in pin 0 and pin 1 but I don't want to call another function. Is there any way to call two variable in one argument? For example I have a blue LED and red LED in Pin 0 and Pin 1, can I declare blue LED and red LED inside the the
uint8 pin
argument?? Is there any way??


No, you cant call a 2-argument function with just one argument, but a wrapper function around that One would be trivial