drivers/led: Decopule USERLED from ARCH_HAVE_LEDS
and let USERLED_LOWER depends on ARCH_HAVE_LEDS instead Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: Ie03e76d90b61a3d8d3457ccdd319a247b6075fa8
This commit is contained in:
parent
a61b8a13c6
commit
1ba1c34b01
@ -8,7 +8,6 @@ menu "LED Support"
|
|||||||
config USERLED
|
config USERLED
|
||||||
bool "LED driver"
|
bool "LED driver"
|
||||||
default n
|
default n
|
||||||
depends on ARCH_HAVE_LEDS
|
|
||||||
---help---
|
---help---
|
||||||
Enable standard user LED upper half driver.
|
Enable standard user LED upper half driver.
|
||||||
|
|
||||||
@ -17,6 +16,7 @@ if USERLED
|
|||||||
config USERLED_LOWER
|
config USERLED_LOWER
|
||||||
bool "Generic Lower Half LED Driver"
|
bool "Generic Lower Half LED Driver"
|
||||||
default n
|
default n
|
||||||
|
depends on ARCH_HAVE_LEDS
|
||||||
---help---
|
---help---
|
||||||
If the board supports the standard LED interfaces as
|
If the board supports the standard LED interfaces as
|
||||||
defined in include/nuttx/board.h header file, then this
|
defined in include/nuttx/board.h header file, then this
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/************************************************************************************
|
/****************************************************************************
|
||||||
* include/nuttx/leds/userled.h
|
* include/nuttx/leds/userled.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
||||||
@ -31,7 +31,7 @@
|
|||||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __INCLUDE_NUTTX_LEDS_USERLED_H
|
#ifndef __INCLUDE_NUTTX_LEDS_USERLED_H
|
||||||
#define __INCLUDE_NUTTX_LEDS_USERLED_H
|
#define __INCLUDE_NUTTX_LEDS_USERLED_H
|
||||||
@ -43,11 +43,10 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include <nuttx/fs/ioctl.h>
|
#include <nuttx/fs/ioctl.h>
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_HAVE_LEDS
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* ioctl commands */
|
/* ioctl commands */
|
||||||
|
|
||||||
/* Command: ULEDIOC_SUPPORTED
|
/* Command: ULEDIOC_SUPPORTED
|
||||||
@ -91,6 +90,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Types
|
* Public Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* This type is a bit set that contains the state of all LEDs as defined
|
/* This type is a bit set that contains the state of all LEDs as defined
|
||||||
* in arch/board/board.h. This is the value that is returned when reading
|
* in arch/board/board.h. This is the value that is returned when reading
|
||||||
* from or writing to the LED driver.
|
* from or writing to the LED driver.
|
||||||
@ -127,7 +127,8 @@ struct userled_lowerhalf_s
|
|||||||
{
|
{
|
||||||
/* Return the set of LEDs supported by the board */
|
/* Return the set of LEDs supported by the board */
|
||||||
|
|
||||||
CODE userled_set_t (*ll_supported)(FAR const struct userled_lowerhalf_s *lower);
|
CODE userled_set_t
|
||||||
|
(*ll_supported)(FAR const struct userled_lowerhalf_s *lower);
|
||||||
|
|
||||||
/* Set the current state of one LED */
|
/* Set the current state of one LED */
|
||||||
|
|
||||||
@ -197,5 +198,4 @@ int userled_lower_initialize(FAR const char *devname);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CONFIG_ARCH_HAVE_LEDS */
|
|
||||||
#endif /* __INCLUDE_NUTTX_LEDS_USERLED_H */
|
#endif /* __INCLUDE_NUTTX_LEDS_USERLED_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user