mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
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:
committed by
Xiang Xiao
parent
3b7a6ae311
commit
f5e431483e
@@ -27,13 +27,10 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
|
#include <nuttx/leds/userled.h>
|
||||||
|
|
||||||
#include "imxrt1060-evk.h"
|
#include "imxrt1060-evk.h"
|
||||||
|
|
||||||
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
|
|
||||||
# define HAVE_LEDS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_BOARDCTL
|
#ifdef CONFIG_BOARDCTL
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -67,7 +64,7 @@
|
|||||||
|
|
||||||
int board_app_initialize(uintptr_t arg)
|
int board_app_initialize(uintptr_t arg)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LEDS
|
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
|
||||||
/* Register the LED driver */
|
/* Register the LED driver */
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@@ -27,13 +27,10 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
|
#include <nuttx/leds/userled.h>
|
||||||
|
|
||||||
#include "imxrt1064-evk.h"
|
#include "imxrt1064-evk.h"
|
||||||
|
|
||||||
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
|
|
||||||
# define HAVE_LEDS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_BOARDCTL
|
#ifdef CONFIG_BOARDCTL
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -67,7 +64,7 @@
|
|||||||
|
|
||||||
int board_app_initialize(uintptr_t arg)
|
int board_app_initialize(uintptr_t arg)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LEDS
|
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
|
||||||
/* Register the LED driver */
|
/* Register the LED driver */
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
@@ -28,13 +28,10 @@
|
|||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
|
#include <nuttx/leds/userled.h>
|
||||||
|
|
||||||
#include "teensy-4.h"
|
#include "teensy-4.h"
|
||||||
|
|
||||||
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
|
|
||||||
# define HAVE_LEDS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_BOARDCTL
|
#ifdef CONFIG_BOARDCTL
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -69,7 +66,7 @@
|
|||||||
int board_app_initialize(uintptr_t arg)
|
int board_app_initialize(uintptr_t arg)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
#ifdef HAVE_LEDS
|
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
|
||||||
/* Register the LED driver */
|
/* Register the LED driver */
|
||||||
|
|
||||||
ret = userled_lower_initialize(LED_DRIVER_PATH);
|
ret = userled_lower_initialize(LED_DRIVER_PATH);
|
||||||
|
|||||||
Reference in New Issue
Block a user