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:
Xiang Xiao 2020-06-05 18:08:02 +08:00 committed by Abdelatif Guettouche
parent 1ba1c34b01
commit 76965474ac
136 changed files with 281 additions and 154 deletions

View file

@ -217,9 +217,11 @@ void board_autoled_off(int led)
*
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Initialization already performed in a1x_led_initialize */
return BOARD_NLEDS;
}
void board_userled(int led, bool ledon)

View file

@ -219,9 +219,11 @@ void board_autoled_off(int led)
*
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Initialization already performed in am335x_led_initialize */
return BOARD_NLEDS;
}
void board_userled(int led, bool ledon)

View file

@ -66,12 +66,13 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
cxd56_gpio_config(GPIO_LED1, false);
cxd56_gpio_config(GPIO_LED2, false);
cxd56_gpio_config(GPIO_LED3, false);
cxd56_gpio_config(GPIO_LED4, false);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -175,7 +175,7 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED0-4 GPIOs for output */
@ -183,6 +183,7 @@ void board_userled_initialize(void)
efm32_configgpio(GPIO_LED1);
efm32_configgpio(GPIO_LED2);
efm32_configgpio(GPIO_LED3);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -74,12 +74,13 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED PIOs for output */
efm32_configgpio(GPIO_LED0);
efm32_configgpio(GPIO_LED1);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -55,11 +55,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED PIOs for output */
imx_config_gpio(GPIO_LED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -68,11 +68,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED GPIO for output */
imxrt_config_gpio(GPIO_USERLED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -69,11 +69,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED GPIO for output */
imxrt_config_gpio(GPIO_LED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -69,11 +69,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED GPIO for output */
imxrt_config_gpio(GPIO_LED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -61,11 +61,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
kinetis_pinconfig(GPIO_LED_R);
kinetis_pinconfig(GPIO_LED_G);
kinetis_pinconfig(GPIO_LED_B);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -60,11 +60,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
kinetis_pinconfig(GPIO_LED_R);
kinetis_pinconfig(GPIO_LED_G);
kinetis_pinconfig(GPIO_LED_B);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -61,11 +61,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
kinetis_pinconfig(GPIO_LED_R);
kinetis_pinconfig(GPIO_LED_G);
kinetis_pinconfig(GPIO_LED_B);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -55,9 +55,10 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
kinetis_pinconfig(GPIO_LED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -87,12 +87,13 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
lpc17_40_configgpio(GPIO_LED1);
lpc17_40_configgpio(GPIO_LED2);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -87,7 +87,7 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@ -95,6 +95,7 @@ void board_userled_initialize(void)
lpc17_40_configgpio(GPIO_LED2);
lpc17_40_configgpio(GPIO_LED3);
lpc17_40_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -86,12 +86,13 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-2 GPIOs for output */
lpc17_40_configgpio(GPIO_LED1);
lpc17_40_configgpio(GPIO_LED2);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -87,7 +87,7 @@ static bool g_uninitialized = true;
****************************************************************************/
#ifndef CONFIG_ARCH_LEDS
void board_userled_initialize(void) /* Name when invoked externally */
uint32_t board_userled_initialize(void) /* Name when invoked externally */
#else
void board_autoled_initialize(void) /* Name when invoked via lpc17_40_boot.c */
#endif
@ -100,6 +100,9 @@ void board_autoled_initialize(void) /* Name when invoked via lpc17_40_boot.c */
lpc17_40_configgpio(LPC1766STK_LED2);
led_dumpgpio("board_*led_initialize() Exit");
#ifndef CONFIG_ARCH_LEDS
return BOARD_NLEDS;
#endif
}
/****************************************************************************

View file

@ -87,7 +87,7 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@ -95,6 +95,7 @@ void board_userled_initialize(void)
lpc17_40_configgpio(GPIO_LED2);
lpc17_40_configgpio(GPIO_LED3);
lpc17_40_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -173,9 +173,11 @@ void board_autoled_off(int led)
*
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* All initialization performed in board_autoled_initialize() */
return BOARD_NLEDS;
}
void board_userled(int led, bool ledon)

View file

@ -305,7 +305,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/

View file

@ -83,7 +83,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/

View file

@ -95,7 +95,7 @@ static void led_dumppins(FAR const char *msg)
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure all LED GPIO lines */
@ -110,6 +110,7 @@ void board_userled_initialize(void)
lpc43_gpio_config(GPIO_LED2);
led_dumppins("board_userled_initialize() Exit");
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -292,7 +292,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/

View file

@ -82,7 +82,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/

View file

@ -94,7 +94,7 @@ static void led_dumppins(FAR const char *msg)
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure all LED GPIO lines */
@ -109,6 +109,7 @@ void board_userled_initialize(void)
lpc43_gpio_config(GPIO_LED2);
led_dumppins("board_userled_initialize() Exit");
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -339,7 +339,7 @@ LED and Pushbuttons
control of the application. The following interfaces are then available
for application control of the LEDs:
void board_userled_initialize(void);
uint32_t board_userled_initialize(void);
void board_userled(int led, bool ledon);
void board_userled_all(uint8_t ledset);

View file

@ -275,7 +275,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/

View file

@ -336,7 +336,7 @@ LED and Pushbuttons
control of the application. The following interfaces are then available
for application control of the LEDs:
void board_userled_initialize(void);
uint32_t board_userled_initialize(void);
void board_userled(int led, bool ledon);
void board_userled_all(uint8_t ledset);

View file

@ -247,7 +247,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/

View file

@ -74,7 +74,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/
@ -105,7 +105,7 @@ static void led_dumppins(FAR const char *msg)
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED pin as a GPIO outputs */
@ -117,6 +117,7 @@ void board_userled_initialize(void)
lpc43_gpio_config(GPIO_LED);
led_dumppins("board_userled_initialize() Exit");
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -339,7 +339,7 @@ LED and Pushbuttons
control of the application. The following interfaces are then available
for application control of the LEDs:
void board_userled_initialize(void);
uint32_t board_userled_initialize(void);
void board_userled(int led, bool ledon);
void board_userled_all(uint8_t ledset);

View file

@ -270,7 +270,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/

View file

@ -79,7 +79,7 @@ static void led_dumppins(FAR const char *msg)
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED pin as a GPIO outputs */
@ -91,6 +91,7 @@ void board_userled_initialize(void)
lpc43_gpio_config(GPIO_LED);
led_dumppins("board_userled_initialize() Exit");
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -62,7 +62,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 */
@ -71,6 +71,7 @@ void board_userled_initialize(void)
lpc54_gpio_config(GPIO_LED_D11);
lpc54_gpio_config(GPIO_LED_D12);
#endif
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -56,11 +56,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED PIOs for output */
max326_gpio_config(GPIO_LED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -91,6 +91,6 @@ Where <subdir> is one of the following:
control of the application. The following interfaces are then available
for application control of the LEDs:
void board_userled_initialize(void);
uint32_t board_userled_initialize(void);
void board_userled(int led, bool ledon);
void board_userled_all(uint8_t ledset);

View file

@ -88,7 +88,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/

View file

@ -63,7 +63,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/
@ -109,7 +109,7 @@ static void led_dumppins(FAR const char *msg)
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
int i;
@ -125,6 +125,7 @@ void board_userled_initialize(void)
}
led_dumppins("board_userled_initialize() Exit");
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -102,6 +102,6 @@ Where <subdir> is one of the following:
control of the application. The following interfaces are then available
for application control of the LEDs:
void board_userled_initialize(void);
uint32_t board_userled_initialize(void);
void board_userled(int led, bool ledon);
void board_userled_all(uint8_t ledset);

View file

@ -92,7 +92,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/

View file

@ -63,7 +63,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/
@ -115,7 +115,7 @@ static void led_dumppins(FAR const char *msg)
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
int i;
@ -131,6 +131,7 @@ void board_userled_initialize(void)
}
led_dumppins("board_userled_initialize() Exit");
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -92,7 +92,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/

View file

@ -63,7 +63,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/
@ -115,7 +115,7 @@ static void led_dumppins(FAR const char *msg)
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
int i;
@ -131,6 +131,7 @@ void board_userled_initialize(void)
}
led_dumppins("board_userled_initialize() Exit");
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -86,7 +86,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/

View file

@ -63,7 +63,7 @@
* control of the application. The following interfaces are then available
* for application control of the LEDs:
*
* void board_userled_initialize(void);
* uint32_t board_userled_initialize(void);
* void board_userled(int led, bool ledon);
* void board_userled_all(uint8_t ledset);
*/
@ -115,7 +115,7 @@ static void led_dumppins(FAR const char *msg)
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
int i;
@ -131,6 +131,7 @@ void board_userled_initialize(void)
}
led_dumppins("board_userled_initialize() Exit");
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -63,13 +63,14 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED GPIOs for output */
s32k1xx_pinconfig(GPIO_LED_R);
s32k1xx_pinconfig(GPIO_LED_G);
s32k1xx_pinconfig(GPIO_LED_B);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -63,13 +63,14 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED GPIOs for output */
s32k1xx_pinconfig(GPIO_LED_R);
s32k1xx_pinconfig(GPIO_LED_G);
s32k1xx_pinconfig(GPIO_LED_B);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -63,13 +63,14 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED GPIOs for output */
s32k1xx_pinconfig(GPIO_LED_R);
s32k1xx_pinconfig(GPIO_LED_G);
s32k1xx_pinconfig(GPIO_LED_B);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -63,13 +63,14 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED GPIOs for output */
s32k1xx_pinconfig(GPIO_LED_R);
s32k1xx_pinconfig(GPIO_LED_G);
s32k1xx_pinconfig(GPIO_LED_B);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -63,13 +63,14 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED GPIOs for output */
s32k1xx_pinconfig(GPIO_LED_R);
s32k1xx_pinconfig(GPIO_LED_G);
s32k1xx_pinconfig(GPIO_LED_B);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -63,13 +63,14 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED GPIOs for output */
s32k1xx_pinconfig(GPIO_LED_R);
s32k1xx_pinconfig(GPIO_LED_G);
s32k1xx_pinconfig(GPIO_LED_B);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -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;
}
/****************************************************************************

View file

@ -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;
}
/****************************************************************************

View file

@ -77,9 +77,10 @@
*
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
sam_configgpio(GPIO_LED0);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -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;
}
/****************************************************************************

View file

@ -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;
}
/****************************************************************************

View file

@ -55,7 +55,7 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED PIOs for output */
@ -63,6 +63,7 @@ void board_userled_initialize(void)
sam_configpio(PIO_LED_GREEN);
#endif
sam_configpio(PIO_LED_BLUE);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -71,12 +71,13 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED PIOs for output */
sam_configpio(PIO_BLUE);
sam_configpio(PIO_RED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -71,7 +71,7 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED PIOs for output */
@ -79,6 +79,7 @@ void board_userled_initialize(void)
#ifndef CONFIG_SAMA5D3xEK_NOREDLED
sam_configpio(PIO_RED);
#endif
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -78,12 +78,13 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED PIOs for output */
sam_configpio(PIO_LED_USER);
sam_configpio(PIO_LED_POWER);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -75,9 +75,10 @@
*
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
sam_configport(PORT_STATUS_LED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -78,9 +78,10 @@
*
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
sam_configport(PORT_STATUS_LED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -78,9 +78,10 @@
*
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
sam_configport(PORT_STATUS_LED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -78,9 +78,10 @@
*
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
sam_configport(PORT_STATUS_LED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -182,9 +182,10 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
sam_portconfig(PORT_STATUS_LED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -179,9 +179,10 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
(void)sam_portconfig(PORT_STATUS_LED);
sam_portconfig(PORT_STATUS_LED);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -64,11 +64,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED PIOs for output */
sam_configgpio(GPIO_LED0);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -64,12 +64,13 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED GPIOs for output */
sam_configgpio(GPIO_LED0);
sam_configgpio(GPIO_LED1);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -75,12 +75,13 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-2 GPIOs for output */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -48,7 +48,7 @@
* defined.
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED GPIOs for output */
@ -56,6 +56,7 @@ void board_userled_initialize(void)
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -52,12 +52,13 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-2 GPIOs for output */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -72,7 +72,7 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-3 GPIOs for output */
@ -80,6 +80,7 @@ void board_userled_initialize(void)
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -71,13 +71,14 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
return 3;
}
/****************************************************************************

View file

@ -58,11 +58,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1 GPIO for output */
stm32_configgpio(GPIO_LED1);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -86,7 +86,7 @@ static const uint32_t g_ledcfg[BOARD_NLEDS] =
*
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
int i;
@ -96,6 +96,8 @@ void board_userled_initialize(void)
{
stm32_configgpio(g_ledcfg[i]);
}
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -58,11 +58,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1 GPIO for output */
stm32_configgpio(GPIO_LED1);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -60,11 +60,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1 GPIO for output */
stm32_configgpio(GPIO_LED1);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -86,7 +86,7 @@ static const uint32_t g_ledcfg[BOARD_NLEDS] =
*
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
int i;
@ -96,6 +96,8 @@ void board_userled_initialize(void)
{
stm32_configgpio(g_ledcfg[i]);
}
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -168,11 +168,12 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LD2 GPIO for output */
stm32_configgpio(GPIO_LD2);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -71,7 +71,7 @@ static const uint32_t g_ledcfg[BOARD_NLEDS] =
*
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
int i;
@ -81,6 +81,8 @@ void board_userled_initialize(void)
{
stm32_configgpio(g_ledcfg[i]);
}
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -168,11 +168,12 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LD2 GPIO for output */
stm32_configgpio(GPIO_LD2);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -169,11 +169,12 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LD2 GPIO for output */
stm32_configgpio(GPIO_LD2);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -58,11 +58,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1 GPIO for output */
stm32_configgpio(GPIO_LED1);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -75,11 +75,12 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED_STATUS);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -66,11 +66,12 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED_STATUS);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -71,11 +71,12 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED_STATUS);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -78,7 +78,7 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@ -86,6 +86,7 @@ void board_userled_initialize(void)
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -78,7 +78,7 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@ -86,6 +86,7 @@ void board_userled_initialize(void)
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -197,7 +197,7 @@ void stm32_usb_set_pwr_callback(xcpt_t pwr_changed_handler);
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void stm32_led_initialize(void);
uint32_t stm32_led_initialize(void);
#endif
/****************************************************************************

View file

@ -83,9 +83,9 @@ static bool g_initialized = false;
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void stm32_led_initialize(void)
uint32_t stm32_led_initialize(void)
#else
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
#endif
{
/* Configure all LED GPIO lines */
@ -96,6 +96,7 @@ void board_userled_initialize(void)
stm32_configgpio(GPIO_LED_GREEN);
led_dumpgpio("board_*led_initialize() Exit");
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -184,12 +184,14 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
for (unsigned wled = 0; wled < BOARD_NLEDS; wled++)
{
stm32_configgpio(g_ledcfg[wled]);
}
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -55,11 +55,12 @@
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure Photon LED gpio as output */
stm32_configgpio(GPIO_LED1);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -71,7 +71,7 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@ -79,6 +79,7 @@ void board_userled_initialize(void)
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -71,7 +71,7 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@ -79,6 +79,7 @@ void board_userled_initialize(void)
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -71,7 +71,7 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@ -79,6 +79,7 @@ void board_userled_initialize(void)
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -214,9 +214,11 @@ void board_autoled_off(int led)
* this function is empty.
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Already initialized by stm32_led_initialize. */
return BOARD_NLEDS;
}
/*****************************************************************************

View file

@ -69,7 +69,7 @@ static const uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
int i;
@ -79,6 +79,8 @@ void board_userled_initialize(void)
{
stm32_configgpio(g_ledcfg[i]);
}
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -70,7 +70,7 @@ static const uint32_t g_ledcfg[BOARD_NLEDS] =
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
int i;
@ -80,6 +80,8 @@ void board_userled_initialize(void)
{
stm32_configgpio(g_ledcfg[i]);
}
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -179,12 +179,13 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
return BOARD_NLEDS;
}
/****************************************************************************

View file

@ -181,7 +181,7 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
* Name: board_userled_initialize
****************************************************************************/
void board_userled_initialize(void)
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
@ -189,6 +189,7 @@ void board_userled_initialize(void)
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}
/****************************************************************************

Some files were not shown because too many files have changed in this diff Show more