diff --git a/examples/dhtxx/Kconfig b/examples/dhtxx/Kconfig index 7ba8c504a..7489520a2 100644 --- a/examples/dhtxx/Kconfig +++ b/examples/dhtxx/Kconfig @@ -18,6 +18,12 @@ config EXAMPLES_DHTXX_PROGNAME This is the name of the program that will be used when the NSH ELF program is installed. +config EXAMPLES_DHTXX_DEVPATH + string "Device path" + default "/dev/hum0" + ---help--- + The device path + config EXAMPLES_DHTXX_PRIORITY int "Dhtxx task priority" default 100 diff --git a/examples/dhtxx/dhtxx_main.c b/examples/dhtxx/dhtxx_main.c index ac1ca8a1a..5b992edaa 100644 --- a/examples/dhtxx/dhtxx_main.c +++ b/examples/dhtxx/dhtxx_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/dhtxx/dhtxx_main.c + * apps/examples/dhtxx/dhtxx_main.c * * Copyright (C) 2018 Abdelatif GUETTOUCHE. All rights reserved. * Author: Abdelatif GUETTOUCHE @@ -61,7 +61,7 @@ int main(int argc, FAR char *argv[]) printf("Dhtxx app is running.\n"); - fd = open("/dev/dht0", O_RDWR); + fd = open(CONFIG_EXAMPLES_DHTXX_DEVPATH, O_RDWR); for (i = 0; i < 20; i++) {