mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
Userled driver: Add option to check actual pin state with getall
This commit is contained in:
committed by
David Sidrane
parent
9a0146f15f
commit
b1d5eff52d
@@ -673,6 +673,28 @@ void board_userled(int led, bool ledon);
|
||||
void board_userled_all(uint32_t ledset);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_userled_getall
|
||||
*
|
||||
* Description:
|
||||
* This interface may be used by application specific logic to read the
|
||||
* state of all board LEDs. Definitions for the led set member
|
||||
* identification is provided in the board-specific board.h header file
|
||||
* that may be included like:
|
||||
*
|
||||
* #included <arch/board/board.h>
|
||||
*
|
||||
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board
|
||||
* LEDs. If CONFIG_ARCH_LEDS is not defined, then this interfaces may be
|
||||
* available to check the LEDs directly from user board logic or indirectly
|
||||
* user applications (via the common LED character driver).
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_ARCH_HAVE_LEDS) && defined(CONFIG_USERLED_LOWER_READSTATE)
|
||||
void board_userled_getall(uint32_t *ledset);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_button_initialize
|
||||
*
|
||||
|
||||
@@ -126,6 +126,13 @@ struct userled_lowerhalf_s
|
||||
|
||||
CODE void (*ll_setall)(FAR const struct userled_lowerhalf_s *lower,
|
||||
userled_set_t ledset);
|
||||
|
||||
#ifdef CONFIG_USERLED_LOWER_READSTATE
|
||||
/* Get the state of all LEDs */
|
||||
|
||||
CODE void (*ll_getall)(FAR const struct userled_lowerhalf_s *lower,
|
||||
userled_set_t *ledset);
|
||||
#endif
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user