diff --git a/configs/amber/src/amber_internal.h b/configs/amber/src/amber_internal.h index 167c06c585..3634ffe7d1 100644 --- a/configs/amber/src/amber_internal.h +++ b/configs/amber/src/amber_internal.h @@ -82,7 +82,7 @@ void weak_function atmega_spiinitialize(void); #endif /************************************************************************************ - * Name: atmega_ledinit + * Name: atmega_led_initialize * * Description: * Configure on-board LEDs if LED support has been selected. @@ -90,7 +90,7 @@ void weak_function atmega_spiinitialize(void); ************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void atmega_ledinit(void); +void atmega_led_initialize(void); #endif #undef EXTERN diff --git a/configs/amber/src/atmega_boot.c b/configs/amber/src/atmega_boot.c index d568340a4e..980d5d489f 100644 --- a/configs/amber/src/atmega_boot.c +++ b/configs/amber/src/atmega_boot.c @@ -87,6 +87,6 @@ void atmega_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - atmega_ledinit(); + atmega_led_initialize(); #endif } diff --git a/configs/arduino-due/src/sam_userleds.c b/configs/arduino-due/src/sam_userleds.c index c7d1989cfe..b461812e50 100644 --- a/configs/arduino-due/src/sam_userleds.c +++ b/configs/arduino-due/src/sam_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/arduino-due/src/sam_userleds.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -88,10 +88,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { /* Configure LED1-2 GPIOs for output */ @@ -101,10 +101,10 @@ void sam_ledinit(void) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint32_t ledcfg; @@ -131,10 +131,10 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setleds + * Name: board_userled_all ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { bool ledon; diff --git a/configs/cc3200-launchpad/src/cc3200_autoleds.c b/configs/cc3200-launchpad/src/cc3200_autoleds.c index ecb0c8e69c..01c944eb52 100644 --- a/configs/cc3200-launchpad/src/cc3200_autoleds.c +++ b/configs/cc3200-launchpad/src/cc3200_autoleds.c @@ -121,7 +121,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: cc3200_ledinit + * Name: cc3200_led_initialize * * Description: * Called to initialize the on-board LEDs. diff --git a/configs/cc3200-launchpad/src/cc3200_boot.c b/configs/cc3200-launchpad/src/cc3200_boot.c index 73887274fa..5cf1cfe05c 100644 --- a/configs/cc3200-launchpad/src/cc3200_boot.c +++ b/configs/cc3200-launchpad/src/cc3200_boot.c @@ -104,7 +104,7 @@ void tiva_boardinitialize(void) cc3200_print("\r\nCC3200 init\r\n"); - cc3200_ledinit(); + cc3200_led_initialize(); } /**************************************************************************** diff --git a/configs/cc3200-launchpad/src/cc3200_leds.c b/configs/cc3200-launchpad/src/cc3200_leds.c index c9c402ff60..e8e231113f 100644 --- a/configs/cc3200-launchpad/src/cc3200_leds.c +++ b/configs/cc3200-launchpad/src/cc3200_leds.c @@ -19,10 +19,10 @@ #define LED3_GPIO 11 /**************************************************************************** - * Name: cc3200_ledinit + * Name: cc3200_led_initialize ****************************************************************************/ -void cc3200_ledinit(void) +void cc3200_led_initialize(void) { uint32_t led1_port; uint8_t led1_pin; diff --git a/configs/cloudctrl/src/stm32_userleds.c b/configs/cloudctrl/src/stm32_userleds.c index d68f450a5c..81da25d494 100644 --- a/configs/cloudctrl/src/stm32_userleds.c +++ b/configs/cloudctrl/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/cloudctrl/src/stm32_userleds.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * Darcy Gong * @@ -89,10 +89,10 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { /* Configure LED1-3 GPIOs for output */ @@ -103,10 +103,10 @@ void stm32_ledinit(void) } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -115,10 +115,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0); stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0); diff --git a/configs/dk-tm4c129x/src/dk-tm4c129x.h b/configs/dk-tm4c129x/src/dk-tm4c129x.h index 717bea0cb8..8ef4046cb4 100644 --- a/configs/dk-tm4c129x/src/dk-tm4c129x.h +++ b/configs/dk-tm4c129x/src/dk-tm4c129x.h @@ -148,7 +148,7 @@ void weak_function tm4c_ssiinitialize(void); /**************************************************************************** - * Name: tm4c_ledinit + * Name: tm4c_led_initialize * * Description: * Called to initialize the on-board LEDs. @@ -156,7 +156,7 @@ void weak_function tm4c_ssiinitialize(void); ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void tm4c_ledinit(void); +void tm4c_led_initialize(void); #endif /**************************************************************************** diff --git a/configs/dk-tm4c129x/src/tm4c_autoleds.c b/configs/dk-tm4c129x/src/tm4c_autoleds.c index b86cf40798..782e9d42c4 100644 --- a/configs/dk-tm4c129x/src/tm4c_autoleds.c +++ b/configs/dk-tm4c129x/src/tm4c_autoleds.c @@ -52,7 +52,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: tm4c_ledinit + * Name: tm4c_led_initialize * * Description: * Called to initialize the on-board LEDs. @@ -60,7 +60,7 @@ ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void tm4c_ledinit(void) +void tm4c_led_initialize(void) { /* Configure LED PIOs for output */ diff --git a/configs/dk-tm4c129x/src/tm4c_boot.c b/configs/dk-tm4c129x/src/tm4c_boot.c index 0e2f48fbee..399ce83820 100644 --- a/configs/dk-tm4c129x/src/tm4c_boot.c +++ b/configs/dk-tm4c129x/src/tm4c_boot.c @@ -88,7 +88,7 @@ void tiva_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - tm4c_ledinit(); + tm4c_led_initialize(); #endif } diff --git a/configs/dk-tm4c129x/src/tm4c_userleds.c b/configs/dk-tm4c129x/src/tm4c_userleds.c index 087d7367db..623091f8af 100644 --- a/configs/dk-tm4c129x/src/tm4c_userleds.c +++ b/configs/dk-tm4c129x/src/tm4c_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/dk-tm4c129x/src/tm4c_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -83,10 +83,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: tiva_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void tiva_ledinit(void) +void board_userled_initialize(void) { /* Configure LED PIOs for output */ @@ -96,10 +96,10 @@ void tiva_ledinit(void) } /**************************************************************************** - * Name: tiva_setled + * Name: board_userled ****************************************************************************/ -void tiva_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint32_t ledcfg; @@ -124,10 +124,10 @@ void tiva_setled(int led, bool ledon) } /**************************************************************************** - * Name: tiva_setleds + * Name: board_userled_all ****************************************************************************/ -void tiva_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { bool ledon; diff --git a/configs/efm32-g8xx-stk/src/efm32_userleds.c b/configs/efm32-g8xx-stk/src/efm32_userleds.c index 201e564ff5..73a40db332 100644 --- a/configs/efm32-g8xx-stk/src/efm32_userleds.c +++ b/configs/efm32-g8xx-stk/src/efm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/efm32-g8xx-stk/src/efm32_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -188,10 +188,10 @@ static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ /**************************************************************************** - * Name: efm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void efm32_ledinit(void) +void board_userled_initialize(void) { /* Configure LED0-4 GPIOs for output */ @@ -202,10 +202,10 @@ void efm32_ledinit(void) } /**************************************************************************** - * Name: efm32_setled + * Name: board_userled ****************************************************************************/ -void efm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -214,10 +214,10 @@ void efm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: efm32_setleds + * Name: board_userled_all ****************************************************************************/ -void efm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { efm32_gpiowrite(GPIO_LED0, (ledset & BOARD_LED0_BIT) != 0); efm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) != 0); diff --git a/configs/efm32gg-stk3700/src/efm32_userleds.c b/configs/efm32gg-stk3700/src/efm32_userleds.c index de481a7bce..10b4f4df9b 100644 --- a/configs/efm32gg-stk3700/src/efm32_userleds.c +++ b/configs/efm32gg-stk3700/src/efm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/efm32gg-stk3700/include/efm32_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -82,31 +82,15 @@ # define ledvdbg(x...) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: efm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void efm32_ledinit(void) +void board_userled_initialize(void) { /* Configure LED PIOs for output */ @@ -115,10 +99,10 @@ void efm32_ledinit(void) } /**************************************************************************** - * Name: efm32_setled + * Name: board_userled ****************************************************************************/ -void efm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint32_t ledcfg; @@ -139,12 +123,12 @@ void efm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: efm32_setleds + * Name: board_userled_all ****************************************************************************/ -void efm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { - /* Hight illuminates */ + /* High illuminates */ efm32_gpiowrite(GPIO_LED0, (ledset & BOARD_LED0_BIT) != 0); efm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) != 0); diff --git a/configs/fire-stm32v2/src/stm32_userleds.c b/configs/fire-stm32v2/src/stm32_userleds.c index ef41e50629..3d7a66d4eb 100644 --- a/configs/fire-stm32v2/src/stm32_userleds.c +++ b/configs/fire-stm32v2/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/fire-stm32v2/src/stm32_userleds.c * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -88,10 +88,10 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { /* Configure LED1-4 GPIOs for output */ @@ -101,7 +101,7 @@ void stm32_ledinit(void) } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled * * Description: * Set one LED to the 'ledon' state. The LEDs are pulled up and, hence, @@ -109,7 +109,7 @@ void stm32_ledinit(void) * ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -118,7 +118,7 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all * * Description: * Set each LED to the bit encoded state. The LEDs are pulled up and, @@ -126,7 +126,7 @@ void stm32_setled(int led, bool ledon) * ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0); stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0); diff --git a/configs/freedom-kl25z/src/freedom-kl25z.h b/configs/freedom-kl25z/src/freedom-kl25z.h index 3d1c97d9c7..008770eada 100644 --- a/configs/freedom-kl25z/src/freedom-kl25z.h +++ b/configs/freedom-kl25z/src/freedom-kl25z.h @@ -126,7 +126,7 @@ void weak_function kl_usbinitialize(void); #endif /**************************************************************************************************** - * Name: kl_ledinit + * Name: kl_led_initialize * * Description: * Initialize the on-board LED @@ -134,7 +134,7 @@ void weak_function kl_usbinitialize(void); ****************************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void kl_ledinit(void); +void kl_led_initialize(void); #endif diff --git a/configs/freedom-kl25z/src/kl_boardinitialize.c b/configs/freedom-kl25z/src/kl_boardinitialize.c index 106ed8e9c9..94314a3180 100644 --- a/configs/freedom-kl25z/src/kl_boardinitialize.c +++ b/configs/freedom-kl25z/src/kl_boardinitialize.c @@ -99,7 +99,7 @@ void kl_boardinitialize(void) /* Configure on-board LED if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - kl_ledinit(); + kl_led_initialize(); #endif } diff --git a/configs/freedom-kl25z/src/kl_led.c b/configs/freedom-kl25z/src/kl_led.c index f5922423f6..6a40bb48b5 100644 --- a/configs/freedom-kl25z/src/kl_led.c +++ b/configs/freedom-kl25z/src/kl_led.c @@ -118,14 +118,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: kl_ledinit + * Name: kl_led_initialize * * Description: * Initialize the on-board LED * ****************************************************************************/ -void kl_ledinit(void) +void kl_led_initialize(void) { kl_configgpio(GPIO_LED_R); kl_configgpio(GPIO_LED_G); diff --git a/configs/freedom-kl26z/src/freedom-kl26z.h b/configs/freedom-kl26z/src/freedom-kl26z.h index 6639ea1060..42a656e848 100644 --- a/configs/freedom-kl26z/src/freedom-kl26z.h +++ b/configs/freedom-kl26z/src/freedom-kl26z.h @@ -125,7 +125,7 @@ void weak_function kl_usbinitialize(void); #endif /**************************************************************************************************** - * Name: kl_ledinit + * Name: kl_led_initialize * * Description: * Initialize the on-board LED @@ -133,7 +133,7 @@ void weak_function kl_usbinitialize(void); ****************************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void kl_ledinit(void); +void kl_led_initialize(void); #endif #endif /* __ASSEMBLY__ */ diff --git a/configs/freedom-kl26z/src/kl_boardinitialize.c b/configs/freedom-kl26z/src/kl_boardinitialize.c index fe64c7d80e..92a66d47a8 100644 --- a/configs/freedom-kl26z/src/kl_boardinitialize.c +++ b/configs/freedom-kl26z/src/kl_boardinitialize.c @@ -98,7 +98,7 @@ void kl_boardinitialize(void) /* Configure on-board LED if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - kl_ledinit(); + kl_led_initialize(); #endif } diff --git a/configs/freedom-kl26z/src/kl_led.c b/configs/freedom-kl26z/src/kl_led.c index ed1820f4af..a729917dca 100644 --- a/configs/freedom-kl26z/src/kl_led.c +++ b/configs/freedom-kl26z/src/kl_led.c @@ -118,14 +118,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: kl_ledinit + * Name: kl_led_initialize * * Description: * Initialize the on-board LED * ****************************************************************************/ -void kl_ledinit(void) +void kl_led_initialize(void) { kl_configgpio(GPIO_LED_R); kl_configgpio(GPIO_LED_G); diff --git a/configs/lm4f120-launchpad/src/lm4f_autoleds.c b/configs/lm4f120-launchpad/src/lm4f_autoleds.c index 8e77538e7f..9ffcd0fa31 100644 --- a/configs/lm4f120-launchpad/src/lm4f_autoleds.c +++ b/configs/lm4f120-launchpad/src/lm4f_autoleds.c @@ -130,7 +130,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: lm4f_ledinit + * Name: lm4f_led_initialize * * Description: * Called to initialize the on-board LEDs. @@ -138,17 +138,17 @@ ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void lm4f_ledinit(void) +void lm4f_led_initialize(void) { leddbg("Initializing\n"); /* Configure Port E, Bit 1 as an output, initial value=OFF */ - led_dumpgpio("lm4f_ledinit before tiva_configgpio()"); + led_dumpgpio("lm4f_led_initialize before tiva_configgpio()"); tiva_configgpio(GPIO_LED_R); tiva_configgpio(GPIO_LED_G); tiva_configgpio(GPIO_LED_B); - led_dumpgpio("lm4f_ledinit after tiva_configgpio()"); + led_dumpgpio("lm4f_led_initialize after tiva_configgpio()"); } /**************************************************************************** diff --git a/configs/lm4f120-launchpad/src/lm4f_boot.c b/configs/lm4f120-launchpad/src/lm4f_boot.c index 41f7d05d8e..e85c8c0fd2 100644 --- a/configs/lm4f120-launchpad/src/lm4f_boot.c +++ b/configs/lm4f120-launchpad/src/lm4f_boot.c @@ -88,6 +88,6 @@ void tiva_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - lm4f_ledinit(); + lm4f_led_initialize(); #endif } diff --git a/configs/lm4f120-launchpad/src/lmf4120-launchpad.h b/configs/lm4f120-launchpad/src/lmf4120-launchpad.h index bd6964fe61..61e7765bbc 100644 --- a/configs/lm4f120-launchpad/src/lmf4120-launchpad.h +++ b/configs/lm4f120-launchpad/src/lmf4120-launchpad.h @@ -137,7 +137,7 @@ void weak_function lm4f_ssiinitialize(void); /**************************************************************************** - * Name: lm4f_ledinit + * Name: lm4f_led_initialize * * Description: * Called to initialize the on-board LEDs. @@ -145,7 +145,7 @@ void weak_function lm4f_ssiinitialize(void); ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void lm4f_ledinit(void); +void lm4f_led_initialize(void); #endif #endif /* __ASSEMBLY__ */ diff --git a/configs/lpc4330-xplorer/src/lpc43_autoleds.c b/configs/lpc4330-xplorer/src/lpc43_autoleds.c index d555786f83..84b4dc722d 100644 --- a/configs/lpc4330-xplorer/src/lpc43_autoleds.c +++ b/configs/lpc4330-xplorer/src/lpc43_autoleds.c @@ -84,9 +84,9 @@ * control of the application. The following interfaces are then available * for application control of the LEDs: * - * void lpc43_ledinit(void); - * void lpc43_setled(int led, bool ledon); - * void lpc43_setleds(uint8_t ledset); + * void board_userled_initialize(void); + * void board_userled(int led, bool ledon); + * void board_userled_all(uint8_t ledset); */ /* Debug definitions ********************************************************/ diff --git a/configs/lpc4330-xplorer/src/lpc43_userleds.c b/configs/lpc4330-xplorer/src/lpc43_userleds.c index 334b7fd745..34db50eb25 100644 --- a/configs/lpc4330-xplorer/src/lpc43_userleds.c +++ b/configs/lpc4330-xplorer/src/lpc43_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/lpc4330-xplorer/src/lpc43_userleds.c * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -113,14 +113,14 @@ static void led_dumppins(FAR const char *msg) ****************************************************************************/ /**************************************************************************** - * Name: lpc43_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void lpc43_ledinit(void) +void board_userled_initialize(void) { /* Configure all LED GPIO lines */ - led_dumppins("lpc43_ledinit() Entry)"); + led_dumppins("board_userled_initialize() Entry)"); /* Configure LED pins as GPIOs, then configure GPIOs as outputs */ @@ -130,24 +130,24 @@ void lpc43_ledinit(void) lpc43_pin_config(PINCONFIG_LED2); lpc43_gpio_config(GPIO_LED2); - led_dumppins("lpc43_ledinit() Exit"); + led_dumppins("board_userled_initialize() Exit"); } /**************************************************************************** - * Name: lpc43_setled + * Name: board_userled ****************************************************************************/ -void lpc43_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint16_t gpiocfg = (led == BOARD_LED1 ? GPIO_LED1 : GPIO_LED2); lpc43_gpio_write(gpiocfg, !ledon); } /**************************************************************************** - * Name: lpc43_setleds + * Name: board_userled_all ****************************************************************************/ -void lpc43_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { lpc43_gpio_write(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0); lpc43_gpio_write(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0); diff --git a/configs/lpc4357-evb/README.txt b/configs/lpc4357-evb/README.txt index 2a4b29a479..5e8219a188 100644 --- a/configs/lpc4357-evb/README.txt +++ b/configs/lpc4357-evb/README.txt @@ -577,9 +577,9 @@ LED and Pushbuttons control of the application. The following interfaces are then available for application control of the LEDs: - void lpc43_ledinit(void); - void lpc43_setled(int led, bool ledon); - void lpc43_setleds(uint8_t ledset); + void board_userled_initialize(void); + void board_userled(int led, bool ledon); + void board_userled_all(uint8_t ledset); Pushbuttons ----------- diff --git a/configs/lpc4357-evb/src/lpc43_userleds.c b/configs/lpc4357-evb/src/lpc43_userleds.c index b95454a404..0e8af7c10e 100644 --- a/configs/lpc4357-evb/src/lpc43_userleds.c +++ b/configs/lpc4357-evb/src/lpc43_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/lpc4357-evb/src/lpc43_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -72,9 +72,9 @@ * control of the application. The following interfaces are then available * for application control of the LEDs: * - * void lpc43_ledinit(void); - * void lpc43_setled(int led, bool ledon); - * void lpc43_setleds(uint8_t ledset); + * void board_userled_initialize(void); + * void board_userled(int led, bool ledon); + * void board_userled_all(uint8_t ledset); */ /* Debug definitions ********************************************************/ @@ -124,28 +124,28 @@ static void led_dumppins(FAR const char *msg) ****************************************************************************/ /**************************************************************************** - * Name: lpc43_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void lpc43_ledinit(void) +void board_userled_initialize(void) { /* Configure LED pin as a GPIO outputs */ - led_dumppins("lpc43_ledinit() Entry)"); + led_dumppins("board_userled_initialize() Entry)"); /* Configure LED pin as a GPIO, then configure GPIO as an outputs */ lpc43_pin_config(PINCONFIG_LED); lpc43_gpio_config(GPIO_LED); - led_dumppins("lpc43_ledinit() Exit"); + led_dumppins("board_userled_initialize() Exit"); } /**************************************************************************** - * Name: lpc43_setled + * Name: board_userled ****************************************************************************/ -void lpc43_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_LED) { @@ -154,10 +154,10 @@ void lpc43_setled(int led, bool ledon) } /**************************************************************************** - * Name: lpc43_setleds + * Name: board_userled_all ****************************************************************************/ -void lpc43_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { lpc43_gpio_write(GPIO_LED, (ledset & BOARD_LED_BIT) == 0); } diff --git a/configs/lpc4370-link2/README.txt b/configs/lpc4370-link2/README.txt index b9bbb50b5d..3468605aac 100644 --- a/configs/lpc4370-link2/README.txt +++ b/configs/lpc4370-link2/README.txt @@ -580,9 +580,9 @@ LED and Pushbuttons control of the application. The following interfaces are then available for application control of the LEDs: - void lpc43_ledinit(void); - void lpc43_setled(int led, bool ledon); - void lpc43_setleds(uint8_t ledset); + void board_userled_initialize(void); + void board_userled(int led, bool ledon); + void board_userled_all(uint8_t ledset); Pushbuttons ----------- diff --git a/configs/lpc4370-link2/src/lpc43_userleds.c b/configs/lpc4370-link2/src/lpc43_userleds.c index a01e52dc1d..b7e8d29f50 100644 --- a/configs/lpc4370-link2/src/lpc43_userleds.c +++ b/configs/lpc4370-link2/src/lpc43_userleds.c @@ -106,28 +106,28 @@ static void led_dumppins(FAR const char *msg) ****************************************************************************/ /**************************************************************************** - * Name: lpc43_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void lpc43_ledinit(void) +void board_userled_initialize(void) { /* Configure LED pin as a GPIO outputs */ - led_dumppins("lpc43_ledinit() Entry)"); + led_dumppins("board_userled_initialize() Entry)"); /* Configure LED pin as a GPIO, then configure GPIO as an outputs */ lpc43_pin_config(PINCONFIG_LED); lpc43_gpio_config(GPIO_LED); - led_dumppins("lpc43_ledinit() Exit"); + led_dumppins("board_userled_initialize() Exit"); } /**************************************************************************** - * Name: lpc43_setled + * Name: board_userled ****************************************************************************/ -void lpc43_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_LED) { @@ -136,10 +136,10 @@ void lpc43_setled(int led, bool ledon) } /**************************************************************************** - * Name: lpc43_setleds + * Name: board_userled_all ****************************************************************************/ -void lpc43_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { lpc43_gpio_write(GPIO_LED, (ledset & BOARD_LED_BIT) == 0); } diff --git a/configs/micropendous3/src/at90usb_boot.c b/configs/micropendous3/src/at90usb_boot.c index 6c862e0879..91591613de 100644 --- a/configs/micropendous3/src/at90usb_boot.c +++ b/configs/micropendous3/src/at90usb_boot.c @@ -87,6 +87,6 @@ void at90usb_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - at90usb_ledinit(); + at90usb_led_initialize(); #endif } diff --git a/configs/micropendous3/src/micropendous3_internal.h b/configs/micropendous3/src/micropendous3_internal.h index 0ad222bad8..a8b57e38d7 100644 --- a/configs/micropendous3/src/micropendous3_internal.h +++ b/configs/micropendous3/src/micropendous3_internal.h @@ -81,7 +81,7 @@ EXTERN void weak_function at90usb_spiinitialize(void); #endif /************************************************************************************ - * Name: at90usb_ledinit + * Name: at90usb_led_initialize * * Description: * Configure on-board LEDs if LED support has been selected. @@ -89,7 +89,7 @@ EXTERN void weak_function at90usb_spiinitialize(void); ************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -EXTERN void at90usb_ledinit(void); +EXTERN void at90usb_led_initialize(void); #endif #undef EXTERN diff --git a/configs/mirtoo/src/mirtoo-internal.h b/configs/mirtoo/src/mirtoo-internal.h index 66d96f1f5d..ffc18c2e1d 100644 --- a/configs/mirtoo/src/mirtoo-internal.h +++ b/configs/mirtoo/src/mirtoo-internal.h @@ -63,7 +63,8 @@ #ifdef __cplusplus #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -77,11 +78,11 @@ extern "C" { ************************************************************************************/ #ifdef CONFIG_PIC32MX_SPI2 -EXTERN void weak_function pic32mx_spi2initialize(void); +void weak_function pic32mx_spi2initialize(void); #endif /************************************************************************************ - * Name: pic32mx_ledinit + * Name: pic32mx_autoled_initialize * * Description: * Configure on-board LEDs if LED support has been selected. @@ -89,7 +90,7 @@ EXTERN void weak_function pic32mx_spi2initialize(void); ************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -EXTERN void pic32mx_ledinit(void); +void pic32mx_autoled_initialize(void); #endif /**************************************************************************** @@ -101,7 +102,7 @@ EXTERN void pic32mx_ledinit(void); ****************************************************************************/ #ifdef CONFIG_PIC32MX_ADC -/* EXTERN int pic32mx_adcinitialize(void); not used */ +/* int pic32mx_adcinitialize(void); not used */ #endif #undef EXTERN diff --git a/configs/mirtoo/src/pic32_boot.c b/configs/mirtoo/src/pic32_boot.c index 7d3f8ca34e..90d4d8f142 100644 --- a/configs/mirtoo/src/pic32_boot.c +++ b/configs/mirtoo/src/pic32_boot.c @@ -155,6 +155,6 @@ void pic32mx_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - pic32mx_ledinit(); + pic32mx_autoled_initialize(); #endif } diff --git a/configs/mirtoo/src/pic32_leds.c b/configs/mirtoo/src/pic32_leds.c index afdb016bfe..296bf91169 100644 --- a/configs/mirtoo/src/pic32_leds.c +++ b/configs/mirtoo/src/pic32_leds.c @@ -163,11 +163,11 @@ static const uint16_t g_ledpincfg[PIC32MX_MIRTOO_NLEDS] = ****************************************************************************/ /**************************************************************************** - * Name: up_setleds + * Name: pic32mx_setleds ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void up_setleds(FAR const struct led_setting_s *setting) +static void pic32mx_setleds(FAR const struct led_setting_s *setting) { /* LEDs are pulled up so writing a low value (false) illuminates them */ @@ -188,23 +188,25 @@ void up_setleds(FAR const struct led_setting_s *setting) ****************************************************************************/ /**************************************************************************** - * Name: pic32mx_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void pic32mx_ledinit(void) +#ifndef CONFIG_ARCH_LEDS +void board_userled_initialize(void) { /* Configure output pins */ pic32mx_configgpio(GPIO_LED_0); pic32mx_configgpio(GPIO_LED_1); } +#endif /**************************************************************************** - * Name: pic32mx_setled + * Name: board_userled ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void pic32mx_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { /* LEDs are pulled up so writing a low value (false) illuminates them */ @@ -216,16 +218,30 @@ void pic32mx_setled(int led, bool ledon) #endif /**************************************************************************** - * Name: pic32mx_setleds + * Name: board_userled_all ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void pic32mx_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { - /* Call pic32mx_setled() with ledon == true to illuminated the LED */ + /* Call board_userled() with ledon == true to illuminated the LED */ - pic32mx_setled(PIC32MX_MIRTOO_LED0, (ledset & PIC32MX_MIRTOO_LED0_BIT) != 0); - pic32mx_setled(PIC32MX_MIRTOO_LED1, (ledset & PIC32MX_MIRTOO_LED1_BIT) != 0); + board_userled(PIC32MX_MIRTOO_LED0, (ledset & PIC32MX_MIRTOO_LED0_BIT) != 0); + board_userled(PIC32MX_MIRTOO_LED1, (ledset & PIC32MX_MIRTOO_LED1_BIT) != 0); +} +#endif + +/**************************************************************************** + * Name: pic32mx_autoled_initialize + ****************************************************************************/ + +#ifndef CONFIG_ARCH_LEDS +void pic32mx_autoled_initialize(void) +{ + /* Configure output pins */ + + pic32mx_configgpio(GPIO_LED_0); + pic32mx_configgpio(GPIO_LED_1); } #endif @@ -238,7 +254,7 @@ void board_autoled_on(int led) { if ((unsigned)led < LED_NVALUES) { - up_setleds(&g_ledonvalues[led]); + pic32mx_setleds(&g_ledonvalues[led]); } } #endif @@ -252,7 +268,7 @@ void board_autoled_off(int led) { if ((unsigned)led < LED_NVALUES) { - up_setleds(&g_ledoffvalues[led]); + pic32mx_setleds(&g_ledoffvalues[led]); } } #endif diff --git a/configs/moteino-mega/src/avr_boot.c b/configs/moteino-mega/src/avr_boot.c index 00163a0f79..3c30705707 100644 --- a/configs/moteino-mega/src/avr_boot.c +++ b/configs/moteino-mega/src/avr_boot.c @@ -87,6 +87,6 @@ void atmega_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - atmega_ledinit(); + atmega_led_initialize(); #endif } diff --git a/configs/moteino-mega/src/avr_leds.c b/configs/moteino-mega/src/avr_leds.c index 7c7f9f42c1..a0c564c0eb 100644 --- a/configs/moteino-mega/src/avr_leds.c +++ b/configs/moteino-mega/src/avr_leds.c @@ -88,10 +88,10 @@ static bool g_ncoff; ****************************************************************************/ /**************************************************************************** - * Name: atmega_ledinit + * Name: atmega_led_initialize ****************************************************************************/ -void atmega_ledinit(void) +void atmega_led_initialize(void) { /* The MoteinoMEGA's single LED is on Port D, Pin 7. Configure this pin as an * output and turn it OFF. The "other" side of the LED is onnected to diff --git a/configs/moteino-mega/src/moteino_mega.h b/configs/moteino-mega/src/moteino_mega.h index 99297a5d3e..370d8323bb 100644 --- a/configs/moteino-mega/src/moteino_mega.h +++ b/configs/moteino-mega/src/moteino_mega.h @@ -82,7 +82,7 @@ void weak_function atmega_spiinitialize(void); #endif /************************************************************************************ - * Name: atmega_ledinit + * Name: atmega_led_initialize * * Description: * Configure on-board LEDs if LED support has been selected. @@ -90,7 +90,7 @@ void weak_function atmega_spiinitialize(void); ************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void atmega_ledinit(void); +void atmega_led_initialize(void); #endif #undef EXTERN diff --git a/configs/nucleo-f303re/src/stm32_userleds.c b/configs/nucleo-f303re/src/stm32_userleds.c index 67408c75f6..8644973dbc 100644 --- a/configs/nucleo-f303re/src/stm32_userleds.c +++ b/configs/nucleo-f303re/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/nucleo-f303re/src/stm32_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved. * Authors: Gregory Nutt * Paul Alexander Patience @@ -68,27 +68,15 @@ # define ledvdbg(x...) #endif -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { /* Configure LED1 GPIO for output */ @@ -96,10 +84,10 @@ void stm32_ledinit(void) } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_LED1) { @@ -108,10 +96,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) != 0); } diff --git a/configs/nucleo-f4x1re/src/stm32_userleds.c b/configs/nucleo-f4x1re/src/stm32_userleds.c index 5ebd3ce2cc..17dbc3bfde 100644 --- a/configs/nucleo-f4x1re/src/stm32_userleds.c +++ b/configs/nucleo-f4x1re/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/nucleo-f4x1re/src/stm32_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -181,10 +181,10 @@ static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { /* Configure LD2 GPIO for output */ @@ -192,10 +192,10 @@ void stm32_ledinit(void) } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == 1) { @@ -204,10 +204,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { if (led == 1) { diff --git a/configs/nutiny-nuc120/src/nuc_boardinitialize.c b/configs/nutiny-nuc120/src/nuc_boardinitialize.c index c515650983..fe7115264b 100644 --- a/configs/nutiny-nuc120/src/nuc_boardinitialize.c +++ b/configs/nutiny-nuc120/src/nuc_boardinitialize.c @@ -97,6 +97,6 @@ void nuc_boardinitialize(void) /* Configure on-board LED if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - nuc_ledinit(); + nuc_led_initialize(); #endif } diff --git a/configs/nutiny-nuc120/src/nuc_led.c b/configs/nutiny-nuc120/src/nuc_led.c index da6d04eb84..87a08c7c8f 100644 --- a/configs/nutiny-nuc120/src/nuc_led.c +++ b/configs/nutiny-nuc120/src/nuc_led.c @@ -113,14 +113,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: nuc_ledinit + * Name: nuc_led_initialize * * Description: * Initialize the on-board LED * ****************************************************************************/ -void nuc_ledinit(void) +void nuc_led_initialize(void) { led_dumpgpio("Before configuration"); nuc_configgpio(GPIO_LED); diff --git a/configs/nutiny-nuc120/src/nutiny-nuc120.h b/configs/nutiny-nuc120/src/nutiny-nuc120.h index 62f269d081..bcc845d6e5 100644 --- a/configs/nutiny-nuc120/src/nutiny-nuc120.h +++ b/configs/nutiny-nuc120/src/nutiny-nuc120.h @@ -114,7 +114,7 @@ void weak_function nuc_usbinitialize(void); #endif /**************************************************************************************************** - * Name: nuc_ledinit + * Name: nuc_led_initialize * * Description: * Initialize the on-board LED @@ -122,7 +122,7 @@ void weak_function nuc_usbinitialize(void); ****************************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void nuc_ledinit(void); +void nuc_led_initialize(void); #endif diff --git a/configs/olimex-lpc-h3131/src/lpc31_leds.c b/configs/olimex-lpc-h3131/src/lpc31_leds.c index d13e242987..f21bfd887a 100644 --- a/configs/olimex-lpc-h3131/src/lpc31_leds.c +++ b/configs/olimex-lpc-h3131/src/lpc31_leds.c @@ -182,7 +182,7 @@ void board_autoled_off(int led) #endif /************************************************************************************ - * Name: lpc31_setled, and lpc31_setleds + * Name: board_userled_initialize, board_userled, and board_userled_all * * Description: * These interfaces allow user control of the board LEDs. @@ -196,7 +196,12 @@ void board_autoled_off(int led) * ************************************************************************************/ -void lpc31_setled(int led, bool ledon) +void board_userled_initialize(void) +{ + /* All initialization performed in board_autoled_initialize() */ +} + +void board_userled(int led, bool ledon) { uint32_t bit; @@ -226,10 +231,10 @@ void lpc31_setled(int led, bool ledon) } } -void lpc31_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { #ifndef CONFIG_ARCH_LEDS - lpc31_setled(BOARD_LED1, (ledset & BOARD_LED1_BIT) != 0); + board_userled(BOARD_LED1, (ledset & BOARD_LED1_BIT) != 0); #endif - lpc31_setled(BOARD_LED2, (ledset & BOARD_LED2_BIT) != 0); + board_userled(BOARD_LED2, (ledset & BOARD_LED2_BIT) != 0); } diff --git a/configs/olimex-lpc1766stk/src/lpc17_leds.c b/configs/olimex-lpc1766stk/src/lpc17_leds.c index e72c2069aa..8f83ca967c 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_leds.c +++ b/configs/olimex-lpc1766stk/src/lpc17_leds.c @@ -99,31 +99,31 @@ static bool g_uninitialized = true; ****************************************************************************/ /**************************************************************************** - * Name: lpc17_ledinit/board_autoled_initialize + * Name: board_userled_initialize/board_autoled_initialize ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void lpc17_ledinit(void) /* Name when invoked externally */ +void board_userled_initialize(void) /* Name when invoked externally */ #else -void board_autoled_initialize(void) /* Name when invoked via lpc17_boot.c */ +void board_autoled_initialize(void) /* Name when invoked via lpc17_boot.c */ #endif { /* Configure all LED GPIO lines */ - led_dumpgpio("board_autoled_initialize() Entry)"); + led_dumpgpio("board_*led_initialize() Entry)"); lpc17_configgpio(LPC1766STK_LED1); lpc17_configgpio(LPC1766STK_LED2); - led_dumpgpio("board_autoled_initialize() Exit"); + led_dumpgpio("board_*led_initialize() Exit"); } /**************************************************************************** - * Name: lpc17_setled + * Name: board_userled ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void lpc17_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_LED1) { @@ -137,11 +137,11 @@ void lpc17_setled(int led, bool ledon) #endif /**************************************************************************** - * Name: lpc17_setleds + * Name: board_userled_all ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void lpc17_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { lpc17_gpiowrite(LPC1766STK_LED1, (ledset & BOARD_LED1_BIT) == 0); lpc17_gpiowrite(LPC1766STK_LED2, (ledset & BOARD_LED2_BIT) == 0); diff --git a/configs/olimex-stm32-h405/src/stm32_userleds.c b/configs/olimex-stm32-h405/src/stm32_userleds.c index e73299c7a1..8cbbcbd27d 100644 --- a/configs/olimex-stm32-h405/src/stm32_userleds.c +++ b/configs/olimex-stm32-h405/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/olimex-stm32-h405/src/stm32_leds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -74,27 +74,15 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = GPIO_LED_STATUS }; -/**************************************************************************** - * Private Function Protototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { /* Configure LED1-4 GPIOs for output */ @@ -102,10 +90,10 @@ void stm32_ledinit(void) } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -114,10 +102,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LED_STATUS, (ledset & BOARD_LED1_BIT) != 0); } diff --git a/configs/olimex-stm32-p207/src/stm32_userleds.c b/configs/olimex-stm32-p207/src/stm32_userleds.c index 54c0be9b70..289c6beec8 100644 --- a/configs/olimex-stm32-p207/src/stm32_userleds.c +++ b/configs/olimex-stm32-p207/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/olimex-stm32-p207/src/stm32_userleds.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -91,10 +91,10 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { /* Configure LED1-4 GPIOs for output */ @@ -105,10 +105,10 @@ void stm32_ledinit(void) } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -117,10 +117,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) != 0); stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) != 0); diff --git a/configs/olimex-strp711/src/str71_leds.c b/configs/olimex-strp711/src/str71_leds.c index 1ccb36f092..192ca7bcd0 100644 --- a/configs/olimex-strp711/src/str71_leds.c +++ b/configs/olimex-strp711/src/str71_leds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/olimex-strp711/src/str71_leds.c * - * Copyright (C) 2008-2009, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -74,10 +74,10 @@ static uint16_t g_led2clr; ****************************************************************************/ /**************************************************************************** - * Name: up_setleds + * Name: str71_setleds ****************************************************************************/ -static void up_setleds(uint16_t setbits, uint16_t clearbits) +static void str71_setleds(uint16_t setbits, uint16_t clearbits) { uint16_t reg16; @@ -154,23 +154,23 @@ void board_autoled_on(int led) { default: case LED_STARTED: - up_setleds(0, STR71X_LED1GPIO1_BIT|STR71X_LED2GPIO1_BIT); /* Clear LED1&2 */ + str71_setleds(0, STR71X_LED1GPIO1_BIT|STR71X_LED2GPIO1_BIT); /* Clear LED1&2 */ break; case LED_HEAPALLOCATE: case LED_IRQSENABLED: case LED_STACKCREATED: - up_setleds(STR71X_LED1GPIO1_BIT, STR71X_LED2GPIO1_BIT); /* Set LED1, clear LED2 */ + str71_setleds(STR71X_LED1GPIO1_BIT, STR71X_LED2GPIO1_BIT); /* Set LED1, clear LED2 */ break; case LED_INIRQ: case LED_SIGNAL: case LED_ASSERTION: - up_setleds(STR71X_LED1GPIO1_BIT|STR71X_LED2GPIO1_BIT, 0); /* Set LED1&2 */ + str71_setleds(STR71X_LED1GPIO1_BIT|STR71X_LED2GPIO1_BIT, 0); /* Set LED1&2 */ break; case LED_PANIC: - up_setleds(STR71X_LED2GPIO1_BIT|g_led2set, g_led2set); /* Set LED1, preserve LED2 */ + str71_setleds(STR71X_LED2GPIO1_BIT|g_led2set, g_led2set); /* Set LED1, preserve LED2 */ break; } } @@ -209,11 +209,11 @@ void board_autoled_off(int led) case LED_INIRQ: case LED_SIGNAL: case LED_ASSERTION: - up_setleds(STR71X_LED1GPIO1_BIT, STR71X_LED2GPIO1_BIT); /* Set LED1, clear LED2 */ + str71_setleds(STR71X_LED1GPIO1_BIT, STR71X_LED2GPIO1_BIT); /* Set LED1, clear LED2 */ break; case LED_PANIC: - up_setleds(g_led2set, STR71X_LED1GPIO1_BIT|g_led2clr); /* Clear LED1, preserve LED2 */ + str71_setleds(g_led2set, STR71X_LED1GPIO1_BIT|g_led2clr); /* Clear LED1, preserve LED2 */ break; } } diff --git a/configs/olimexino-stm32/src/stm32_leds.c b/configs/olimexino-stm32/src/stm32_leds.c index c366c81d9c..4e41af6ad3 100644 --- a/configs/olimexino-stm32/src/stm32_leds.c +++ b/configs/olimexino-stm32/src/stm32_leds.c @@ -95,29 +95,31 @@ static bool g_initialized = false; ****************************************************************************/ /**************************************************************************** - * Name: stm32_led_initialize + * Name: stm32_led_initialize/board_userled_initialize ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS void stm32_led_initialize(void) +#else +void board_userled_initialize(void) +#endif { /* Configure all LED GPIO lines */ - led_dumpgpio("stm32_led_initialize() Entry)"); + led_dumpgpio("board_*led_initialize() Entry)"); stm32_configgpio(GPIO_LED_YELLOW); stm32_configgpio(GPIO_LED_GREEN); - led_dumpgpio("stm32_led_initialize() Exit"); + led_dumpgpio("board_*led_initialize() Exit"); } -#endif /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_LED_GREEN) { @@ -131,11 +133,11 @@ void stm32_setled(int led, bool ledon) #endif /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LED_GREEN, (ledset & BOARD_LED_YELLOW_BIT) == 0); stm32_gpiowrite(GPIO_LED_YELLOW, (ledset & BOARD_LED_YELLOW_BIT) == 0); diff --git a/configs/open1788/src/lpc17_userleds.c b/configs/open1788/src/lpc17_userleds.c index cf9f3a854d..077cdc994a 100644 --- a/configs/open1788/src/lpc17_userleds.c +++ b/configs/open1788/src/lpc17_userleds.c @@ -2,7 +2,7 @@ * configs/open1788/src/lpc17_userleds.c * arch/arm/src/board/lpc17_userleds.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -94,27 +94,15 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = GPIO_LED1, GPIO_LED2, GPIO_LED3, GPIO_LED4 }; -/**************************************************************************** - * Private Function Protototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: lpc17_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void lpc17_ledinit(void) +void board_userled_initialize(void) { /* Configure LED1-4 GPIOs for output */ @@ -125,10 +113,10 @@ void lpc17_ledinit(void) } /**************************************************************************** - * Name: lpc17_setled + * Name: board_userled ****************************************************************************/ -void lpc17_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -137,10 +125,10 @@ void lpc17_setled(int led, bool ledon) } /**************************************************************************** - * Name: lpc17_setleds + * Name: board_userled_all ****************************************************************************/ -void lpc17_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { lpc17_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0); lpc17_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0); diff --git a/configs/pcblogic-pic32mx/src/pcblogic-pic32mx.h b/configs/pcblogic-pic32mx/src/pcblogic-pic32mx.h index ee361b56cc..0f60e90a39 100644 --- a/configs/pcblogic-pic32mx/src/pcblogic-pic32mx.h +++ b/configs/pcblogic-pic32mx/src/pcblogic-pic32mx.h @@ -81,7 +81,7 @@ EXTERN void weak_function pic32mx_spiinitialize(void); #endif /************************************************************************************ - * Name: pic32mx_ledinit + * Name: pic32mx_led_initialize * * Description: * Configure on-board LEDs if LED support has been selected. @@ -89,7 +89,7 @@ EXTERN void weak_function pic32mx_spiinitialize(void); ************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -EXTERN void pic32mx_ledinit(void); +EXTERN void pic32mx_led_initialize(void); #endif #undef EXTERN diff --git a/configs/pcblogic-pic32mx/src/pic32mx_boot.c b/configs/pcblogic-pic32mx/src/pic32mx_boot.c index 628620c9dd..f1aa1a89a5 100644 --- a/configs/pcblogic-pic32mx/src/pic32mx_boot.c +++ b/configs/pcblogic-pic32mx/src/pic32mx_boot.c @@ -87,6 +87,6 @@ void pic32mx_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - pic32mx_ledinit(); + pic32mx_led_initialize(); #endif } diff --git a/configs/pcduino-a10/src/a1x_leds.c b/configs/pcduino-a10/src/a1x_leds.c index 0d3431151d..1801625f51 100644 --- a/configs/pcduino-a10/src/a1x_leds.c +++ b/configs/pcduino-a10/src/a1x_leds.c @@ -225,7 +225,7 @@ void board_autoled_off(int led) #endif /************************************************************************************ - * Name: a1x_setled and a1x_setleds + * Name: board_userled_initialize, board_userled, and board_userled_all * * Description: * These interfaces allow user control of the board LEDs. @@ -239,7 +239,12 @@ void board_autoled_off(int led) * ************************************************************************************/ -void a1x_setled(int led, bool ledon) +void board_userled_initialize(void) +{ + /* Initialization already performed in a1x_led_initialize */ +} + +void board_userled(int led, bool ledon) { switch (led) { @@ -259,11 +264,11 @@ void a1x_setled(int led, bool ledon) } } -void a1x_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { - a1x_setled(BOARD_LED1, (ledset & BOARD_LED1) != 0); - a1x_setled(BOARD_LED3, (ledset & BOARD_LED3) != 0); + board_userled(BOARD_LED1, (ledset & BOARD_LED1) != 0); + board_userled(BOARD_LED3, (ledset & BOARD_LED3) != 0); #ifndef CONFIG_ARCH_LEDS - a1x_setled(BOARD_LED4, (ledset & BOARD_LED4) != 0); + board_userled(BOARD_LED4, (ledset & BOARD_LED4) != 0); #endif } diff --git a/configs/pic32mx-starterkit/src/pic32mx-starterkit.h b/configs/pic32mx-starterkit/src/pic32mx-starterkit.h index ecbd176e51..55e80c82a1 100644 --- a/configs/pic32mx-starterkit/src/pic32mx-starterkit.h +++ b/configs/pic32mx-starterkit/src/pic32mx-starterkit.h @@ -103,7 +103,7 @@ void weak_function pic32mx_spiinitialize(void); #endif /************************************************************************************ - * Name: pic32mx_ledinit + * Name: pic32mx_led_initialize * * Description: * Configure on-board LEDs if LED support has been selected. @@ -111,7 +111,7 @@ void weak_function pic32mx_spiinitialize(void); ************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void pic32mx_ledinit(void); +void pic32mx_led_initialize(void); #endif #undef EXTERN diff --git a/configs/pic32mx-starterkit/src/pic32mx_boot.c b/configs/pic32mx-starterkit/src/pic32mx_boot.c index 9fa0c9ca29..a66f7a33ec 100644 --- a/configs/pic32mx-starterkit/src/pic32mx_boot.c +++ b/configs/pic32mx-starterkit/src/pic32mx_boot.c @@ -85,9 +85,9 @@ void pic32mx_boardinitialize(void) } #endif +#ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ -#ifdef CONFIG_ARCH_LEDS - pic32mx_ledinit(); + pic32mx_led_initialize(); #endif } diff --git a/configs/pic32mx-starterkit/src/pic32mx_leds.c b/configs/pic32mx-starterkit/src/pic32mx_leds.c index 32f5b3a12b..49d913d4a5 100644 --- a/configs/pic32mx-starterkit/src/pic32mx_leds.c +++ b/configs/pic32mx-starterkit/src/pic32mx_leds.c @@ -198,10 +198,11 @@ static void pic32mx_setleds(FAR const struct led_setting_s *setting) ****************************************************************************/ /**************************************************************************** - * Name: pic32mx_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void pic32mx_ledinit(void) +#ifndef CONFIG_ARCH_LEDS +void board_userled_initialize(void) { /* Configure output pins */ @@ -209,13 +210,14 @@ void pic32mx_ledinit(void) pic32mx_configgpio(GPIO_LED_2); pic32mx_configgpio(GPIO_LED_3); } +#endif /**************************************************************************** - * Name: pic32mx_setled + * Name: board_userled ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void pic32mx_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < PIC32MX_STARTERKIT_NLEDS) { @@ -225,15 +227,30 @@ void pic32mx_setled(int led, bool ledon) #endif /**************************************************************************** - * Name: pic32mx_setleds + * Name: board_userled_all ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void pic32mx_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { - pic32mx_setled(PIC32MX_STARTERKIT_LED1, (ledset & PIC32MX_STARTERKIT_LED1_BIT) != 0); - pic32mx_setled(PIC32MX_STARTERKIT_LED2, (ledset & PIC32MX_STARTERKIT_LED2_BIT) != 0); - pic32mx_setled(PIC32MX_STARTERKIT_LED3, (ledset & PIC32MX_STARTERKIT_LED3_BIT) != 0); + board_userled(PIC32MX_STARTERKIT_LED1, (ledset & PIC32MX_STARTERKIT_LED1_BIT) != 0); + board_userled(PIC32MX_STARTERKIT_LED2, (ledset & PIC32MX_STARTERKIT_LED2_BIT) != 0); + board_userled(PIC32MX_STARTERKIT_LED3, (ledset & PIC32MX_STARTERKIT_LED3_BIT) != 0); +} +#endif + +/**************************************************************************** + * Name: pic32mx_led_initialize + ****************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +void pic32mx_led_initialize(void) +{ + /* Configure output pins */ + + pic32mx_configgpio(GPIO_LED_1); + pic32mx_configgpio(GPIO_LED_2); + pic32mx_configgpio(GPIO_LED_3); } #endif diff --git a/configs/pic32mx7mmb/src/pic32_boot.c b/configs/pic32mx7mmb/src/pic32_boot.c index 1a8f9aef79..1e81f9c52d 100644 --- a/configs/pic32mx7mmb/src/pic32_boot.c +++ b/configs/pic32mx7mmb/src/pic32_boot.c @@ -92,9 +92,9 @@ void pic32mx_boardinitialize(void) pic32mx_lcdinitialize(); +#ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ -#ifdef CONFIG_ARCH_LEDS - pic32mx_ledinit(); + pic32mx_led_initialize(); #endif } diff --git a/configs/pic32mx7mmb/src/pic32_leds.c b/configs/pic32mx7mmb/src/pic32_leds.c index 574283a27d..859b130b0e 100644 --- a/configs/pic32mx7mmb/src/pic32_leds.c +++ b/configs/pic32mx7mmb/src/pic32_leds.c @@ -173,11 +173,11 @@ static const uint16_t g_ledpincfg[PIC32MX_PIC32MX7MMB_NLEDS] = ****************************************************************************/ /**************************************************************************** - * Name: up_setleds + * Name: pic32mx_setleds ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void up_setleds(FAR const struct led_setting_s *setting) +static void pic32mx_setleds(FAR const struct led_setting_s *setting) { /* LEDs are pulled up so writing a low value (false) illuminates them */ @@ -203,10 +203,11 @@ void up_setleds(FAR const struct led_setting_s *setting) ****************************************************************************/ /**************************************************************************** - * Name: pic32mx_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void pic32mx_ledinit(void) +#ifndef CONFIG_ARCH_LEDS +void board_userled_initialize(void) { /* Configure output pins */ @@ -214,13 +215,14 @@ void pic32mx_ledinit(void) pic32mx_configgpio(GPIO_LED_1); pic32mx_configgpio(GPIO_LED_2); } +#endif /**************************************************************************** - * Name: pic32mx_setled + * Name: board_userled ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void pic32mx_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { /* LEDs are pulled up so writing a low value (false) illuminates them */ @@ -232,17 +234,32 @@ void pic32mx_setled(int led, bool ledon) #endif /**************************************************************************** - * Name: pic32mx_setleds + * Name: board_userled_all ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void pic32mx_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { - /* Call pic32mx_setled() with ledon == true to illuminated the LED */ + /* Call board_userled() with ledon == true to illuminated the LED */ - pic32mx_setled(PIC32MX_PIC32MX7MMB_LED0, (ledset & PIC32MX_PIC32MX7MMB_LED0_BIT) != 0); - pic32mx_setled(PIC32MX_PIC32MX7MMB_LED1, (ledset & PIC32MX_PIC32MX7MMB_LED1_BIT) != 0); - pic32mx_setled(PIC32MX_PIC32MX7MMB_LED2, (ledset & PIC32MX_PIC32MX7MMB_LED2_BIT) != 0); + board_userled(PIC32MX_PIC32MX7MMB_LED0, (ledset & PIC32MX_PIC32MX7MMB_LED0_BIT) != 0); + board_userled(PIC32MX_PIC32MX7MMB_LED1, (ledset & PIC32MX_PIC32MX7MMB_LED1_BIT) != 0); + board_userled(PIC32MX_PIC32MX7MMB_LED2, (ledset & PIC32MX_PIC32MX7MMB_LED2_BIT) != 0); +} +#endif + +/**************************************************************************** + * Name: pic32mx_led_initialize + ****************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +void pic32mx_led_initialize(void) +{ + /* Configure output pins */ + + pic32mx_configgpio(GPIO_LED_0); + pic32mx_configgpio(GPIO_LED_1); + pic32mx_configgpio(GPIO_LED_2); } #endif @@ -255,7 +272,7 @@ void board_autoled_on(int led) { if ((unsigned)led < LED_NVALUES) { - up_setleds(&g_ledonvalues[led]); + pic32mx_setleds(&g_ledonvalues[led]); } } #endif @@ -269,7 +286,7 @@ void board_autoled_off(int led) { if ((unsigned)led < LED_NVALUES) { - up_setleds(&g_ledoffvalues[led]); + pic32mx_setleds(&g_ledoffvalues[led]); } } #endif diff --git a/configs/pic32mx7mmb/src/pic32mx7mmb_internal.h b/configs/pic32mx7mmb/src/pic32mx7mmb_internal.h index 1453cc7420..6208946cfa 100644 --- a/configs/pic32mx7mmb/src/pic32mx7mmb_internal.h +++ b/configs/pic32mx7mmb/src/pic32mx7mmb_internal.h @@ -130,11 +130,11 @@ extern "C" { #if defined(CONFIG_PIC32MX_SPI1) || defined(CONFIG_PIC32MX_SPI2) || \ defined(CONFIG_PIC32MX_SPI3) || defined(CONFIG_PIC32MX_SPI4) -EXTERN void weak_function pic32mx_spiinitialize(void); +void weak_function pic32mx_spiinitialize(void); #endif /************************************************************************************ - * Name: pic32mx_ledinit + * Name: pic32mx_led_initialize * * Description: * Configure on-board LEDs if LED support has been selected. @@ -142,7 +142,7 @@ EXTERN void weak_function pic32mx_spiinitialize(void); ************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -EXTERN void pic32mx_ledinit(void); +void pic32mx_led_initialize(void); #endif /**************************************************************************** @@ -155,7 +155,7 @@ EXTERN void pic32mx_ledinit(void); * ****************************************************************************/ -EXTERN void pic32mx_lcdinitialize(void); +void pic32mx_lcdinitialize(void); #undef EXTERN #ifdef __cplusplus diff --git a/configs/pic32mz-starterkit/src/pic32mz-starterkit.h b/configs/pic32mz-starterkit/src/pic32mz-starterkit.h index cf21217236..538f777d55 100644 --- a/configs/pic32mz-starterkit/src/pic32mz-starterkit.h +++ b/configs/pic32mz-starterkit/src/pic32mz-starterkit.h @@ -189,7 +189,7 @@ void weak_function pic32mz_spiinitialize(void); #endif /************************************************************************************ - * Name: pic32mz_ledinit + * Name: pic32mz_led_initialize * * Description: * Configure on-board LEDs if LED support has been selected. @@ -197,7 +197,7 @@ void weak_function pic32mz_spiinitialize(void); ************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void pic32mz_ledinit(void); +void pic32mz_led_initialize(void); #endif /**************************************************************************** diff --git a/configs/pic32mz-starterkit/src/pic32mz_autoleds.c b/configs/pic32mz-starterkit/src/pic32mz_autoleds.c index 10c163692d..ec77d3d1f9 100644 --- a/configs/pic32mz-starterkit/src/pic32mz_autoleds.c +++ b/configs/pic32mz-starterkit/src/pic32mz_autoleds.c @@ -177,10 +177,10 @@ static void pic32mz_setleds(FAR const struct led_setting_s *setting) ****************************************************************************/ /**************************************************************************** - * Name: pic32mz_ledinit + * Name: pic32mz_led_initialize ****************************************************************************/ -void pic32mz_ledinit(void) +void pic32mz_led_initialize(void) { /* Configure output pins */ diff --git a/configs/pic32mz-starterkit/src/pic32mz_boot.c b/configs/pic32mz-starterkit/src/pic32mz_boot.c index d7d0cff821..1a138a8089 100644 --- a/configs/pic32mz-starterkit/src/pic32mz_boot.c +++ b/configs/pic32mz-starterkit/src/pic32mz_boot.c @@ -84,7 +84,7 @@ void pic32mz_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - pic32mz_ledinit(); + pic32mz_led_initialize(); #endif } diff --git a/configs/pic32mz-starterkit/src/pic32mz_userleds.c b/configs/pic32mz-starterkit/src/pic32mz_userleds.c index bf610df47a..7defe15977 100644 --- a/configs/pic32mz-starterkit/src/pic32mz_userleds.c +++ b/configs/pic32mz-starterkit/src/pic32mz_userleds.c @@ -105,10 +105,10 @@ static const uint16_t g_ledpincfg[PIC32MZ_STARTERKIT_NLEDS] = ****************************************************************************/ /**************************************************************************** - * Name: pic32mz_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void pic32mz_ledinit(void) +void board_userled_initialize(void) { /* Configure output pins */ @@ -118,10 +118,10 @@ void pic32mz_ledinit(void) } /**************************************************************************** - * Name: pic32mz_setled + * Name: board_userled ****************************************************************************/ -void pic32mz_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < PIC32MZ_STARTERKIT_NLEDS) { @@ -130,17 +130,17 @@ void pic32mz_setled(int led, bool ledon) } /**************************************************************************** - * Name: pic32mz_setleds + * Name: board_userled_all ****************************************************************************/ -void pic32mz_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { - pic32mz_setled(PIC32MZ_STARTERKIT_LED1, - (ledset & PIC32MZ_STARTERKIT_LED1_BIT) != 0); - pic32mz_setled(PIC32MZ_STARTERKIT_LED2, - (ledset & PIC32MZ_STARTERKIT_LED2_BIT) != 0); - pic32mz_setled(PIC32MZ_STARTERKIT_LED3, - (ledset & PIC32MZ_STARTERKIT_LED3_BIT) != 0); + board_userled(PIC32MZ_STARTERKIT_LED1, + (ledset & PIC32MZ_STARTERKIT_LED1_BIT) != 0); + board_userled(PIC32MZ_STARTERKIT_LED2, + (ledset & PIC32MZ_STARTERKIT_LED2_BIT) != 0); + board_userled(PIC32MZ_STARTERKIT_LED3, + (ledset & PIC32MZ_STARTERKIT_LED3_BIT) != 0); } #endif /* !CONFIG_ARCH_LEDS */ diff --git a/configs/sam3u-ek/src/sam_leds.c b/configs/sam3u-ek/src/sam_leds.c index 888d23c654..ee31f18716 100644 --- a/configs/sam3u-ek/src/sam_leds.c +++ b/configs/sam3u-ek/src/sam_leds.c @@ -123,10 +123,10 @@ static const uint8_t g_ledoff[8] = ****************************************************************************/ /**************************************************************************** - * Name: up_setled + * Name: sam_setled ****************************************************************************/ -static void up_setled(uint16_t pinset, uint8_t state) +static void sam_setled(uint16_t pinset, uint8_t state) { /* Assume active high. Initial state == 0 means active high */ @@ -148,14 +148,14 @@ static void up_setled(uint16_t pinset, uint8_t state) } /**************************************************************************** - * Name: up_setleds + * Name: sam_setleds ****************************************************************************/ -static void up_setleds(uint8_t state) +static void sam_setleds(uint8_t state) { - up_setled(GPIO_LED0, (state >> LED0_SHIFT) & LED_MASK); - up_setled(GPIO_LED1, (state >> LED1_SHIFT) & LED_MASK); - up_setled(GPIO_LED2, (state >> LED2_SHIFT) & LED_MASK); + sam_setled(GPIO_LED0, (state >> LED0_SHIFT) & LED_MASK); + sam_setled(GPIO_LED1, (state >> LED1_SHIFT) & LED_MASK); + sam_setled(GPIO_LED2, (state >> LED2_SHIFT) & LED_MASK); } /**************************************************************************** @@ -179,7 +179,7 @@ void board_autoled_initialize(void) void board_autoled_on(int led) { - up_setleds(g_ledon[led & 7]); + sam_setleds(g_ledon[led & 7]); } /**************************************************************************** @@ -188,7 +188,7 @@ void board_autoled_on(int led) void board_autoled_off(int led) { - up_setleds(g_ledoff[led & 7]); + sam_setleds(g_ledoff[led & 7]); } #endif /* CONFIG_ARCH_LEDS */ diff --git a/configs/sam4l-xplained/src/sam_userleds.c b/configs/sam4l-xplained/src/sam_userleds.c index 8dff545c03..8e053363ce 100644 --- a/configs/sam4l-xplained/src/sam_userleds.c +++ b/configs/sam4l-xplained/src/sam_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/sam4l-xplained/src/sam_userleds.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -78,44 +78,37 @@ # define ledvdbg(x...) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_ledinit() is - * available to initialize the LED0 from user application logic. + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the + * board_userled_initialize() is available to initialize the LED0 from + * user application logic. * ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { (void)sam_configgpio(GPIO_LED0); } /**************************************************************************** - * Name: sam_setled + * Name: board_userled * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_setled() is + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled() is * available to control the LED0 from user application logic. * ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_LED0) { @@ -124,19 +117,19 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled_all * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_setleds() is + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is * available to control the LED0 from user application logic. NOTE: since * there is only a single LED on-board, this is function is not very useful. * ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { - sam_setled(BOARD_LED0, (ledset & BOARD_LED0_BIT) != 0); + board_userled(BOARD_LED0, (ledset & BOARD_LED0_BIT) != 0); } #endif /* !CONFIG_ARCH_LEDS */ diff --git a/configs/sam4s-xplained-pro/src/sam_boot.c b/configs/sam4s-xplained-pro/src/sam_boot.c index e4a48d50e9..f8caef92c0 100644 --- a/configs/sam4s-xplained-pro/src/sam_boot.c +++ b/configs/sam4s-xplained-pro/src/sam_boot.c @@ -103,7 +103,7 @@ void board_initialize(void) #ifndef CONFIG_ARCH_LEDS /* Initialize user led */ - sam_ledinit(); + sam_led_initialize(); #endif #ifdef CONFIG_TIMER diff --git a/configs/sam4s-xplained-pro/src/sam_userleds.c b/configs/sam4s-xplained-pro/src/sam_userleds.c index 239aa3d533..ca16d45cba 100644 --- a/configs/sam4s-xplained-pro/src/sam_userleds.c +++ b/configs/sam4s-xplained-pro/src/sam_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/sam4s-xplained-pro/src/sam_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Bob Doiron * @@ -68,31 +68,15 @@ # define ledvdbg(x...) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { /* Configure D301 GPIO for output */ @@ -100,10 +84,10 @@ void sam_ledinit(void) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_D301) { @@ -112,10 +96,10 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setleds + * Name: board_userled_all ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { sam_gpiowrite(GPIO_D301, (ledset & BOARD_D301_BIT) ? LED_D301_ON : LED_D301_OFF); } diff --git a/configs/sam4s-xplained/src/sam_userleds.c b/configs/sam4s-xplained/src/sam_userleds.c index f593c9b02f..f1e7c5f61b 100644 --- a/configs/sam4s-xplained/src/sam_userleds.c +++ b/configs/sam4s-xplained/src/sam_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/sam4s-xplained/src/sam_userleds.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -67,31 +67,15 @@ # define ledvdbg(x...) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Protototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { /* Configure D9-2 GPIOs for output */ @@ -100,10 +84,10 @@ void sam_ledinit(void) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint32_t ledcfg; @@ -124,10 +108,10 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setleds + * Name: board_userled_all ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { bool ledon; diff --git a/configs/sama5d2-xult/src/sam_userleds.c b/configs/sama5d2-xult/src/sam_userleds.c index 55866063f2..1de7aaf6a4 100644 --- a/configs/sama5d2-xult/src/sam_userleds.c +++ b/configs/sama5d2-xult/src/sam_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/sama5d2-xult/src/sam_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -82,10 +82,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { /* Configure LED PIOs for output */ @@ -96,10 +96,10 @@ void sam_ledinit(void) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint32_t ledcfg; @@ -125,10 +125,10 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setleds + * Name: board_userled_all ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { bool ledon; diff --git a/configs/sama5d3-xplained/src/sam_userleds.c b/configs/sama5d3-xplained/src/sam_userleds.c index 85dbae9e8b..ae103f242c 100644 --- a/configs/sama5d3-xplained/src/sam_userleds.c +++ b/configs/sama5d3-xplained/src/sam_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/sama5d3-xplained/src/sam_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -79,31 +79,15 @@ # define ledvdbg(x...) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Protototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { /* Configure LED PIOs for output */ @@ -112,10 +96,10 @@ void sam_ledinit(void) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint32_t ledcfg; @@ -141,10 +125,10 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setleds + * Name: board_userled_all ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { bool ledon; diff --git a/configs/sama5d3x-ek/src/sam_userleds.c b/configs/sama5d3x-ek/src/sam_userleds.c index 402ecc5400..19f6da340e 100644 --- a/configs/sama5d3x-ek/src/sam_userleds.c +++ b/configs/sama5d3x-ek/src/sam_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/sama5d3x-ek/src/sam_userleds.c * - * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2013-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -79,31 +79,15 @@ # define ledvdbg(x...) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Protototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { /* Configure LED PIOs for output */ @@ -114,10 +98,10 @@ void sam_ledinit(void) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint32_t ledcfg; @@ -145,10 +129,10 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setleds + * Name: board_userled_all ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { bool ledon; diff --git a/configs/sama5d4-ek/src/sam_userleds.c b/configs/sama5d4-ek/src/sam_userleds.c index 6c95ae87a6..ac7fae8d00 100644 --- a/configs/sama5d4-ek/src/sam_userleds.c +++ b/configs/sama5d4-ek/src/sam_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/sama5d4-ek/src/sam_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -88,10 +88,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { /* Configure LED PIOs for output */ @@ -100,10 +100,10 @@ void sam_ledinit(void) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint32_t ledcfg; @@ -129,10 +129,10 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setleds + * Name: board_userled_all ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { bool ledon; diff --git a/configs/samd20-xplained/src/sam_userleds.c b/configs/samd20-xplained/src/sam_userleds.c index 0c3c1a86e0..985ae1dbba 100644 --- a/configs/samd20-xplained/src/sam_userleds.c +++ b/configs/samd20-xplained/src/sam_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/samd20-xplained/src/sam_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -91,31 +91,32 @@ ****************************************************************************/ /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_ledinit() is - * available to initialize the LED from user application logic. + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the + * board_userled_initialize() is available to initialize the LED from user + * application logic. * ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { (void)sam_configport(PORT_STATUS_LED); } /**************************************************************************** - * Name: sam_setled + * Name: board_userled * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_setled() is + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled() is * available to control the LED from user application logic. * ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_STATUS_LED) { @@ -124,19 +125,19 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled_all * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_setleds() is - * available to control the LED from user application logic. NOTE: since - * there is only a single LED on-board, this is function is not very useful. + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is + * available to control the LED from user application logic. NOTE: since + * there is only a single LED on-board, this is function is not very useful. * ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { - sam_setled(BOARD_STATUS_LED, (ledset & BOARD_STATUS_LED_BIT) != 0); + board_userled(BOARD_STATUS_LED, (ledset & BOARD_STATUS_LED_BIT) != 0); } #endif /* !CONFIG_ARCH_LEDS */ diff --git a/configs/samd21-xplained/src/sam_userleds.c b/configs/samd21-xplained/src/sam_userleds.c index ffe23e4381..7b7e87bf7c 100644 --- a/configs/samd21-xplained/src/sam_userleds.c +++ b/configs/samd21-xplained/src/sam_userleds.c @@ -91,31 +91,32 @@ ****************************************************************************/ /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_ledinit() is - * available to initialize the LED from user application logic. + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the + * board_userled_initialize() is available to initialize the LED from user + * application logic. * ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { (void)sam_configport(PORT_STATUS_LED); } /**************************************************************************** - * Name: sam_setled + * Name: board_userled * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_setled() is + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled() is * available to control the LED from user application logic. * ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_STATUS_LED) { @@ -124,19 +125,19 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled_all * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_setleds() is - * available to control the LED from user application logic. NOTE: since - * there is only a single LED on-board, this is function is not very useful. + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is + * available to control the LED from user application logic. NOTE: since + * there is only a single LED on-board, this is function is not very useful. * ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { - sam_setled(BOARD_STATUS_LED, (ledset & BOARD_STATUS_LED_BIT) != 0); + board_userled(BOARD_STATUS_LED, (ledset & BOARD_STATUS_LED_BIT) != 0); } #endif /* !CONFIG_ARCH_LEDS */ diff --git a/configs/saml21-xplained/src/sam_userleds.c b/configs/saml21-xplained/src/sam_userleds.c index abff213c0d..ab22a0408e 100644 --- a/configs/saml21-xplained/src/sam_userleds.c +++ b/configs/saml21-xplained/src/sam_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/saml21-xplained/src/sam_userleds.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -91,31 +91,32 @@ ****************************************************************************/ /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_ledinit() is - * available to initialize the LED from user application logic. + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the + * board_userled_initialize() is available to initialize the LED from user + * application logic. * ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { (void)sam_configport(PORT_STATUS_LED); } /**************************************************************************** - * Name: sam_setled + * Name: board_userled * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_setled() is + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled() is * available to control the LED from user application logic. * ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_STATUS_LED) { @@ -124,19 +125,19 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled_all * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the sam_setleds() is - * available to control the LED from user application logic. NOTE: since - * there is only a single LED on-board, this is function is not very useful. + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is + * available to control the LED from user application logic. NOTE: since + * there is only a single LED on-board, this is function is not very useful. * ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { - sam_setled(BOARD_STATUS_LED, (ledset & BOARD_STATUS_LED_BIT) != 0); + board_userled(BOARD_STATUS_LED, (ledset & BOARD_STATUS_LED_BIT) != 0); } #endif /* !CONFIG_ARCH_LEDS */ diff --git a/configs/samv71-xult/src/sam_userleds.c b/configs/samv71-xult/src/sam_userleds.c index aea9575985..a3f4bf8c55 100644 --- a/configs/samv71-xult/src/sam_userleds.c +++ b/configs/samv71-xult/src/sam_userleds.c @@ -59,11 +59,12 @@ /**************************************************************************** * Public Functions ****************************************************************************/ + /**************************************************************************** - * Name: sam_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void sam_ledinit(void) +void board_userled_initialize(void) { /* Configure LED PIOs for output */ @@ -72,10 +73,10 @@ void sam_ledinit(void) } /**************************************************************************** - * Name: sam_setled + * Name: board_userled ****************************************************************************/ -void sam_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint32_t ledcfg; @@ -96,10 +97,10 @@ void sam_setled(int led, bool ledon) } /**************************************************************************** - * Name: sam_setleds + * Name: board_userled_all ****************************************************************************/ -void sam_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { /* Low illuminates */ diff --git a/configs/shenzhou/src/stm32_userleds.c b/configs/shenzhou/src/stm32_userleds.c index f537462d79..c4746b8a71 100644 --- a/configs/shenzhou/src/stm32_userleds.c +++ b/configs/shenzhou/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/shenzhou/src/stm32_userleds.c * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -79,33 +79,29 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = GPIO_LED1, GPIO_LED2, GPIO_LED3, GPIO_LED4 }; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { - /* Configure LED1-4 GPIOs for output */ + /* Configure LED1-4 GPIOs for output */ - stm32_configgpio(GPIO_LED1); - stm32_configgpio(GPIO_LED2); - stm32_configgpio(GPIO_LED3); - stm32_configgpio(GPIO_LED4); + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); + stm32_configgpio(GPIO_LED4); } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -114,10 +110,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0); stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0); diff --git a/configs/skp16c26/src/m16c_leds.c b/configs/skp16c26/src/m16c_leds.c index 924da57e8c..fd969b3141 100644 --- a/configs/skp16c26/src/m16c_leds.c +++ b/configs/skp16c26/src/m16c_leds.c @@ -108,10 +108,10 @@ static uint8_t g_nestlevel; ************************************************************************************/ /************************************************************************************ - * Name: board_autoled_initialize + * Name: m16c_setleds ************************************************************************************/ -static void up_setleds(uint8_t gybits, uint8_t rbit) +static void m16c_setleds(uint8_t gybits, uint8_t rbit) { uint8_t regval; @@ -174,14 +174,14 @@ void board_autoled_on(int led) if (led == LED_ASSERTION) { ledset = g_ledstate[g_prevled[g_nestlevel]]; - up_setleds(ledset & GREENYELLOW_LED_MASK, RED_LED_ON); + m16c_setleds(ledset & GREENYELLOW_LED_MASK, RED_LED_ON); } else if (led < LED_ASSERTION) { /* Otherwise, just show the LEDs corresponding to this state */ ledset = g_ledstate[led]; - up_setleds(ledset & GREENYELLOW_LED_MASK, ledset & RED_LED_MASK); + m16c_setleds(ledset & GREENYELLOW_LED_MASK, ledset & RED_LED_MASK); /* If this was a nested states (INIRQ, SIGNAL, or ASSERTION) then * stack up the previous value. @@ -220,7 +220,8 @@ void board_autoled_off(int led) { ledset = g_ledstate[g_prevled[0]]; } - up_setleds(ledset & GREENYELLOW_LED_MASK, RED_LED_OFF); + + m16c_setleds(ledset & GREENYELLOW_LED_MASK, RED_LED_OFF); } else if (led > 0 && led < LED_ASSERTION) { @@ -241,7 +242,7 @@ void board_autoled_off(int led) } ledset = g_ledstate[led]; - up_setleds(ledset & GREENYELLOW_LED_MASK, ledset & RED_LED_MASK); + m16c_setleds(ledset & GREENYELLOW_LED_MASK, ledset & RED_LED_MASK); g_prevled[g_nestlevel]= led; } } diff --git a/configs/spark/src/stm32_autoleds.c b/configs/spark/src/stm32_autoleds.c index 93b9576f0d..e195ae1b94 100644 --- a/configs/spark/src/stm32_autoleds.c +++ b/configs/spark/src/stm32_autoleds.c @@ -270,12 +270,12 @@ static void led_setonoff(unsigned int bits) void board_autoled_initialize(void) { - /* Configure LED1-4 GPIOs for output */ + /* Configure LED1-4 GPIOs for output */ - stm32_configgpio(GPIO_LED1); - stm32_configgpio(GPIO_LED2); - stm32_configgpio(GPIO_LED3); - stm32_configgpio(GPIO_LED4); + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); + stm32_configgpio(GPIO_LED4); } /**************************************************************************** diff --git a/configs/spark/src/stm32_boot.c b/configs/spark/src/stm32_boot.c index f93219c8f7..3ad21b4b18 100644 --- a/configs/spark/src/stm32_boot.c +++ b/configs/spark/src/stm32_boot.c @@ -99,8 +99,6 @@ void stm32_boardinitialize(void) #if defined(CONFIG_USBDEV) && defined(CONFIG_STM32_USB) stm32_usbinitialize(); #endif - - } /**************************************************************************** diff --git a/configs/spark/src/stm32_userleds.c b/configs/spark/src/stm32_userleds.c index ac9ccf41ef..41641fd7f1 100644 --- a/configs/spark/src/stm32_userleds.c +++ b/configs/spark/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/spark/src/stm32_userleds.c * - * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -80,33 +80,29 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = GPIO_LED1, GPIO_LED2, GPIO_LED3, GPIO_LED4 }; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: board_autoled_initialize + * Name: board_userled_initialize ****************************************************************************/ -void board_autoled_initialize(void) +void board_userled_initialize(void) { - /* Configure LED1-4 GPIOs for output */ + /* Configure LED1-4 GPIOs for output */ - stm32_configgpio(GPIO_LED1); - stm32_configgpio(GPIO_LED2); - stm32_configgpio(GPIO_LED3); - stm32_configgpio(GPIO_LED4); + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); + stm32_configgpio(GPIO_LED4); } /**************************************************************************** - * Name: up_setled + * Name: board_userled ****************************************************************************/ -void up_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -116,7 +112,7 @@ void up_setled(int led, bool ledon) } /**************************************************************************** - * Name: up_setleds + * Name: board_userled_all * Description: * This function will be called to set the state of the Leds on the board * @@ -128,7 +124,7 @@ void up_setled(int led, bool ledon) * ****************************************************************************/ -void up_setleds(uint8_t ledset, uint8_t led_states_set) +void board_userled_all(uint8_t ledset, uint8_t led_states_set) { led_states_set ^= LED_ACTIVE_LOW; if ((ledset & BOARD_USR_LED_BIT) == 0) diff --git a/configs/stm3220g-eval/src/stm32_userleds.c b/configs/stm3220g-eval/src/stm32_userleds.c index c3ce99589f..3c3839c358 100644 --- a/configs/stm3220g-eval/src/stm32_userleds.c +++ b/configs/stm3220g-eval/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm3220g_eval/src/stm32_leds.c * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -79,33 +79,29 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = GPIO_LED1, GPIO_LED2, GPIO_LED3, GPIO_LED4 }; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { - /* Configure LED1-4 GPIOs for output */ + /* Configure LED1-4 GPIOs for output */ - stm32_configgpio(GPIO_LED1); - stm32_configgpio(GPIO_LED2); - stm32_configgpio(GPIO_LED3); - stm32_configgpio(GPIO_LED4); + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); + stm32_configgpio(GPIO_LED4); } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -114,10 +110,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0); stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0); diff --git a/configs/stm3240g-eval/src/stm32_userleds.c b/configs/stm3240g-eval/src/stm32_userleds.c index fdb322856a..eadca33b22 100644 --- a/configs/stm3240g-eval/src/stm32_userleds.c +++ b/configs/stm3240g-eval/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm3240g_eval/src/stm32_userleds.c * - * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -79,33 +79,29 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = GPIO_LED1, GPIO_LED2, GPIO_LED3, GPIO_LED4 }; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { - /* Configure LED1-4 GPIOs for output */ + /* Configure LED1-4 GPIOs for output */ - stm32_configgpio(GPIO_LED1); - stm32_configgpio(GPIO_LED2); - stm32_configgpio(GPIO_LED3); - stm32_configgpio(GPIO_LED4); + stm32_configgpio(GPIO_LED1); + stm32_configgpio(GPIO_LED2); + stm32_configgpio(GPIO_LED3); + stm32_configgpio(GPIO_LED4); } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -114,10 +110,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0); stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0); diff --git a/configs/stm32f3discovery/src/stm32_userleds.c b/configs/stm32f3discovery/src/stm32_userleds.c index a6d1a09835..77079059a8 100644 --- a/configs/stm32f3discovery/src/stm32_userleds.c +++ b/configs/stm32f3discovery/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm32f3discovery/src/stm32_userleds.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -78,27 +78,15 @@ static const uint32_t g_ledcfg[BOARD_NLEDS] = GPIO_LED5, GPIO_LED6, GPIO_LED7, GPIO_LED8 }; -/**************************************************************************** - * Private Function Protototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { int i; @@ -111,10 +99,10 @@ void stm32_ledinit(void) } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -123,10 +111,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { int i; diff --git a/configs/stm32f429i-disco/src/stm32_userleds.c b/configs/stm32f429i-disco/src/stm32_userleds.c index 334fb64f0d..d824437331 100644 --- a/configs/stm32f429i-disco/src/stm32_userleds.c +++ b/configs/stm32f429i-disco/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm32f429i-disco/src/stm32_userleds.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -188,10 +188,10 @@ static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { /* Configure LED1-4 GPIOs for output */ @@ -200,10 +200,10 @@ void stm32_ledinit(void) } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -212,10 +212,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0); stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0); diff --git a/configs/stm32f4discovery/src/stm32_userleds.c b/configs/stm32f4discovery/src/stm32_userleds.c index 5be244b2fa..69b1f9bb95 100644 --- a/configs/stm32f4discovery/src/stm32_userleds.c +++ b/configs/stm32f4discovery/src/stm32_userleds.c @@ -189,10 +189,10 @@ static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { /* Configure LED1-4 GPIOs for output */ @@ -203,10 +203,10 @@ void stm32_ledinit(void) } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < BOARD_NLEDS) { @@ -215,10 +215,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LED1, (ledset & BOARD_LED1_BIT) == 0); stm32_gpiowrite(GPIO_LED2, (ledset & BOARD_LED2_BIT) == 0); diff --git a/configs/stm32f746g-disco/src/stm32_userleds.c b/configs/stm32f746g-disco/src/stm32_userleds.c index 5733949e10..f4d90b146b 100644 --- a/configs/stm32f746g-disco/src/stm32_userleds.c +++ b/configs/stm32f746g-disco/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm32f746g-disco/src/stm32_userleds.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -68,31 +68,32 @@ ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the stm32_ledinit() is - * available to initialize the LED from user application logic. + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the + * board_userled_initialize() is available to initialize the LED from user + * application logic. * ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { stm32_configgpio(GPIO_LD1); } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the stm32_setled() is + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled() is * available to control the LED from user application logic. * ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_STATUS_LED) { @@ -101,17 +102,17 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled_all * * Description: * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board - * LEDs. If CONFIG_ARCH_LEDS is not defined, then the stm32_setleds() is + * LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is * available to control the LED from user application logic. NOTE: since * there is only a single LED on-board, this is function is not very useful. * ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { stm32_gpiowrite(GPIO_LD1, (ledset & BOARD_STATUS_LED_BIT) != 0); } diff --git a/configs/stm32ldiscovery/src/stm32_userleds.c b/configs/stm32ldiscovery/src/stm32_userleds.c index 0219f19ee6..4686eb97c7 100644 --- a/configs/stm32ldiscovery/src/stm32_userleds.c +++ b/configs/stm32ldiscovery/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm32ldiscovery/src/stm32_userleds.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -67,31 +67,15 @@ # define ledvdbg(x...) #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Protototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void stm32_ledinit(void) +void board_userled_initialize(void) { /* Configure LED1-2 GPIOs for output */ @@ -100,10 +84,10 @@ void stm32_ledinit(void) } /**************************************************************************** - * Name: stm32_setled + * Name: board_userled ****************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint32_t ledcfg; @@ -124,10 +108,10 @@ void stm32_setled(int led, bool ledon) } /**************************************************************************** - * Name: stm32_setleds + * Name: board_userled_all ****************************************************************************/ -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { bool ledon; diff --git a/configs/stm32vldiscovery/src/stm32_boot.c b/configs/stm32vldiscovery/src/stm32_boot.c index 930e3948fd..04ca85b2a0 100644 --- a/configs/stm32vldiscovery/src/stm32_boot.c +++ b/configs/stm32vldiscovery/src/stm32_boot.c @@ -66,6 +66,6 @@ void stm32_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - stm32_ledinit(); + stm32_led_initialize(); #endif } diff --git a/configs/stm32vldiscovery/src/stm32_leds.c b/configs/stm32vldiscovery/src/stm32_leds.c index 20d160c990..62cc0a20db 100644 --- a/configs/stm32vldiscovery/src/stm32_leds.c +++ b/configs/stm32vldiscovery/src/stm32_leds.c @@ -75,11 +75,11 @@ ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: stm32_led_initialize ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void stm32_ledinit(void) +void stm32_led_initialize(void) { stm32_configgpio(GPIO_LED1); /* Configure LED1 GPIO for output */ } diff --git a/configs/stm32vldiscovery/src/stm32vldiscovery.h b/configs/stm32vldiscovery/src/stm32vldiscovery.h index 49b945b527..43c444be8a 100644 --- a/configs/stm32vldiscovery/src/stm32vldiscovery.h +++ b/configs/stm32vldiscovery/src/stm32vldiscovery.h @@ -60,7 +60,7 @@ ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void stm32_ledinit(void); +void stm32_led_initialize(void); #endif #endif /* __CONFIGS_STM32VL_DISCOVERY_SRC_STM32VLDISCOVERY_H */ diff --git a/configs/sure-pic32mx/src/pic32mx_autoleds.c b/configs/sure-pic32mx/src/pic32mx_autoleds.c index 725b2c84d2..56064a2a6a 100644 --- a/configs/sure-pic32mx/src/pic32mx_autoleds.c +++ b/configs/sure-pic32mx/src/pic32mx_autoleds.c @@ -143,10 +143,10 @@ static const struct led_setting_s g_ledoffvalues[LED_NVALUES] = ****************************************************************************/ /**************************************************************************** - * Name: up_setleds + * Name: pic32mx_setleds ****************************************************************************/ -void up_setleds(FAR const struct led_setting_s *setting) +static void pic32mx_setleds(FAR const struct led_setting_s *setting) { if (setting->usb != LED_NC) { @@ -174,10 +174,10 @@ void up_setleds(FAR const struct led_setting_s *setting) ****************************************************************************/ /**************************************************************************** - * Name: pic32mx_ledinit + * Name: pic32mx_led_initialize ****************************************************************************/ -void pic32mx_ledinit(void) +void pic32mx_led_initialize(void) { /* Configure output pins */ @@ -195,7 +195,7 @@ void board_autoled_on(int led) { if (led < LED_NVALUES) { - up_setleds(&g_ledonvalues[led]); + pic32mx_setleds(&g_ledonvalues[led]); } } @@ -207,7 +207,7 @@ void board_autoled_off(int led) { if (led < LED_NVALUES) { - up_setleds(&g_ledoffvalues[led]); + pic32mx_setleds(&g_ledoffvalues[led]); } } #endif /* CONFIG_ARCH_LEDS */ diff --git a/configs/sure-pic32mx/src/pic32mx_boot.c b/configs/sure-pic32mx/src/pic32mx_boot.c index 3e6d7093bb..566ba6e721 100644 --- a/configs/sure-pic32mx/src/pic32mx_boot.c +++ b/configs/sure-pic32mx/src/pic32mx_boot.c @@ -96,6 +96,6 @@ void pic32mx_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - pic32mx_ledinit(); + pic32mx_led_initialize(); #endif } diff --git a/configs/sure-pic32mx/src/sure-pic32mx.h b/configs/sure-pic32mx/src/sure-pic32mx.h index 05d6c5d179..041b2f2082 100644 --- a/configs/sure-pic32mx/src/sure-pic32mx.h +++ b/configs/sure-pic32mx/src/sure-pic32mx.h @@ -153,7 +153,7 @@ void weak_function pic32mx_usbdevinitialize(void); #endif /************************************************************************************ - * Name: pic32mx_ledinit + * Name: pic32mx_led_initialize * * Description: * Configure on-board LEDs if LED support has been selected. @@ -161,7 +161,7 @@ void weak_function pic32mx_usbdevinitialize(void); ************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void pic32mx_ledinit(void); +void pic32mx_led_initialize(void); #endif #undef EXTERN diff --git a/configs/teensy-2.0/src/at90usb_boot.c b/configs/teensy-2.0/src/at90usb_boot.c index cce5886390..6d1a6f2538 100644 --- a/configs/teensy-2.0/src/at90usb_boot.c +++ b/configs/teensy-2.0/src/at90usb_boot.c @@ -87,6 +87,6 @@ void at90usb_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - at90usb_ledinit(); + at90usb_led_initialize(); #endif } diff --git a/configs/teensy-2.0/src/at90usb_leds.c b/configs/teensy-2.0/src/at90usb_leds.c index fd6ea6182a..273e606589 100644 --- a/configs/teensy-2.0/src/at90usb_leds.c +++ b/configs/teensy-2.0/src/at90usb_leds.c @@ -88,10 +88,10 @@ static bool g_ncoff; ****************************************************************************/ /**************************************************************************** - * Name: at90usb_ledinit + * Name: at90usb_led_initialize ****************************************************************************/ -void at90usb_ledinit(void) +void at90usb_led_initialize(void) { /* The Teensy's single LED is on Port D, Pin 6. Configur this pin as an * output and turn it OFF. The "other" side of the LED is onnected to diff --git a/configs/teensy-2.0/src/teensy_internal.h b/configs/teensy-2.0/src/teensy_internal.h index 7e3e44ed82..bd60c34c26 100644 --- a/configs/teensy-2.0/src/teensy_internal.h +++ b/configs/teensy-2.0/src/teensy_internal.h @@ -82,7 +82,7 @@ void weak_function at90usb_spiinitialize(void); #endif /************************************************************************************ - * Name: at90usb_ledinit + * Name: at90usb_led_initialize * * Description: * Configure on-board LEDs if LED support has been selected. @@ -90,7 +90,7 @@ void weak_function at90usb_spiinitialize(void); ************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void at90usb_ledinit(void); +void at90usb_led_initialize(void); #endif #undef EXTERN diff --git a/configs/teensy-3.x/src/k20_userleds.c b/configs/teensy-3.x/src/k20_userleds.c index 1820cd890b..eb5060c05e 100644 --- a/configs/teensy-3.x/src/k20_userleds.c +++ b/configs/teensy-3.x/src/k20_userleds.c @@ -47,28 +47,24 @@ #ifndef CONFIG_ARCH_LEDS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: kinetis_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void kinetis_ledinit(void) +void board_userled_initialize(void) { kinetis_pinconfig(GPIO_LED); } /**************************************************************************** - * Name: kinetis_setled + * Name: board_userled ****************************************************************************/ -void kinetis_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if (led == BOARD_LED) { @@ -77,10 +73,10 @@ void kinetis_setled(int led, bool ledon) } /**************************************************************************** - * Name: kinetis_setleds + * Name: board_userled_all ****************************************************************************/ -void kinetis_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { kinetis_gpiowrite(GPIO_LED, (ledset & BOARD_LED_BIT) != 0); } diff --git a/configs/teensy-lc/src/kl_boardinitialize.c b/configs/teensy-lc/src/kl_boardinitialize.c index 28c5fcb766..45e88ba523 100644 --- a/configs/teensy-lc/src/kl_boardinitialize.c +++ b/configs/teensy-lc/src/kl_boardinitialize.c @@ -110,7 +110,7 @@ void kl_boardinitialize(void) /* Configure on-board LED if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - kl_ledinit(); + kl_led_initialize(); #endif } diff --git a/configs/teensy-lc/src/kl_led.c b/configs/teensy-lc/src/kl_led.c index 5ecade7ada..fbc967208d 100644 --- a/configs/teensy-lc/src/kl_led.c +++ b/configs/teensy-lc/src/kl_led.c @@ -85,14 +85,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: kl_ledinit + * Name: kl_led_initialize * * Description: * Initialize the on-board LED * ****************************************************************************/ -void kl_ledinit(void) +void kl_led_initialize(void) { kl_configgpio(GPIO_LED); } diff --git a/configs/teensy-lc/src/teensy-lc.h b/configs/teensy-lc/src/teensy-lc.h index 842d5f9fe0..bcd2c57625 100644 --- a/configs/teensy-lc/src/teensy-lc.h +++ b/configs/teensy-lc/src/teensy-lc.h @@ -80,7 +80,7 @@ void weak_function kl_spiinitialize(void); /**************************************************************************** - * Name: kl_ledinit + * Name: kl_led_initialize * * Description: * Initialize the on-board LED @@ -88,7 +88,7 @@ void weak_function kl_spiinitialize(void); ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void kl_ledinit(void); +void kl_led_initialize(void); #endif #endif /* __ASSEMBLY__ */ diff --git a/configs/tm4c123g-launchpad/src/tm4c123g-launchpad.h b/configs/tm4c123g-launchpad/src/tm4c123g-launchpad.h index 2d1bab2fe2..5641f72b37 100644 --- a/configs/tm4c123g-launchpad/src/tm4c123g-launchpad.h +++ b/configs/tm4c123g-launchpad/src/tm4c123g-launchpad.h @@ -192,7 +192,7 @@ void weak_function tm4c_ssiinitialize(void); /**************************************************************************** - * Name: tm4c_ledinit + * Name: tm4c_led_initialize * * Description: * Called to initialize the on-board LEDs. @@ -200,7 +200,7 @@ void weak_function tm4c_ssiinitialize(void); ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void tm4c_ledinit(void); +void tm4c_led_initialize(void); #endif /**************************************************************************** diff --git a/configs/tm4c123g-launchpad/src/tm4c_autoleds.c b/configs/tm4c123g-launchpad/src/tm4c_autoleds.c index 0d78fed650..01c6c9a71a 100644 --- a/configs/tm4c123g-launchpad/src/tm4c_autoleds.c +++ b/configs/tm4c123g-launchpad/src/tm4c_autoleds.c @@ -130,7 +130,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: tm4c_ledinit + * Name: tm4c_led_initialize * * Description: * Called to initialize the on-board LEDs. @@ -138,17 +138,17 @@ ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void tm4c_ledinit(void) +void tm4c_led_initialize(void) { leddbg("Initializing\n"); /* Configure Port E, Bit 1 as an output, initial value=OFF */ - led_dumpgpio("tm4c_ledinit before tiva_configgpio()"); + led_dumpgpio("tm4c_led_initialize before tiva_configgpio()"); tiva_configgpio(GPIO_LED_R); tiva_configgpio(GPIO_LED_G); tiva_configgpio(GPIO_LED_B); - led_dumpgpio("tm4c_ledinit after tiva_configgpio()"); + led_dumpgpio("tm4c_led_initialize after tiva_configgpio()"); } /**************************************************************************** diff --git a/configs/tm4c123g-launchpad/src/tm4c_boot.c b/configs/tm4c123g-launchpad/src/tm4c_boot.c index e06ae9d84f..7882b05d14 100644 --- a/configs/tm4c123g-launchpad/src/tm4c_boot.c +++ b/configs/tm4c123g-launchpad/src/tm4c_boot.c @@ -88,7 +88,7 @@ void tiva_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - tm4c_ledinit(); + tm4c_led_initialize(); #endif } diff --git a/configs/tm4c1294-launchpad/src/tm4c1294-launchpad.h b/configs/tm4c1294-launchpad/src/tm4c1294-launchpad.h index 961fcadbfd..89e834a80c 100644 --- a/configs/tm4c1294-launchpad/src/tm4c1294-launchpad.h +++ b/configs/tm4c1294-launchpad/src/tm4c1294-launchpad.h @@ -137,7 +137,7 @@ void weak_function tm4c_ssiinitialize(void); /**************************************************************************** - * Name: tm4c_ledinit + * Name: tm4c_led_initialize * * Description: * Called to initialize the on-board LEDs. @@ -145,7 +145,7 @@ void weak_function tm4c_ssiinitialize(void); ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void tm4c_ledinit(void); +void tm4c_led_initialize(void); #endif /**************************************************************************** diff --git a/configs/tm4c1294-launchpad/src/tm4c_autoleds.c b/configs/tm4c1294-launchpad/src/tm4c_autoleds.c index 3c9770cf72..6f81c1b4dc 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_autoleds.c +++ b/configs/tm4c1294-launchpad/src/tm4c_autoleds.c @@ -52,7 +52,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: tm4c_ledinit + * Name: tm4c_led_initialize * * Description: * Called to initialize the on-board LEDs. @@ -60,7 +60,7 @@ ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void tm4c_ledinit(void) +void tm4c_led_initialize(void) { /* Configure LED PIOs for output */ tiva_configgpio(GPIO_LED_D1); diff --git a/configs/tm4c1294-launchpad/src/tm4c_boot.c b/configs/tm4c1294-launchpad/src/tm4c_boot.c index 878f12cfad..5f48767be3 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_boot.c +++ b/configs/tm4c1294-launchpad/src/tm4c_boot.c @@ -88,7 +88,7 @@ void tiva_boardinitialize(void) /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS - tm4c_ledinit(); + tm4c_led_initialize(); #endif } diff --git a/configs/tm4c1294-launchpad/src/tm4c_userleds.c b/configs/tm4c1294-launchpad/src/tm4c_userleds.c index b7218ddf3a..d73ab5a13f 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_userleds.c +++ b/configs/tm4c1294-launchpad/src/tm4c_userleds.c @@ -84,10 +84,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: tiva_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void tiva_ledinit(void) +void board_userled_initialize(void) { /* Configure LED PIOs for output */ @@ -98,10 +98,10 @@ void tiva_ledinit(void) } /**************************************************************************** - * Name: tiva_setled + * Name: board_userled ****************************************************************************/ -void tiva_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { uint32_t ledcfg; @@ -130,10 +130,10 @@ void tiva_setled(int led, bool ledon) } /**************************************************************************** - * Name: tiva_setleds + * Name: board_userled_all ****************************************************************************/ -void tiva_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { bool ledon; diff --git a/configs/ubw32/src/pic32_boot.c b/configs/ubw32/src/pic32_boot.c index c64090b1fe..5b28736261 100644 --- a/configs/ubw32/src/pic32_boot.c +++ b/configs/ubw32/src/pic32_boot.c @@ -84,9 +84,9 @@ void pic32mx_boardinitialize(void) } #endif +#ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ -#ifdef CONFIG_ARCH_LEDS - pic32mx_ledinit(); + pic32mx_led_initialize(); #endif } diff --git a/configs/ubw32/src/pic32_leds.c b/configs/ubw32/src/pic32_leds.c index 8484bc96db..0b46055455 100644 --- a/configs/ubw32/src/pic32_leds.c +++ b/configs/ubw32/src/pic32_leds.c @@ -170,11 +170,11 @@ static const uint16_t g_ledpincfg[PIC32MX_UBW32_NLEDS] = ****************************************************************************/ /**************************************************************************** - * Name: up_setleds + * Name: pic32mx_setleds ****************************************************************************/ #ifdef CONFIG_ARCH_LEDS -void up_setleds(FAR const struct led_setting_s *setting) +void pic32mx_setleds(FAR const struct led_setting_s *setting) { if (setting->led1 != LED_NC) { @@ -198,10 +198,11 @@ void up_setleds(FAR const struct led_setting_s *setting) ****************************************************************************/ /**************************************************************************** - * Name: pic32mx_ledinit + * Name: board_userled_initialize ****************************************************************************/ -void pic32mx_ledinit(void) +#ifndef CONFIG_ARCH_LEDS +void board_userled_initialize(void) { /* Configure output pins */ @@ -209,13 +210,14 @@ void pic32mx_ledinit(void) pic32mx_configgpio(GPIO_LED_2); pic32mx_configgpio(GPIO_LED_3); } +#endif /**************************************************************************** - * Name: pic32mx_setled + * Name: board_userled ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void pic32mx_setled(int led, bool ledon) +void board_userled(int led, bool ledon) { if ((unsigned)led < PIC32MX_UBW32_NLEDS) { @@ -225,15 +227,30 @@ void pic32mx_setled(int led, bool ledon) #endif /**************************************************************************** - * Name: pic32mx_setleds + * Name: board_userled_all ****************************************************************************/ #ifndef CONFIG_ARCH_LEDS -void pic32mx_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { - pic32mx_setled(PIC32MX_UBW32_LED1, (ledset & PIC32MX_UBW32_LED1_BIT) != 0); - pic32mx_setled(PIC32MX_UBW32_LED2, (ledset & PIC32MX_UBW32_LED2_BIT) != 0); - pic32mx_setled(PIC32MX_UBW32_LED3, (ledset & PIC32MX_UBW32_LED3_BIT) != 0); + board_userled(PIC32MX_UBW32_LED1, (ledset & PIC32MX_UBW32_LED1_BIT) != 0); + board_userled(PIC32MX_UBW32_LED2, (ledset & PIC32MX_UBW32_LED2_BIT) != 0); + board_userled(PIC32MX_UBW32_LED3, (ledset & PIC32MX_UBW32_LED3_BIT) != 0); +} +#endif + +/**************************************************************************** + * Name: pic32mx_led_initialize + ****************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +void pic32mx_led_initialize(void) +{ + /* Configure output pins */ + + pic32mx_configgpio(GPIO_LED_1); + pic32mx_configgpio(GPIO_LED_2); + pic32mx_configgpio(GPIO_LED_3); } #endif @@ -246,7 +263,7 @@ void board_autoled_on(int led) { if ((unsigned)led < LED_NVALUES) { - up_setleds(&g_ledonvalues[led]); + pic32mx_setleds(&g_ledonvalues[led]); } } #endif @@ -260,7 +277,7 @@ void board_autoled_off(int led) { if ((unsigned)led < LED_NVALUES) { - up_setleds(&g_ledoffvalues[led]); + pic32mx_setleds(&g_ledoffvalues[led]); } } #endif diff --git a/configs/ubw32/src/ubw32-internal.h b/configs/ubw32/src/ubw32-internal.h index 98aea036c6..2b830bb723 100644 --- a/configs/ubw32/src/ubw32-internal.h +++ b/configs/ubw32/src/ubw32-internal.h @@ -63,7 +63,8 @@ #ifdef __cplusplus #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -77,11 +78,11 @@ extern "C" { ************************************************************************************/ #if defined(CONFIG_PIC32MX_SPI1) || defined(CONFIG_PIC32MX_SPI2) -EXTERN void weak_function pic32mx_spiinitialize(void); +void weak_function pic32mx_spiinitialize(void); #endif /************************************************************************************ - * Name: pic32mx_ledinit + * Name: pic32mx_led_initialize * * Description: * Configure on-board LEDs if LED support has been selected. @@ -89,7 +90,7 @@ EXTERN void weak_function pic32mx_spiinitialize(void); ************************************************************************************/ #ifdef CONFIG_ARCH_LEDS -EXTERN void pic32mx_ledinit(void); +void pic32mx_led_initialize(void); #endif #undef EXTERN diff --git a/configs/viewtool-stm32f107/src/stm32_boot.c b/configs/viewtool-stm32f107/src/stm32_boot.c index 43b4a6a3b6..c7bf19ad06 100644 --- a/configs/viewtool-stm32f107/src/stm32_boot.c +++ b/configs/viewtool-stm32f107/src/stm32_boot.c @@ -93,5 +93,5 @@ void stm32_boardinitialize(void) /* Configure on-board LEDs (unconditionally). */ - stm32_ledinit(); + stm32_led_initialize(); } diff --git a/configs/viewtool-stm32f107/src/stm32_leds.c b/configs/viewtool-stm32f107/src/stm32_leds.c index ec0c2335ef..f6ba968118 100644 --- a/configs/viewtool-stm32f107/src/stm32_leds.c +++ b/configs/viewtool-stm32f107/src/stm32_leds.c @@ -140,14 +140,14 @@ static void led_offbits(unsigned int clrbits) ****************************************************************************/ /**************************************************************************** - * Name: stm32_ledinit + * Name: stm32_led_initialize * * Description: * Configure LEDs. LEDs are left in the OFF state. * ****************************************************************************/ -void stm32_ledinit(void) +void stm32_led_initialize(void) { /* Configure LED1-4 GPIOs for output. Initial state is OFF */ @@ -250,7 +250,7 @@ void board_autoled_off(int led) #endif /************************************************************************************ - * Name: stm32_setled, and stm32_setleds + * Name: board_userled_initialize, board_userled, and board_userled_all * * Description: * These interfaces allow user control of the board LEDs. @@ -264,7 +264,12 @@ void board_autoled_off(int led) * ************************************************************************************/ -void stm32_setled(int led, bool ledon) +void board_userled_initialize(void) +{ + /* Already initialized by stm32_led_initialize */ +} + +void board_userled(int led, bool ledon) { uint32_t pinset; @@ -294,7 +299,7 @@ void stm32_setled(int led, bool ledon) stm32_gpiowrite(pinset, !ledon); } -void stm32_setleds(uint8_t ledset) +void board_userled_all(uint8_t ledset) { #ifdef CONFIG_ARCH_LEDS led_onbits(ledset & ~BOARD_LED4_BIT); diff --git a/configs/viewtool-stm32f107/src/viewtool_stm32f107.h b/configs/viewtool-stm32f107/src/viewtool_stm32f107.h index 294f198c7f..ec00b348b6 100644 --- a/configs/viewtool-stm32f107/src/viewtool_stm32f107.h +++ b/configs/viewtool-stm32f107/src/viewtool_stm32f107.h @@ -302,14 +302,14 @@ void weak_function stm32_spiinitialize(void); /**************************************************************************** - * Name: stm32_ledinit + * Name: stm32_led_initialize * * Description: * Configure LEDs. LEDs are left in the OFF state. * ****************************************************************************/ -void stm32_ledinit(void); +void stm32_led_initialize(void); /**************************************************************************** * Name: stm32_usbdev_initialize