Merged in fvacek/nuttx (pull request #572)

Fixed nucleo-l432kc broken build when CONFIG_USERLED_LOWER defined

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Fanda 2018-01-16 23:33:58 +00:00 committed by Gregory Nutt
parent 7d36a81806
commit 53db5c80f3
3 changed files with 14 additions and 0 deletions

View File

@ -45,7 +45,9 @@
# include <stdint.h>
#endif
#ifdef __KERNEL__
#include <stm32l4.h>
#endif
/************************************************************************************
* Pre-processor Definitions

View File

@ -87,6 +87,7 @@
#define GPIO_LD2 \
(GPIO_PORTA | GPIO_PIN5 | GPIO_OUTPUT_CLEAR | GPIO_OUTPUT | GPIO_PULLUP | \
GPIO_SPEED_50MHz)
#define LED_DRIVER_PATH "/dev/userleds"
/* Buttons
*

View File

@ -51,6 +51,7 @@
#include <nuttx/board.h>
#include <nuttx/sdio.h>
#include <nuttx/mmcsd.h>
#include <nuttx/leds/userled.h>
#include <stm32l4.h>
#include <stm32l4_uart.h>
@ -135,6 +136,16 @@ int board_app_initialize(uintptr_t arg)
}
#endif
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
/* Register the LED driver */
ret = userled_lower_initialize(LED_DRIVER_PATH);
if (ret < 0)
{
syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
}
#endif
#ifdef HAVE_RTC_DRIVER
/* Instantiate the STM32L4 lower-half RTC driver */