warning: Macro is deprecated when using gpio_pin_interrupt_configure or gpio_pin_interrupt_configure_dt

Hello, I update the nRF Connect SDK to 2.2.0 on Windows 10 Pro recently. 

On line 40, I have a warning:

I also tried to use gpio_pin_interrupt_configure() and got the same warning. But I checked the Zephyr 3.2.99, https://docs.zephyrproject.org/latest/hardware/peripherals/gpio.html#c.gpio_pin_interrupt_configure it does not mention the function is deprecated I also checked the function declaration, no annotation/comment saying the function is deprecated.

Any suggestion on how to get rid of the warning? Cheers

Parents
  • Hi Rong,

    I just checked a zephyr example in nCS 2.2.0. Indeed, it is showing the "Macro is deprecated" when I use the macro as you are using, that is "gpio_pin_interrupt_configure".

    However, when I use "gpio_pin_interrupt_configure_dt" macro, as is used in the basic zephyr example, there is no warning.

    Snapshot of using both macros, and hence with and without warning, are attached for reference.

    (I commented the line 58 and enabled other macro on line 59)

    image1: with warning 

    image2: without warning

    Hope it helps,

    Regards,

    Naeem

  • FYI, I get the same "macro is deprecated" warning for gpio_pin_configure_dt.  I'm using SDK v2.2.0 on Windows.  Everything works, so this is just FYI. 

    Steve

  • Yeah, thanks, it works on my side as well. It is just at some stage, for a project, someone will suggest turning `-Werror` on, and it works until that point :)

Reply
  • Yeah, thanks, it works on my side as well. It is just at some stage, for a project, someone will suggest turning `-Werror` on, and it works until that point :)

Children
No Data