Help understand GPIO_DT_SPEC_GET_BY_IDX error with a custom gpio binding/overlay #84135
Unanswered
lingyuan-he
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I am trying to get a custom gpio matrix overlay to work in a toy driver example. I keep running into compile error related to GPIO_DT_SPEC_GET_BY_IDX when I already have #include <zephyr/drivers/gpio.h>.
The binding:
The overlay snippet:
In the driver code, trying to static init gpio specs:
Compile fails with:
There is also the message:
~/zephyrproject/applications/zephyr-example/build/zephyr/include/generated/zephyr/devicetree_generated.h:2028:41: warning: implicit declaration of function 'DT_N_S_ledmatrix_device_P_row_gpio_pins_FOREACH_PROP_ELEM_SEP'; did you mean 'DT_N_S_ledmatrix_device_P_status_FOREACH_PROP_ELEM_SEP'? [-Wimplicit-function-declaration]
Which sounds strange and may have pointed to badly defined attribute?
The board I am using is microbit v2, so it already has nordic LED matrix driver. I did referenced the default device tree, and was trying to replicate a simpler binding.
Sorry for the newbie question, appreciate any help here. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions