mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
Standardize naming of user LEDs interface functions
This commit is contained in:
@@ -103,7 +103,7 @@ void board_initialize(void)
|
||||
#ifndef CONFIG_ARCH_LEDS
|
||||
/* Initialize user led */
|
||||
|
||||
sam_ledinit();
|
||||
sam_led_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TIMER
|
||||
|
||||
@@ -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 <gnutt@nuttx.org>
|
||||
* 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user