mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-12 07:55:42 +00:00
examples/apa102: use fprintf() instead of the kernel _err() macro
_err() is a kernel-internal debug macro from <debug.h>; it resolves to the kernel-only _err symbol, which an application cannot reference. In a flat build the example therefore fails to link: apa102_main.c: undefined reference to `_err' (observed on xtensa/esp32s3). Report the failure with fprintf(stderr), which is what the open() error path a few lines above already does. Signed-off-by: Ricard Rosson <ricard@groundbits.com> Assisted-by: Claude Opus 5 (Claude Code)
This commit is contained in:
parent
a76f5bab50
commit
569d8f31db
1 changed files with 1 additions and 1 deletions
|
|
@ -168,7 +168,7 @@ int main(int argc, FAR char *argv[])
|
|||
ret = write(fd, ledstrip, 4 * NUM_LEDS);
|
||||
if (ret < 0)
|
||||
{
|
||||
_err("ERROR: write LED Strip failed: %d\n", errno);
|
||||
fprintf(stderr, "ERROR: write LED Strip failed: %d\n", errno);
|
||||
}
|
||||
|
||||
usleep(US_DELAY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue