modules: hal_nordic: check if gpio1 is enabled

The build will fail if `gpio1` is disabled in an overlay.

For example:
```
&gpio1 {
	status = "disabled";
};
```

Signed-off-by: Francois Gervais <francoisgervais@gmail.com>
This commit is contained in:
Francois Gervais 2023-02-10 13:03:32 -05:00 committed by Carles Cufí
parent 9e209c8cce
commit ada6881d47

View file

@ -55,7 +55,7 @@ void nrf_802154_gpiote_init(void)
GPIO_PULL_UP :
GPIO_PULL_DOWN;
#if DT_NODE_EXISTS(DT_NODELABEL(gpio1))
#if DT_NODE_HAS_STATUS(DT_NODELABEL(gpio1), okay)
if (use_port_1) {
dev = DEVICE_DT_GET(DT_NODELABEL(gpio1));
} else {