#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!
Hello,
Could you please tell Which samples and files you are referring to?
Thanks.
Best Regards,
Kazi Afroza Sultana
I was referring the peripheral UART sample
ncs\v2.0.0\nrf\lib\dk_buttons_and_leds\dk_buttons_and_leds.c
Hello,
GPIO_DT_SPEC_GET is a macro used in C which has node identifier and property name as parameter. You can check this link GPIO — Zephyr Project Documentation (nordicsemi.com).
Thanks.
Best Regards,
Kazi Afroza Sultana
What about GPIO_SPEC_AND_COMMA(button_or_led) this is the one I am stuck at !