configs/tm4c1294-launchpad/src/tm4c_bringup.c: Enables /dev/userleds for tm4c1294-launchpad by calling userled_lower_initialize() in tm4c_bringup().
This commit is contained in:
parent
0a4c592a4b
commit
497db422c3
@ -111,6 +111,13 @@
|
||||
#define GPIO_LED_D3 (GPIO_FUNC_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORTF | GPIO_PIN_4)
|
||||
#define GPIO_LED_D4 (GPIO_FUNC_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORTF | GPIO_PIN_0)
|
||||
|
||||
/* Check if we have the LED driver */
|
||||
|
||||
#define HAVE_USERLED_DRIVER 1
|
||||
#if !defined(CONFIG_USERLED) || !defined(CONFIG_USERLED_LOWER)
|
||||
# undef HAVE_USERLED_DRIVER
|
||||
#endif
|
||||
|
||||
/* Button definitions ***************************************************************/
|
||||
/* There are four push buttons on the board. Two of them are user controllable.
|
||||
* The others are RESET and WAKE
|
||||
|
@ -58,6 +58,10 @@
|
||||
#include "tiva_qencoder.h"
|
||||
#include "tm4c1294-launchpad.h"
|
||||
|
||||
#ifdef HAVE_USERLED_DRIVER
|
||||
# include <nuttx/leds/userled.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@ -358,6 +362,18 @@ int tm4c_bringup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_USERLED_DRIVER
|
||||
/* Register the LED driver */
|
||||
|
||||
ret = userled_lower_initialize("/dev/userleds");
|
||||
if (ret != OK)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
UNUSED(ret);
|
||||
return OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user