mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Standardize naming of user LEDs interface functions
This commit is contained in:
@@ -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
|
||||
-----------
|
||||
|
||||
@@ -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 <gnutt@nuttx.org>
|
||||
*
|
||||
* 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user