mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
Mostly costmetic changes from review of last PR
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,10 +47,6 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_ARCH_BUTTONS
|
#ifdef CONFIG_ARCH_BUTTONS
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -74,14 +74,6 @@
|
|||||||
# define spivdbg(x...)
|
# define spivdbg(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Private Data
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user