Mostly costmetic changes from review of last PR
This commit is contained in:
parent
9643f68256
commit
2d3e653996
@ -294,7 +294,7 @@ Configurations
|
||||
==============
|
||||
|
||||
nsh:
|
||||
---------
|
||||
----
|
||||
Configures the NuttShell (nsh) located at apps/examples/nsh for the
|
||||
Nucleo-144 boards. The Configuration enables the serial interfaces
|
||||
on UART6. Support for builtin applications is enabled, but in the base
|
||||
@ -334,7 +334,7 @@ nsh:
|
||||
Consoles).
|
||||
|
||||
evalos:
|
||||
---------
|
||||
-------
|
||||
This configuration is designed to test the features of the board.
|
||||
- Configures the NuttShell (nsh) located at apps/examples/nsh for the
|
||||
Nucleo-144 boards. The console is available on serial interface USART3,
|
||||
|
@ -44,10 +44,6 @@
|
||||
#include "nucleo-144.h"
|
||||
#include <nuttx/leds/userled.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -64,13 +60,17 @@
|
||||
|
||||
int board_app_initialize(void)
|
||||
{
|
||||
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
|
||||
int ret;
|
||||
|
||||
/* Register the LED driver */
|
||||
|
||||
ret = userled_lower_initialize(LED_DRIVER_PATH);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
|
||||
}
|
||||
return 1;
|
||||
{
|
||||
syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -90,20 +90,20 @@ void board_autoled_on(int led)
|
||||
|
||||
switch (led)
|
||||
{
|
||||
case 0: /* LED_STARTED: NuttX has been started STATUS LED=OFF */
|
||||
/* LED_HEAPALLOCATE: Heap has been allocated STATUS LED=OFF */
|
||||
/* LED_IRQSENABLED: Interrupts enabled STATUS LED=OFF */
|
||||
break; /* Leave ledstate == true to turn OFF */
|
||||
case 0: /* LED_STARTED: NuttX has been started STATUS LED=OFF */
|
||||
/* LED_HEAPALLOCATE: Heap has been allocated STATUS LED=OFF */
|
||||
/* LED_IRQSENABLED: Interrupts enabled STATUS LED=OFF */
|
||||
break; /* Leave ledstate == true to turn OFF */
|
||||
|
||||
default:
|
||||
case 2: /* LED_INIRQ: In an interrupt STATUS LED=N/C */
|
||||
/* LED_SIGNAL: In a signal handler STATUS LED=N/C */
|
||||
/* LED_ASSERTION: An assertion failed STATUS LED=N/C */
|
||||
return; /* Return to leave STATUS LED unchanged */
|
||||
case 2: /* LED_INIRQ: In an interrupt STATUS LED=N/C */
|
||||
/* LED_SIGNAL: In a signal handler STATUS LED=N/C */
|
||||
/* LED_ASSERTION: An assertion failed STATUS LED=N/C */
|
||||
return; /* Return to leave STATUS LED unchanged */
|
||||
|
||||
case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */
|
||||
case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */
|
||||
ledstate = true; /* Set ledstate == false to turn ON */
|
||||
case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */
|
||||
case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */
|
||||
ledstate = true; /* Set ledstate == false to turn ON */
|
||||
break;
|
||||
}
|
||||
|
||||
@ -121,21 +121,21 @@ void board_autoled_off(int led)
|
||||
/* These should not happen and are ignored */
|
||||
|
||||
default:
|
||||
case 0: /* LED_STARTED: NuttX has been started STATUS LED=OFF */
|
||||
/* LED_HEAPALLOCATE: Heap has been allocated STATUS LED=OFF */
|
||||
/* LED_IRQSENABLED: Interrupts enabled STATUS LED=OFF */
|
||||
case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */
|
||||
case 0: /* LED_STARTED: NuttX has been started STATUS LED=OFF */
|
||||
/* LED_HEAPALLOCATE: Heap has been allocated STATUS LED=OFF */
|
||||
/* LED_IRQSENABLED: Interrupts enabled STATUS LED=OFF */
|
||||
case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */
|
||||
|
||||
/* These result in no-change */
|
||||
|
||||
case 2: /* LED_INIRQ: In an interrupt STATUS LED=N/C */
|
||||
/* LED_SIGNAL: In a signal handler STATUS LED=N/C */
|
||||
/* LED_ASSERTION: An assertion failed STATUS LED=N/C */
|
||||
return; /* Return to leave STATUS LED unchanged */
|
||||
case 2: /* LED_INIRQ: In an interrupt STATUS LED=N/C */
|
||||
/* LED_SIGNAL: In a signal handler STATUS LED=N/C */
|
||||
/* LED_ASSERTION: An assertion failed STATUS LED=N/C */
|
||||
return; /* Return to leave STATUS LED unchanged */
|
||||
|
||||
/* Turn STATUS LED off set driving the output high */
|
||||
|
||||
case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */
|
||||
case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */
|
||||
stm32_gpiowrite(GPIO_LD1, false);
|
||||
break;
|
||||
}
|
||||
|
@ -47,10 +47,6 @@
|
||||
|
||||
#ifdef CONFIG_ARCH_BUTTONS
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
@ -74,14 +74,6 @@
|
||||
# define spivdbg(x...)
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
|
@ -69,6 +69,7 @@
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/* This array maps an LED number to GPIO pin configuration */
|
||||
|
||||
static const uint32_t g_ledcfg[3] =
|
||||
@ -96,10 +97,11 @@ void board_userled_initialize(void)
|
||||
int i;
|
||||
|
||||
/* Configure LED1-3 GPIOs for output */
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
stm32_configgpio(g_ledcfg[i]);
|
||||
}
|
||||
{
|
||||
stm32_configgpio(g_ledcfg[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -134,11 +136,13 @@ void board_userled(int led, bool ledon)
|
||||
void board_userled_all(uint8_t ledset)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Configure LED1-3 GPIOs for output */
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
stm32_gpiowrite(g_ledcfg[i], (ledset & (1 << i)) != 0);
|
||||
}
|
||||
{
|
||||
stm32_gpiowrite(g_ledcfg[i], (ledset & (1 << i)) != 0);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_ARCH_LEDS */
|
||||
|
Loading…
Reference in New Issue
Block a user