Mostly costmetic changes from review of last PR

This commit is contained in:
Gregory Nutt
2016-05-20 07:44:56 -06:00
parent 9643f68256
commit 2d3e653996
6 changed files with 40 additions and 48 deletions
+2 -2
View File
@@ -294,7 +294,7 @@ Configurations
============== ==============
nsh: nsh:
--------- ----
Configures the NuttShell (nsh) located at apps/examples/nsh for the Configures the NuttShell (nsh) located at apps/examples/nsh for the
Nucleo-144 boards. The Configuration enables the serial interfaces Nucleo-144 boards. The Configuration enables the serial interfaces
on UART6. Support for builtin applications is enabled, but in the base on UART6. Support for builtin applications is enabled, but in the base
@@ -334,7 +334,7 @@ nsh:
Consoles). Consoles).
evalos: evalos:
--------- -------
This configuration is designed to test the features of the board. This configuration is designed to test the features of the board.
- Configures the NuttShell (nsh) located at apps/examples/nsh for the - Configures the NuttShell (nsh) located at apps/examples/nsh for the
Nucleo-144 boards. The console is available on serial interface USART3, Nucleo-144 boards. The console is available on serial interface USART3,
+5 -5
View File
@@ -44,10 +44,6 @@
#include "nucleo-144.h" #include "nucleo-144.h"
#include <nuttx/leds/userled.h> #include <nuttx/leds/userled.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@@ -64,13 +60,17 @@
int board_app_initialize(void) int board_app_initialize(void)
{ {
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
int ret; int ret;
/* Register the LED driver */ /* Register the LED driver */
ret = userled_lower_initialize(LED_DRIVER_PATH); ret = userled_lower_initialize(LED_DRIVER_PATH);
if (ret < 0) if (ret < 0)
{ {
syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
} }
return 1; #endif
return OK;
} }
-4
View File
@@ -47,10 +47,6 @@
#ifdef CONFIG_ARCH_BUTTONS #ifdef CONFIG_ARCH_BUTTONS
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
-8
View File
@@ -74,14 +74,6 @@
# define spivdbg(x...) # define spivdbg(x...)
#endif #endif
/************************************************************************************
* Private Data
************************************************************************************/
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************ /************************************************************************************
* Public Functions * Public Functions
************************************************************************************/ ************************************************************************************/
+4
View File
@@ -69,6 +69,7 @@
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */ /* This array maps an LED number to GPIO pin configuration */
static const uint32_t g_ledcfg[3] = static const uint32_t g_ledcfg[3] =
@@ -96,6 +97,7 @@ void board_userled_initialize(void)
int i; int i;
/* Configure LED1-3 GPIOs for output */ /* Configure LED1-3 GPIOs for output */
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
{ {
stm32_configgpio(g_ledcfg[i]); stm32_configgpio(g_ledcfg[i]);
@@ -134,7 +136,9 @@ void board_userled(int led, bool ledon)
void board_userled_all(uint8_t ledset) void board_userled_all(uint8_t ledset)
{ {
int i; int i;
/* Configure LED1-3 GPIOs for output */ /* Configure LED1-3 GPIOs for output */
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
{ {
stm32_gpiowrite(g_ledcfg[i], (ledset & (1 << i)) != 0); stm32_gpiowrite(g_ledcfg[i], (ledset & (1 << i)) != 0);