Hello, I update the nRF Connect SDK to 2.2.0 on Windows 10 Pro recently.
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* Copyright (c) 2012-2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include "common/led.h"
#include "common/colors.h"
#include "door/door.h"
#include <zephyr/logging/log.h>
#include <zephyr/drivers/gpio.h>
#define SLEEP_TIME_MS 3*60*1000
LOG_MODULE_REGISTER(sensor, LOG_LEVEL_DBG);
#define SW0_NODE DT_ALIAS(sw0)
static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET(SW0_NODE, gpios);
On line 40, I have a warning:
Fullscreen
1
2
3
d:\projects\Nordic\2.2.0\Sensors\Sensors\src\main.cpp:40:20: warning: Macro is deprecated
40 | ret = gpio_pin_interrupt_configure(button.port, button.pin, GPIO_INT_EDGE_TO_ACTIVE | GPIO_INT_DEBOUNCE);
| ^~~~~~~~~~~~~~~~~~~~~
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