mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:06:09 +08:00
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:
committed by
Gregory Nutt
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_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)
|
#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 ***************************************************************/
|
/* Button definitions ***************************************************************/
|
||||||
/* There are four push buttons on the board. Two of them are user controllable.
|
/* There are four push buttons on the board. Two of them are user controllable.
|
||||||
* The others are RESET and WAKE
|
* The others are RESET and WAKE
|
||||||
|
|||||||
@@ -58,6 +58,10 @@
|
|||||||
#include "tiva_qencoder.h"
|
#include "tiva_qencoder.h"
|
||||||
#include "tm4c1294-launchpad.h"
|
#include "tm4c1294-launchpad.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_USERLED_DRIVER
|
||||||
|
# include <nuttx/leds/userled.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -358,6 +362,18 @@ int tm4c_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#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);
|
UNUSED(ret);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user