diff --git a/boards/arm/imxrt/imxrt1020-evk/README.txt b/boards/arm/imxrt/imxrt1020-evk/README.txt index 006cd582973..fdd0c2ba158 100644 --- a/boards/arm/imxrt/imxrt1020-evk/README.txt +++ b/boards/arm/imxrt/imxrt1020-evk/README.txt @@ -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 ============== diff --git a/boards/arm/imxrt/imxrt1020-evk/include/board.h b/boards/arm/imxrt/imxrt1020-evk/include/board.h index 13dd4305b73..4638dfd45b2 100644 --- a/boards/arm/imxrt/imxrt1020-evk/include/board.h +++ b/boards/arm/imxrt/imxrt1020-evk/include/board.h @@ -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 ********************************************************/ diff --git a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_autoleds.c b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_autoleds.c index f78ec819937..d7f597dbc5e 100644 --- a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_autoleds.c +++ b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_autoleds.c @@ -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 */ diff --git a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_userleds.c b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_userleds.c index 626dafbd3ed..6941c525ad4 100644 --- a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_userleds.c +++ b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_userleds.c @@ -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 */