WS2812ESP32 example name is configurable and default name shortened

This commit is contained in:
Tomáš Pilný 2023-08-31 16:18:09 +02:00 committed by Xiang Xiao
parent 21e7a9dc9e
commit ecded726ce
4 changed files with 11 additions and 3 deletions

View File

@ -21,7 +21,7 @@
if(CONFIG_EXAMPLES_WS2812_ESP32_RMT)
nuttx_add_application(
NAME
ws2812esp32rmt
${CONFIG_EXAMPLES_WS2812_ESP32_RMT_PROGNAME}
PRIORITY
${CONFIG_EXAMPLES_WS2812_ESP32_RMT_PRIORITY}
STACKSIZE

View File

@ -12,6 +12,13 @@ config EXAMPLES_WS2812_ESP32_RMT
if EXAMPLES_WS2812_ESP32_RMT
config EXAMPLES_WS2812_ESP32_RMT_PROGNAME
string "Program Name"
default "ws2812esp32"
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.
config EXAMPLES_WS2812_ESP32_RMT_PRIORITY
int "Task Priority"
default 100

View File

@ -22,7 +22,7 @@ include $(APPDIR)/Make.defs
# MTD R/W buffer test Example
PROGNAME = ws2812esp32rmt
PROGNAME = $(CONFIG_EXAMPLES_WS2812_ESP32_RMT_PROGNAME)
PRIORITY = $(CONFIG_EXAMPLES_WS2812_ESP32_RMT_PRIORITY)
STACKSIZE = $(CONFIG_EXAMPLES_WS2812_ESP32_RMT_STACKSIZE)
MODULE = $(CONFIG_EXAMPLES_WS2812_ESP32_RMT)

View File

@ -163,7 +163,8 @@ int main(int argc, FAR char *argv[])
if (fd < 0)
{
fprintf(stderr,
"ws2812esp32rmt: open %s failed: %d\n",
"%s: open %s failed: %d\n",
argv[0],
dev_name,
errno);
goto errout_with_dev;