From d45196e28dff0445d8feb5346f09e4f9a311a315 Mon Sep 17 00:00:00 2001 From: Francois Berder <18538310+francois-berder@users.noreply.github.com> Date: Fri, 3 Apr 2020 18:48:13 +0100 Subject: [PATCH] tests: buttons: Fix build failure if BTN0_PIN is not declared On some boards, button 0 does not exist so BTN0_PIN is not defined, but these boards may define other buttons. Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com> --- tests/buttons/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/buttons/main.c b/tests/buttons/main.c index 55a5844b8f..6a06147842 100644 --- a/tests/buttons/main.c +++ b/tests/buttons/main.c @@ -41,7 +41,7 @@ #define BTN3_INT_FLANK GPIO_FALLING #endif -#ifdef BTN0_PIN /* assuming that first button is always BTN0 */ +#if defined (BTN0_PIN) || defined (BTN1_PIN) || defined (BTN2_PIN) || defined (BTN3_PIN) static void cb(void *arg) { printf("Pressed BTN%d\n", (int)arg);