examples/dhtxx: added configuration option for dhtxx sensor devpath
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
parent
5572819bb1
commit
21562e8960
@ -18,6 +18,12 @@ config EXAMPLES_DHTXX_PROGNAME
|
|||||||
This is the name of the program that will be used when the NSH ELF
|
This is the name of the program that will be used when the NSH ELF
|
||||||
program is installed.
|
program is installed.
|
||||||
|
|
||||||
|
config EXAMPLES_DHTXX_DEVPATH
|
||||||
|
string "Device path"
|
||||||
|
default "/dev/hum0"
|
||||||
|
---help---
|
||||||
|
The device path
|
||||||
|
|
||||||
config EXAMPLES_DHTXX_PRIORITY
|
config EXAMPLES_DHTXX_PRIORITY
|
||||||
int "Dhtxx task priority"
|
int "Dhtxx task priority"
|
||||||
default 100
|
default 100
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* examples/dhtxx/dhtxx_main.c
|
* apps/examples/dhtxx/dhtxx_main.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018 Abdelatif GUETTOUCHE. All rights reserved.
|
* Copyright (C) 2018 Abdelatif GUETTOUCHE. All rights reserved.
|
||||||
* Author: Abdelatif GUETTOUCHE <abdelatif.guettouche@gmail.com>
|
* Author: Abdelatif GUETTOUCHE <abdelatif.guettouche@gmail.com>
|
||||||
@ -61,7 +61,7 @@ int main(int argc, FAR char *argv[])
|
|||||||
|
|
||||||
printf("Dhtxx app is running.\n");
|
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++)
|
for (i = 0; i < 20; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user