boards/arm/imxrt/imxrt1020-evk: Make naming of the LED consistent. In most places it is referred to as LED1. In board.h it is referred to as USERLED1. The i.MXRT1020-EVK hardware user guide (HUG) uses the name USERLED. This command makes all names internally consistent and consistent with the HUG. Noted by Alin Jerpelea.
This commit is contained in:
parent
eb126f58c9
commit
a9b220f169
4 changed files with 41 additions and 42 deletions
|
@ -40,40 +40,39 @@ Serial Console
|
|||
LEDs and Buttons
|
||||
================
|
||||
|
||||
There is one user accessible LED status indicator located on the 1020-EVK.
|
||||
The function of the LEDs include:
|
||||
There is one user accessible LED status indicator located on the 1020-EVK,
|
||||
USERLED. The function of the LEDs include:
|
||||
|
||||
D3: Power (Green) & Overpower (Red)
|
||||
D5: User LED (Green) GPIO_AD_B0_05
|
||||
D15: RST LED (Red)
|
||||
D3: Power (Green) & Overpower (Red)
|
||||
D5: User LED (Green) GPIO_AD_B0_05
|
||||
D15: RST LED (Red)
|
||||
|
||||
This LED is not used by the board port unless CONFIG_ARCH_LEDS is
|
||||
defined. In that case, the usage by the board port is defined in
|
||||
include/board.h and src/imxrt_autoleds.c. The LED is used to encode
|
||||
OS-related events as documented in board.h
|
||||
This LED is not used by the board port unless CONFIG_ARCH_LEDS is
|
||||
defined. In that case, the usage by the board port is defined in
|
||||
include/board.h and src/imxrt_autoleds.c. The LED is used to encode
|
||||
OS-related events as documented in board.h
|
||||
|
||||
-------------------------------------------------
|
||||
SYMBOL Meaning LED1
|
||||
-------------------------------------------------
|
||||
---------------------------------------------------
|
||||
SYMBOL Meaning USERLED
|
||||
---------------------------------------------------
|
||||
|
||||
LED_STARTED NuttX has been started OFF
|
||||
LED_HEAPALLOCATE Heap has been allocated OFF
|
||||
LED_IRQSENABLED Interrupts enabled OFF
|
||||
LED_STACKCREATED Idle stack created ON
|
||||
LED_INIRQ In an interrupt N/C
|
||||
LED_SIGNAL In a signal handler N/C
|
||||
LED_ASSERTION An assertion failed N/C
|
||||
LED_PANIC The system has crashed FLASH
|
||||
LED_IDLE Not used
|
||||
LED_STARTED NuttX has been started OFF
|
||||
LED_HEAPALLOCATE Heap has been allocated OFF
|
||||
LED_IRQSENABLED Interrupts enabled OFF
|
||||
LED_STACKCREATED Idle stack created ON
|
||||
LED_INIRQ In an interrupt N/C
|
||||
LED_SIGNAL In a signal handler N/C
|
||||
LED_ASSERTION An assertion failed N/C
|
||||
LED_PANIC The system has crashed FLASH
|
||||
LED_IDLE Not used
|
||||
|
||||
In addition the LED is illuminated during an interrupt.
|
||||
In addition the LED is illuminated during an interrupt.
|
||||
|
||||
This IMXRT board has three external buttons
|
||||
|
||||
1. SW2 (IRQ88, ONOFF) Not on a GPIO, No muxing
|
||||
2. SW3 (IRQ88, POR) Not on a GPIO, No muxing
|
||||
2. SW4 (IRQ88, USER) Wakeup, GPIO5-0
|
||||
This IMXRT board has three external buttons
|
||||
|
||||
1. SW2 (IRQ88, ONOFF) Not on a GPIO, No muxing
|
||||
2. SW3 (IRQ88, POR) Not on a GPIO, No muxing
|
||||
3. SW4 (IRQ88, USER) Wakeup, GPIO5-0
|
||||
|
||||
Configurations
|
||||
==============
|
||||
|
|
|
@ -130,9 +130,9 @@
|
|||
* include/board.h and src/imxrt_autoleds.c. The LED is used to encode
|
||||
* OS-related events as documented in board.h
|
||||
*
|
||||
* -------------------- ----------------------------- ----
|
||||
* SYMBOL Meaning LED1
|
||||
* -------------------- ----------------------------- ----
|
||||
* -------------------- ----------------------------- --------
|
||||
* SYMBOL Meaning USERLED
|
||||
* -------------------- ----------------------------- --------
|
||||
*/
|
||||
|
||||
#define LED_STARTED 0 /* NuttX has been started OFF */
|
||||
|
@ -153,12 +153,12 @@
|
|||
|
||||
/* LED index values for use with board_userled() */
|
||||
|
||||
#define BOARD_USERLED1 0
|
||||
#define BOARD_USERLED 0
|
||||
#define BOARD_NLEDS 1
|
||||
|
||||
/* LED bits for use with board_userled_all() */
|
||||
|
||||
#define BOARD_USERLED1_BIT (1 << BOARD_USERLED1)
|
||||
#define BOARD_USERLED_BIT (1 << BOARD_USERLED)
|
||||
|
||||
/* Which device the SD card appears on */
|
||||
|
||||
|
@ -198,13 +198,13 @@
|
|||
|
||||
/* LEDs *********************************************************************/
|
||||
|
||||
#define GPIO_LED1 (IOMUX_LED_DEFAULT | GPIO_OUTPUT | GPIO_OUTPUT_ZERO | \
|
||||
GPIO_PORT1 | GPIO_PIN5 ) /* AD_B0_05 */
|
||||
#define GPIO_USERLED (IOMUX_LED_DEFAULT | GPIO_OUTPUT | \
|
||||
GPIO_OUTPUT_ZERO | GPIO_PORT1 | GPIO_PIN5) /* AD_B0_05 */
|
||||
|
||||
/* Buttons ******************************************************************/
|
||||
|
||||
#define GPIO_SWWAKE (GPIO_INTERRUPT | GPIO_INT_FALLINGEDGE | | IOMUX_SWWAKE_DEFAULT \
|
||||
GPIO_PORT5 | GPIO_PIN0 ) /* WAKE */
|
||||
#define GPIO_SWWAKE (GPIO_INTERRUPT | GPIO_INT_FALLINGEDGE | \
|
||||
IOMUX_SWWAKE_DEFAULT | GPIO_PORT5 | GPIO_PIN0) /* WAKE */
|
||||
|
||||
/* ETH Disambiguation ********************************************************/
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ void imxrt_autoled_initialize(void)
|
|||
{
|
||||
/* Configure LED GPIO for output */
|
||||
|
||||
imxrt_config_gpio(GPIO_LED1);
|
||||
imxrt_config_gpio(GPIO_USERLED);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -124,7 +124,7 @@ void board_autoled_on(int led)
|
|||
break;
|
||||
}
|
||||
|
||||
imxrt_gpio_write(GPIO_LED1, ledoff); /* Low illuminates */
|
||||
imxrt_gpio_write(GPIO_USERLED, ledoff); /* Low illuminates */
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -155,7 +155,7 @@ void board_autoled_off(int led)
|
|||
return;
|
||||
}
|
||||
|
||||
imxrt_gpio_write(GPIO_LED1, true); /* Low illuminates */
|
||||
imxrt_gpio_write(GPIO_USERLED, true); /* Low illuminates */
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ARCH_LEDS */
|
||||
|
|
|
@ -72,7 +72,7 @@ void board_userled_initialize(void)
|
|||
{
|
||||
/* Configure LED GPIO for output */
|
||||
|
||||
imxrt_config_gpio(GPIO_LED1);
|
||||
imxrt_config_gpio(GPIO_USERLED);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -84,7 +84,7 @@ void board_userled(int led, bool ledon)
|
|||
switch (led)
|
||||
{
|
||||
case 0:
|
||||
imxrt_gpio_write(GPIO_LED1, !ledon); /* Low illuminates */
|
||||
imxrt_gpio_write(GPIO_USERLED, !ledon); /* Low illuminates */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -99,7 +99,7 @@ void board_userled_all(uint8_t ledset)
|
|||
{
|
||||
/* Low illuminates */
|
||||
|
||||
imxrt_gpio_write(GPIO_LED1, (ledset & BOARD_USERLED1_BIT));
|
||||
imxrt_gpio_write(GPIO_USERLED, (ledset & BOARD_USERLED_BIT));
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_ARCH_LEDS */
|
||||
|
|
Loading…
Reference in a new issue