nrf52 overlay file to reconfigure GPIO for buttons and leds


frv
 

Hi all,

I want to reconfigure the LEDs and Button's GPIO pins.

I have this overlay file as content:

/*
 * Copyright (c) 2017 Shawn Nock <shawn@...>
 * Copyright (c) 2017 Linaro Limited
 *
 * SPDX-License-Identifier: Apache-2.0
 */
 
&leds {
        compatible = "gpio-leds";
        led0: led_0 {
                gpios = <&gpio0 7 GPIO_INT_ACTIVE_LOW>;
                label = "Red LED";
        };
        led1: led_1 {
                gpios = <&gpio0 8 GPIO_INT_ACTIVE_LOW>;
                label = "Green LED";
        };
        led2: led_2 {
                gpios = <&gpio0 9 GPIO_INT_ACTIVE_LOW>;
                label = "Yellow LED";
        };
};
 
&buttons {
        compatible = "gpio-keys";
        button0: button_0 {
                gpios = <&gpio0 4 GPIO_PUD_PULL_UP>;
                label = "Normal call button";
        };
        button1: button_1 {
                gpios = <&gpio0 5 GPIO_PUD_PULL_UP>;
                label = "Assistance call button";
        };
        button2: button_2 {
                gpios = <&gpio0 6 GPIO_PUD_PULL_UP>;
                label = "Yellow call button";
        };
};

But facing these compilation errors:
Error: nrf52_pca10040.dts.pre.tmp:479.1-6 Label or path leds not found
Error: nrf52_pca10040.dts.pre.tmp:494.1-9 Label or path buttons not found

Although leds and buttons in defined in the base dts file, it seems the & to leds and buttons can not be resolved?

Any idea's what I'm doing wrong, thank you.
Br,
Frank


Join devel@lists.zephyrproject.org to automatically receive all group messages.