From 6c277d082fc98b0b1005719bb87a0c34751e3803 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 28 Jan 2018 07:42:02 -0600 Subject: [PATCH] configs/flipnclick-pic32mz: Apply same LED fix as for flipnclick-sam3x. The LED code is cloned. --- configs/flipnclick-pic32mz/README.txt | 4 ++-- configs/flipnclick-pic32mz/include/board.h | 2 +- configs/flipnclick-pic32mz/src/pic32mz_autoleds.c | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/configs/flipnclick-pic32mz/README.txt b/configs/flipnclick-pic32mz/README.txt index 6e11eaffdd..72afa5a2ed 100644 --- a/configs/flipnclick-pic32mz/README.txt +++ b/configs/flipnclick-pic32mz/README.txt @@ -218,8 +218,8 @@ LEDs and Buttons LED_PANIC The system has crashed 2Hz N/C N/C N/C N/C LED_IDLE MCU is is sleep mode ---- Not used ----- - Thus if LED L is glowing on and all other LEDs are off (except LED D which - was left on but is no longer controlled by NuttX and so may be in any + Thus if LED L is glowing faintly and all other LEDs are off (except LED D + which was left on but is no longer controlled by NuttX and so may be in any state), NuttX has successfully booted and is, apparently, running normally and taking interrupts. If any of LEDs A-D are statically set, then NuttX failed to boot and the LED indicates the initialization phase where the diff --git a/configs/flipnclick-pic32mz/include/board.h b/configs/flipnclick-pic32mz/include/board.h index 0bcdc3dab1..87e48bc000 100644 --- a/configs/flipnclick-pic32mz/include/board.h +++ b/configs/flipnclick-pic32mz/include/board.h @@ -240,7 +240,7 @@ #define LED_PANIC 4 /* The system has crashed 2Hz N/C N/C N/C N/C */ #undef LED_IDLE /* MCU is is sleep mode ---- Not used ----- */ -/* Thus if LED L is glowing on and all other LEDs are off (except LED D which +/* Thus if LED L is faintly glowing and all other LEDs are off (except LED D which * was left on but is no longer controlled by NuttX and so may be in any state), * NuttX has successfully booted and is, apparently, running normally and taking * interrupts. If any of LEDs A-D are statically set, then NuttX failed to boot diff --git a/configs/flipnclick-pic32mz/src/pic32mz_autoleds.c b/configs/flipnclick-pic32mz/src/pic32mz_autoleds.c index 01d05ea00d..fc229ea532 100644 --- a/configs/flipnclick-pic32mz/src/pic32mz_autoleds.c +++ b/configs/flipnclick-pic32mz/src/pic32mz_autoleds.c @@ -57,6 +57,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* There are four LEDs on the top, red side of the board. Only one can be * controlled by software: * @@ -89,8 +90,8 @@ * LED_PANIC The system has crashed 2Hz N/C N/C N/C N/C * LED_IDLE MCU is is sleep mode ---- Not used ----- * - * Thus if LED L is glowing on and all other LEDs are off (except LED D - * which was left on but is no longer controlled by NuttX and so may be in + * Thus if LED L is faintly glowing and all other LEDs are off (except LED + * D which was left on but is no longer controlled by NuttX and so may be in * any state), NuttX has successfully booted and is, apparently, running * normally and taking interrupts. If any of LEDs A-D are statically set, * then NuttX failed to boot and the LED indicates the initialization phase @@ -122,7 +123,7 @@ static void board_autoled_setone(int ledndx) pic32mz_gpiowrite(GPIO_LED_L, ledon[INDEX_LED_L]); pic32mz_gpiowrite(GPIO_LED_A, ledon[INDEX_LED_A]); pic32mz_gpiowrite(GPIO_LED_B, ledon[INDEX_LED_B]); - pic32mz_gpiowrite(GPIO_LED_C, ledon[INDEX_LED_D]); + pic32mz_gpiowrite(GPIO_LED_C, ledon[INDEX_LED_C]); pic32mz_gpiowrite(GPIO_LED_D, ledon[INDEX_LED_D]); } @@ -175,7 +176,7 @@ void board_autoled_on(int led) board_autoled_setone(INDEX_LED_B); break; - case 2: + case 2: board_autoled_setone(INDEX_LED_C); break;