gpio_is_ready_dt not found in nRF Connect SDK

Dear everyone,

    I am exploring embedded development with nRF products. In particular, I am trying to setup projects both in pure Zephyr and nRF Connect SDK (NCS) to see which are the differences.

From my understanding, NCS is built upon Zephyr, so Zephyr function should be available when compiling the project using NCS. Nonetheless, I have a simple blinky project that I can compile using pure Zephyr, while I get an error using NCS.

The incriminated code is the following:

if (!gpio_is_ready_dt(&led)) return;

I can compile correctly if I use this code instead 

if (!device_is_ready(led.port)) return;

The gpio_is_ready_dt function is missing from the driver.


This sounds really strange to me since the function is present in the NCS/Zephyr documentation (here). I have also text-searched the function in the used zephyr repository and, indeed, it is not present in the driver file.
I am using ncs v2.2.0 (which calls zephyr v3.2.99), while in the pure Zephyr I am using v3.2.0.

I would like to ask the following:

  • Is this an error in the documentation or am I missing something?
  • Is it correct to assume that Nordic removes some functions from "standard" Zephyr drivers? Are this differences reported anywhere?

Thank you in advance for your help.

  • Hi,

    nRF Connect SDK includes the whole Zephyr project, and additionally a lot of libraries, tools and samples. However, the gpio_is_ready_dt() is so new that it is not part of the latest nRF Connect SDK release, but will be part of the next. Specifically, In zephyr, x.y.99 is used to indicate the current state of the development branch (main). So 2.2.99 and 2.2.99 are typically not the same release. Therefore, the release notes of nRF Connect SDK points to the hash of the exact commit that is used in the release. (The snapshot of Zephyr that is part of nRF Connect SDK 2.2.0 is two days older than the introduction of gpio_is_ready_dt()).

Related