imxrt: fix userled config in appinit

The imxrt1064, imxrt1064, and teensy-4.x board configs would fail to
build when CONFIG_USERLED_LOWER was enabled, due to a missing header in
imxrt_appinit.c and an unset local define.

Verified a build succeds for the specified boards with the following
defconfig modifications:

    # CONFIG_ARCH_LEDS is not set
    CONFIG_USERLED=y
    CONFIG_USERLED_LOWER=y

Tested the "leds" Led driver example on a Teensy 4.1.
This commit is contained in:
Michael Mogenson 2022-03-02 10:21:34 -05:00 committed by Xiang Xiao
parent 3b7a6ae311
commit f5e431483e
3 changed files with 6 additions and 15 deletions

View File

@ -27,13 +27,10 @@
#include <sys/types.h>
#include <nuttx/board.h>
#include <nuttx/leds/userled.h>
#include "imxrt1060-evk.h"
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
# define HAVE_LEDS 0
#endif
#ifdef CONFIG_BOARDCTL
/****************************************************************************
@ -67,7 +64,7 @@
int board_app_initialize(uintptr_t arg)
{
#ifdef HAVE_LEDS
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
/* Register the LED driver */
int ret;

View File

@ -27,13 +27,10 @@
#include <sys/types.h>
#include <nuttx/board.h>
#include <nuttx/leds/userled.h>
#include "imxrt1064-evk.h"
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
# define HAVE_LEDS 0
#endif
#ifdef CONFIG_BOARDCTL
/****************************************************************************
@ -67,7 +64,7 @@
int board_app_initialize(uintptr_t arg)
{
#ifdef HAVE_LEDS
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
/* Register the LED driver */
int ret;

View File

@ -28,13 +28,10 @@
#include <syslog.h>
#include <nuttx/board.h>
#include <nuttx/leds/userled.h>
#include "teensy-4.h"
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
# define HAVE_LEDS 0
#endif
#ifdef CONFIG_BOARDCTL
/****************************************************************************
@ -69,7 +66,7 @@
int board_app_initialize(uintptr_t arg)
{
int ret;
#ifdef HAVE_LEDS
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
/* Register the LED driver */
ret = userled_lower_initialize(LED_DRIVER_PATH);