mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
drivers/led: Let board_userled_initialize return the led number
so the lower half driver don't need include the specific board.h Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: Icf6638a6865bac42150b5957376e55909f041d40
This commit is contained in:
committed by
Abdelatif Guettouche
parent
1ba1c34b01
commit
76965474ac
@@ -59,13 +59,14 @@
|
||||
* Name: board_userled_initialize
|
||||
****************************************************************************/
|
||||
|
||||
void board_userled_initialize(void)
|
||||
uint32_t board_userled_initialize(void)
|
||||
{
|
||||
/* Configure LED1-2 GPIOs for output */
|
||||
|
||||
sam_configgpio(GPIO_LED_L);
|
||||
sam_configgpio(GPIO_LED_RX);
|
||||
sam_configgpio(GPIO_LED_TX);
|
||||
return BOARD_NLEDS;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
* Name: board_userled_initialize
|
||||
****************************************************************************/
|
||||
|
||||
void board_userled_initialize(void)
|
||||
uint32_t board_userled_initialize(void)
|
||||
{
|
||||
#ifndef CONFIG_ARCH_LEDS
|
||||
/* Configure LED GPIOs for output */
|
||||
@@ -85,6 +85,7 @@ void board_userled_initialize(void)
|
||||
sam_configgpio(GPIO_LED_C);
|
||||
sam_configgpio(GPIO_LED_D);
|
||||
#endif
|
||||
return BOARD_NLEDS;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -77,9 +77,10 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void board_userled_initialize(void)
|
||||
uint32_t board_userled_initialize(void)
|
||||
{
|
||||
sam_configgpio(GPIO_LED0);
|
||||
return BOARD_NLEDS;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -60,11 +60,12 @@
|
||||
* Name: board_userled_initialize
|
||||
****************************************************************************/
|
||||
|
||||
void board_userled_initialize(void)
|
||||
uint32_t board_userled_initialize(void)
|
||||
{
|
||||
/* Configure D301 GPIO for output */
|
||||
|
||||
sam_configgpio(GPIO_D301);
|
||||
return BOARD_NLEDS;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -59,12 +59,13 @@
|
||||
* Name: board_userled_initialize
|
||||
****************************************************************************/
|
||||
|
||||
void board_userled_initialize(void)
|
||||
uint32_t board_userled_initialize(void)
|
||||
{
|
||||
/* Configure D9-2 GPIOs for output */
|
||||
|
||||
sam_configgpio(GPIO_D9);
|
||||
sam_configgpio(GPIO_D10);
|
||||
return BOARD_NLEDS;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user