NRF_DT_GPIOS_TO_PSEL with zephyr_user node

In some examples that use nrfx libraries it is necessary to extract a GPIO PSEL, which is usually done like this. Give the following DT definitions

```
leds {

        compatible = "gpio-leds";
         led_red: led_0 {
             gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
             label = "Red LED";
         };
aliases {
         led1 = &led_red;
}
```
the PSEL is extracted with this macro.
#define OUTPUT_PIN_RED   NRF_DT_GPIOS_TO_PSEL(DT_ALIAS(led1), gpios)
I would like to extract the PSEL from the zephyr,user node, which however is different, as there is no gpios property
```
     zephyr,user {
        name-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
     };
```
Which macro should I use in this case?
Parents Reply Children
No Data
Related