mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +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
@@ -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 */
|
/* Initialization already performed in a1x_led_initialize */
|
||||||
|
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void board_userled(int led, bool ledon)
|
void board_userled(int led, bool ledon)
|
||||||
|
|||||||
@@ -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 */
|
/* Initialization already performed in am335x_led_initialize */
|
||||||
|
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void board_userled(int led, bool ledon)
|
void board_userled(int led, bool ledon)
|
||||||
|
|||||||
@@ -66,12 +66,13 @@
|
|||||||
* Name: board_userled_initialize
|
* 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_LED1, false);
|
||||||
cxd56_gpio_config(GPIO_LED2, false);
|
cxd56_gpio_config(GPIO_LED2, false);
|
||||||
cxd56_gpio_config(GPIO_LED3, false);
|
cxd56_gpio_config(GPIO_LED3, false);
|
||||||
cxd56_gpio_config(GPIO_LED4, false);
|
cxd56_gpio_config(GPIO_LED4, false);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED0-4 GPIOs for output */
|
/* Configure LED0-4 GPIOs for output */
|
||||||
|
|
||||||
@@ -183,6 +183,7 @@ void board_userled_initialize(void)
|
|||||||
efm32_configgpio(GPIO_LED1);
|
efm32_configgpio(GPIO_LED1);
|
||||||
efm32_configgpio(GPIO_LED2);
|
efm32_configgpio(GPIO_LED2);
|
||||||
efm32_configgpio(GPIO_LED3);
|
efm32_configgpio(GPIO_LED3);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -74,12 +74,13 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED PIOs for output */
|
/* Configure LED PIOs for output */
|
||||||
|
|
||||||
efm32_configgpio(GPIO_LED0);
|
efm32_configgpio(GPIO_LED0);
|
||||||
efm32_configgpio(GPIO_LED1);
|
efm32_configgpio(GPIO_LED1);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -55,11 +55,12 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED PIOs for output */
|
/* Configure LED PIOs for output */
|
||||||
|
|
||||||
imx_config_gpio(GPIO_LED);
|
imx_config_gpio(GPIO_LED);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -68,11 +68,12 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED GPIO for output */
|
/* Configure LED GPIO for output */
|
||||||
|
|
||||||
imxrt_config_gpio(GPIO_USERLED);
|
imxrt_config_gpio(GPIO_USERLED);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -69,11 +69,12 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED GPIO for output */
|
/* Configure LED GPIO for output */
|
||||||
|
|
||||||
imxrt_config_gpio(GPIO_LED);
|
imxrt_config_gpio(GPIO_LED);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -69,11 +69,12 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED GPIO for output */
|
/* Configure LED GPIO for output */
|
||||||
|
|
||||||
imxrt_config_gpio(GPIO_LED);
|
imxrt_config_gpio(GPIO_LED);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -61,11 +61,12 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
kinetis_pinconfig(GPIO_LED_R);
|
kinetis_pinconfig(GPIO_LED_R);
|
||||||
kinetis_pinconfig(GPIO_LED_G);
|
kinetis_pinconfig(GPIO_LED_G);
|
||||||
kinetis_pinconfig(GPIO_LED_B);
|
kinetis_pinconfig(GPIO_LED_B);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -60,11 +60,12 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
kinetis_pinconfig(GPIO_LED_R);
|
kinetis_pinconfig(GPIO_LED_R);
|
||||||
kinetis_pinconfig(GPIO_LED_G);
|
kinetis_pinconfig(GPIO_LED_G);
|
||||||
kinetis_pinconfig(GPIO_LED_B);
|
kinetis_pinconfig(GPIO_LED_B);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -61,11 +61,12 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
kinetis_pinconfig(GPIO_LED_R);
|
kinetis_pinconfig(GPIO_LED_R);
|
||||||
kinetis_pinconfig(GPIO_LED_G);
|
kinetis_pinconfig(GPIO_LED_G);
|
||||||
kinetis_pinconfig(GPIO_LED_B);
|
kinetis_pinconfig(GPIO_LED_B);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -55,9 +55,10 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
kinetis_pinconfig(GPIO_LED);
|
kinetis_pinconfig(GPIO_LED);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -87,12 +87,13 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED1-4 GPIOs for output */
|
/* Configure LED1-4 GPIOs for output */
|
||||||
|
|
||||||
lpc17_40_configgpio(GPIO_LED1);
|
lpc17_40_configgpio(GPIO_LED1);
|
||||||
lpc17_40_configgpio(GPIO_LED2);
|
lpc17_40_configgpio(GPIO_LED2);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED1-4 GPIOs for output */
|
/* Configure LED1-4 GPIOs for output */
|
||||||
|
|
||||||
@@ -95,6 +95,7 @@ void board_userled_initialize(void)
|
|||||||
lpc17_40_configgpio(GPIO_LED2);
|
lpc17_40_configgpio(GPIO_LED2);
|
||||||
lpc17_40_configgpio(GPIO_LED3);
|
lpc17_40_configgpio(GPIO_LED3);
|
||||||
lpc17_40_configgpio(GPIO_LED4);
|
lpc17_40_configgpio(GPIO_LED4);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -86,12 +86,13 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED1-2 GPIOs for output */
|
/* Configure LED1-2 GPIOs for output */
|
||||||
|
|
||||||
lpc17_40_configgpio(GPIO_LED1);
|
lpc17_40_configgpio(GPIO_LED1);
|
||||||
lpc17_40_configgpio(GPIO_LED2);
|
lpc17_40_configgpio(GPIO_LED2);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ static bool g_uninitialized = true;
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CONFIG_ARCH_LEDS
|
#ifndef CONFIG_ARCH_LEDS
|
||||||
void board_userled_initialize(void) /* Name when invoked externally */
|
uint32_t board_userled_initialize(void) /* Name when invoked externally */
|
||||||
#else
|
#else
|
||||||
void board_autoled_initialize(void) /* Name when invoked via lpc17_40_boot.c */
|
void board_autoled_initialize(void) /* Name when invoked via lpc17_40_boot.c */
|
||||||
#endif
|
#endif
|
||||||
@@ -100,6 +100,9 @@ void board_autoled_initialize(void) /* Name when invoked via lpc17_40_boot.c */
|
|||||||
lpc17_40_configgpio(LPC1766STK_LED2);
|
lpc17_40_configgpio(LPC1766STK_LED2);
|
||||||
|
|
||||||
led_dumpgpio("board_*led_initialize() Exit");
|
led_dumpgpio("board_*led_initialize() Exit");
|
||||||
|
#ifndef CONFIG_ARCH_LEDS
|
||||||
|
return BOARD_NLEDS;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED1-4 GPIOs for output */
|
/* Configure LED1-4 GPIOs for output */
|
||||||
|
|
||||||
@@ -95,6 +95,7 @@ void board_userled_initialize(void)
|
|||||||
lpc17_40_configgpio(GPIO_LED2);
|
lpc17_40_configgpio(GPIO_LED2);
|
||||||
lpc17_40_configgpio(GPIO_LED3);
|
lpc17_40_configgpio(GPIO_LED3);
|
||||||
lpc17_40_configgpio(GPIO_LED4);
|
lpc17_40_configgpio(GPIO_LED4);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -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() */
|
/* All initialization performed in board_autoled_initialize() */
|
||||||
|
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void board_userled(int led, bool ledon)
|
void board_userled(int led, bool ledon)
|
||||||
|
|||||||
@@ -305,7 +305,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ static void led_dumppins(FAR const char *msg)
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure all LED GPIO lines */
|
/* Configure all LED GPIO lines */
|
||||||
|
|
||||||
@@ -110,6 +110,7 @@ void board_userled_initialize(void)
|
|||||||
lpc43_gpio_config(GPIO_LED2);
|
lpc43_gpio_config(GPIO_LED2);
|
||||||
|
|
||||||
led_dumppins("board_userled_initialize() Exit");
|
led_dumppins("board_userled_initialize() Exit");
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -292,7 +292,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ static void led_dumppins(FAR const char *msg)
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure all LED GPIO lines */
|
/* Configure all LED GPIO lines */
|
||||||
|
|
||||||
@@ -109,6 +109,7 @@ void board_userled_initialize(void)
|
|||||||
lpc43_gpio_config(GPIO_LED2);
|
lpc43_gpio_config(GPIO_LED2);
|
||||||
|
|
||||||
led_dumppins("board_userled_initialize() Exit");
|
led_dumppins("board_userled_initialize() Exit");
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ LED and Pushbuttons
|
|||||||
control of the application. The following interfaces are then available
|
control of the application. The following interfaces are then available
|
||||||
for application control of the LEDs:
|
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(int led, bool ledon);
|
||||||
void board_userled_all(uint8_t ledset);
|
void board_userled_all(uint8_t ledset);
|
||||||
|
|
||||||
|
|||||||
@@ -275,7 +275,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ LED and Pushbuttons
|
|||||||
control of the application. The following interfaces are then available
|
control of the application. The following interfaces are then available
|
||||||
for application control of the LEDs:
|
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(int led, bool ledon);
|
||||||
void board_userled_all(uint8_t ledset);
|
void board_userled_all(uint8_t ledset);
|
||||||
|
|
||||||
|
|||||||
@@ -247,7 +247,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
@@ -105,7 +105,7 @@ static void led_dumppins(FAR const char *msg)
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED pin as a GPIO outputs */
|
/* Configure LED pin as a GPIO outputs */
|
||||||
|
|
||||||
@@ -117,6 +117,7 @@ void board_userled_initialize(void)
|
|||||||
lpc43_gpio_config(GPIO_LED);
|
lpc43_gpio_config(GPIO_LED);
|
||||||
|
|
||||||
led_dumppins("board_userled_initialize() Exit");
|
led_dumppins("board_userled_initialize() Exit");
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ LED and Pushbuttons
|
|||||||
control of the application. The following interfaces are then available
|
control of the application. The following interfaces are then available
|
||||||
for application control of the LEDs:
|
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(int led, bool ledon);
|
||||||
void board_userled_all(uint8_t ledset);
|
void board_userled_all(uint8_t ledset);
|
||||||
|
|
||||||
|
|||||||
@@ -270,7 +270,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ static void led_dumppins(FAR const char *msg)
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED pin as a GPIO outputs */
|
/* Configure LED pin as a GPIO outputs */
|
||||||
|
|
||||||
@@ -91,6 +91,7 @@ void board_userled_initialize(void)
|
|||||||
lpc43_gpio_config(GPIO_LED);
|
lpc43_gpio_config(GPIO_LED);
|
||||||
|
|
||||||
led_dumppins("board_userled_initialize() Exit");
|
led_dumppins("board_userled_initialize() Exit");
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
#ifndef CONFIG_ARCH_LEDS
|
#ifndef CONFIG_ARCH_LEDS
|
||||||
/* Configure LED GPIOs for output */
|
/* 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_D11);
|
||||||
lpc54_gpio_config(GPIO_LED_D12);
|
lpc54_gpio_config(GPIO_LED_D12);
|
||||||
#endif
|
#endif
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -56,11 +56,12 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED PIOs for output */
|
/* Configure LED PIOs for output */
|
||||||
|
|
||||||
max326_gpio_config(GPIO_LED);
|
max326_gpio_config(GPIO_LED);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -91,6 +91,6 @@ Where <subdir> is one of the following:
|
|||||||
control of the application. The following interfaces are then available
|
control of the application. The following interfaces are then available
|
||||||
for application control of the LEDs:
|
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(int led, bool ledon);
|
||||||
void board_userled_all(uint8_t ledset);
|
void board_userled_all(uint8_t ledset);
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
@@ -109,7 +109,7 @@ static void led_dumppins(FAR const char *msg)
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -125,6 +125,7 @@ void board_userled_initialize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
led_dumppins("board_userled_initialize() Exit");
|
led_dumppins("board_userled_initialize() Exit");
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -102,6 +102,6 @@ Where <subdir> is one of the following:
|
|||||||
control of the application. The following interfaces are then available
|
control of the application. The following interfaces are then available
|
||||||
for application control of the LEDs:
|
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(int led, bool ledon);
|
||||||
void board_userled_all(uint8_t ledset);
|
void board_userled_all(uint8_t ledset);
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
@@ -115,7 +115,7 @@ static void led_dumppins(FAR const char *msg)
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -131,6 +131,7 @@ void board_userled_initialize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
led_dumppins("board_userled_initialize() Exit");
|
led_dumppins("board_userled_initialize() Exit");
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
@@ -115,7 +115,7 @@ static void led_dumppins(FAR const char *msg)
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -131,6 +131,7 @@ void board_userled_initialize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
led_dumppins("board_userled_initialize() Exit");
|
led_dumppins("board_userled_initialize() Exit");
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
* control of the application. The following interfaces are then available
|
* control of the application. The following interfaces are then available
|
||||||
* for application control of the LEDs:
|
* 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(int led, bool ledon);
|
||||||
* void board_userled_all(uint8_t ledset);
|
* void board_userled_all(uint8_t ledset);
|
||||||
*/
|
*/
|
||||||
@@ -115,7 +115,7 @@ static void led_dumppins(FAR const char *msg)
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -131,6 +131,7 @@ void board_userled_initialize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
led_dumppins("board_userled_initialize() Exit");
|
led_dumppins("board_userled_initialize() Exit");
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -63,13 +63,14 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED GPIOs for output */
|
/* Configure LED GPIOs for output */
|
||||||
|
|
||||||
s32k1xx_pinconfig(GPIO_LED_R);
|
s32k1xx_pinconfig(GPIO_LED_R);
|
||||||
s32k1xx_pinconfig(GPIO_LED_G);
|
s32k1xx_pinconfig(GPIO_LED_G);
|
||||||
s32k1xx_pinconfig(GPIO_LED_B);
|
s32k1xx_pinconfig(GPIO_LED_B);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -63,13 +63,14 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED GPIOs for output */
|
/* Configure LED GPIOs for output */
|
||||||
|
|
||||||
s32k1xx_pinconfig(GPIO_LED_R);
|
s32k1xx_pinconfig(GPIO_LED_R);
|
||||||
s32k1xx_pinconfig(GPIO_LED_G);
|
s32k1xx_pinconfig(GPIO_LED_G);
|
||||||
s32k1xx_pinconfig(GPIO_LED_B);
|
s32k1xx_pinconfig(GPIO_LED_B);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -63,13 +63,14 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED GPIOs for output */
|
/* Configure LED GPIOs for output */
|
||||||
|
|
||||||
s32k1xx_pinconfig(GPIO_LED_R);
|
s32k1xx_pinconfig(GPIO_LED_R);
|
||||||
s32k1xx_pinconfig(GPIO_LED_G);
|
s32k1xx_pinconfig(GPIO_LED_G);
|
||||||
s32k1xx_pinconfig(GPIO_LED_B);
|
s32k1xx_pinconfig(GPIO_LED_B);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -63,13 +63,14 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED GPIOs for output */
|
/* Configure LED GPIOs for output */
|
||||||
|
|
||||||
s32k1xx_pinconfig(GPIO_LED_R);
|
s32k1xx_pinconfig(GPIO_LED_R);
|
||||||
s32k1xx_pinconfig(GPIO_LED_G);
|
s32k1xx_pinconfig(GPIO_LED_G);
|
||||||
s32k1xx_pinconfig(GPIO_LED_B);
|
s32k1xx_pinconfig(GPIO_LED_B);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -63,13 +63,14 @@
|
|||||||
* Name: board_userled_initialize
|
* Name: board_userled_initialize
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void board_userled_initialize(void)
|
uint32_t board_userled_initialize(void)
|
||||||
{
|
{
|
||||||
/* Configure LED GPIOs for output */
|
/* Configure LED GPIOs for output */
|
||||||
|
|
||||||
s32k1xx_pinconfig(GPIO_LED_R);
|
s32k1xx_pinconfig(GPIO_LED_R);
|
||||||
s32k1xx_pinconfig(GPIO_LED_G);
|
s32k1xx_pinconfig(GPIO_LED_G);
|
||||||
s32k1xx_pinconfig(GPIO_LED_B);
|
s32k1xx_pinconfig(GPIO_LED_B);
|
||||||
|
return BOARD_NLEDS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user