#define GPIO_SPEC_AND_COMMA(button_or_led) GPIO_DT_SPEC_GET(button_or_led, gpios),
I find this code in the buttons and led .c file
I tried finding what is does , but I couldn't .
I just need help to understand what id does and how to use it!
I still did not understand
Which is the local macro it works like? and what is it defining by (button_or_led)
I still did not understand
Which is the local macro it works like? and what is it defining by (button_or_led)
Hello,
You are inside the dk_buttons_and_leds library. You should not do any change here.
If you would like to know in general how macro works can follow this link C Preprocessor and Macros (programiz.com), Preprocessors in C - TechVidvan
Thanks.
Best Regards,
Kazi Afroza Sultana