Fix nxstyle issue

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-06-06 21:16:53 +08:00 committed by Abdelatif Guettouche
parent 7a18ebe459
commit 24262a4ddb
68 changed files with 251 additions and 262 deletions

View file

@ -82,9 +82,9 @@
* LED_PANIC The system has crashed N/C N/C 2Hz Flashing
* LED_IDLE MCU is is sleep mode Not used
*
* After booting, LED1 and 3 are not longer used by the system and can be used
* for other purposes by the application (Of course, all LEDs are available to
* the application if CONFIG_ARCH_LEDS is not defined.
* After booting, LED1 and 3 are not longer used by the system and can be
* used for other purposes by the application (Of course, all LEDs are
* available to the application if CONFIG_ARCH_LEDS is not defined.
*/
/****************************************************************************

View file

@ -32,6 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* The EFM32 Giant Gecko Start Kit has two yellow LEDs marked LED0 and LED1.
* These LEDs are controlled by GPIO pins on the EFM32. The LEDs are
* connected to pins PE2 and PE3 in an active high configuration:

View file

@ -52,7 +52,7 @@
* Pre-processor Definitions
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
/* NOTE: The following definitions require lpc17_40_syscon.h.
* It is not included here because the including C file may not have that
@ -66,23 +66,24 @@
/* This is the clock setup we configure for:
*
* SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source
* PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multipler=20, pre-divider=1
* CCLCK = 480MHz / 6 = 80MHz -> CCLK divider = 6
* SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Main oscillator for source
* PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> multipler=20, pre-divider=1
* CCLCK = 480MHz / 6 = 80MHz -> divider = 6
*/
#define LPC17_40_CCLK 80000000 /* 80Mhz*/
/* Select the main oscillator as the frequency source. SYSCLK is then the frequency
* of the main oscillator.
/* Select the main oscillator as the frequency source. SYSCLK is then the
* frequency of the main oscillator.
*/
#undef CONFIG_LPC17_40_MAINOSC
#define CONFIG_LPC17_40_MAINOSC 1
#define BOARD_SCS_VALUE SYSCON_SCS_OSCEN
/* Select the main oscillator and CCLK divider. The output of the divider is CCLK.
* The input to the divider (PLLCLK) will be determined by the PLL output.
/* Select the main oscillator and CCLK divider. The output of the divider is
* CCLK. The input to the divider (PLLCLK) will be determined by the PLL
* output.
*/
#define BOARD_CCLKCFG_DIVIDER 6
@ -134,7 +135,7 @@
#define ETH_MCFG_CLKSEL_DIV ETH_MCFG_CLKSEL_DIV20
/* LED definitions *********************************************************/
/* Clocking *****************************************************************/
/* The Lincoln 60 has 2 LEDs along the bottom of the board. Green or off.
* If CONFIG_ARCH_LEDS is defined, the LEDs will be controlled as follows
@ -142,6 +143,7 @@
*
* During the boot phases. LED1 and LED2 will show boot status.
*/
/* LED1 LED2 */
#define LED_STARTED 0 /* OFF OFF */
#define LED_HEAPALLOCATE 1 /* GREEN OFF */
@ -152,6 +154,7 @@
* They are available for use the application software using lpc17_40_led
* (prototyped below)
*/
/* LED1 LED2 LED3 LED4 */
#define LED_INIRQ 4 /* NC NC NC ON (momentary) */
#define LED_SIGNAL 5 /* NC NC NC ON (momentary) */

View file

@ -36,12 +36,12 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*****************************************************************************/
****************************************************************************/
#ifndef __BOARDS_ARM_LPC17XX_40XX_PNEV5180B_INCLUDE_BOARD_H
#define __BOARDS_ARM_LPC17XX_40XX_PNEV5180B_INCLUDE_BOARD_H
/*****************************************************************************
/****************************************************************************
* Included Files
****************************************************************************/
@ -53,11 +53,11 @@
# include <nuttx/irq.h>
#endif
/*****************************************************************************
/****************************************************************************
* Pre-processor Definitions
*****************************************************************************/
****************************************************************************/
/* Clocking ******************************************************************/
/* Clocking *****************************************************************/
/* NOTE: The following definitions require lpc17_40_syscon.h. It is not
* included here because the including C file may not have that file in its
@ -138,13 +138,15 @@
#define CONFIG_LP17_FLASH 1
#define BOARD_FLASHCFG_VALUE 0x0000403a
/* LED definitions ***********************************************************/
/* LED definitions **********************************************************/
/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the LEDs on the
* PNEV5180B board. The following definitions describe how NuttX controls the
* LEDs:
* PNEV5180B board. The following definitions describe how NuttX controls
* the LEDs:
*/
/* LD201 LD200 LD202 LD203 */
/* RED ORANGE BLUE GREEN */
#define LED_STARTED 0 /* ON ON ON ON */
#define LED_HEAPALLOCATE 1 /* OFF OFF OFF ON */
@ -155,7 +157,7 @@
#define LED_ASSERTION 6 /* OFF ON OFF OFF (momentary) */
#define LED_PANIC 7 /* ON OFF OFF OFF (1Hz flashing) */
/* Alternate pin selections **************************************************/
/* Alternate pin selections *************************************************/
/* Pin Description On Board Connector
* -------------------------------- ---------------- -------------
@ -180,15 +182,15 @@
* P3.26/STCLK/MAT0.1/PWM1.3 LD202 BLUE LED
*/
/*****************************************************************************
/****************************************************************************
* Public Types
*****************************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
/*****************************************************************************
/****************************************************************************
* Public Data
*****************************************************************************/
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
@ -199,30 +201,30 @@ extern "C"
#define EXTERN extern
#endif
/*****************************************************************************
/****************************************************************************
* Public Function Prototypes
*****************************************************************************/
****************************************************************************/
/*****************************************************************************
/****************************************************************************
* Name: lpc17_40_boardinitialize
*
* Description:
* All LPC17xx/LPC40xx architectures must provide the following entry point.
* This entry point is called early in the initialization -- after all
* memory has been configured and mapped but before any devices have
* All LPC17xx/LPC40xx architectures must provide the following entry
* point. This entry point is called early in the initialization -- after
* all memory has been configured and mapped but before any devices have
* been initialized.
*
*****************************************************************************/
****************************************************************************/
void lpc17_40_boardinitialize(void);
/*****************************************************************************
/****************************************************************************
* Name: lpc17_40_led
*
* Description:
* Once the system has booted, these functions can be used to control LED 1
*
*****************************************************************************/
****************************************************************************/
#ifdef CONFIG_ARCH_LEDS
void lpc17_40_led(int lednum, int state);

View file

@ -3,7 +3,7 @@
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Alan Carvalho de Assis acassis@gmail.com [nuttx] <nuttx@googlegroups.com>
* Alan Carvalho de Assis acassis@gmail.com
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -52,7 +52,7 @@
* Pre-processor Definitions
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
/* NOTE: The following definitions require lpc43_cgu.h. It is not included
* here because the including C file may not have that file in its include
@ -146,9 +146,9 @@
/* This is the clock setup we configure for:
*
* SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source
* PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multipler=20, pre-divider=1
* CCLCK = 480MHz / 6 = 80MHz -> CCLK divider = 6
* SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Main oscillator for source
* PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> multipler=20, pre-divider=1
* CCLCK = 480MHz / 6 = 80MHz -> divider = 6
*/
#define LPC43_CCLK BOARD_FCLKOUT_FREQUENCY
@ -185,7 +185,7 @@
#define BOARD_SDIO_CLKSRC BASE_SDIO_CLKSEL_PLL1
/* USB0 ********************************************************************/
/* USB0 *********************************************************************/
/* Settings needed in lpc43_cpu.c */
@ -193,7 +193,7 @@
#define BOARD_USB0_MDIV 0x06167ffa /* Table 149 datsheet, valid for 12Mhz Fclkin */
#define BOARD_USB0_NP_DIV 0x00302062 /* Table 149 datsheet, valid for 12Mhz Fclkin */
/* SPIFI clocking **********************************************************/
/* SPIFI clocking ***********************************************************/
/* The SPIFI will receive clocking from a divider per the settings provided
* in this file. The NuttX code will configure PLL1 as the input clock
@ -261,7 +261,7 @@
#define BOARD_CLKDIV_SDWIDEXFR BOARD_SDMMC_CEIL(BOARD_SDMMC_FREQUENCY, 25000000)
#define BOARD_CLKDIV_SDXFR BOARD_SDMMC_CEIL(BOARD_SDMMC_FREQUENCY, 25000000)
/* UART clocking ***********************************************************/
/* UART clocking ************************************************************/
/* Configure all U[S]ARTs to use the XTAL input frequency */
@ -277,7 +277,7 @@
#define BOARD_USART3_CLKSRC BASE_USART3_CLKSEL_XTAL
#define BOARD_USART3_BASEFREQ BOARD_XTAL_FREQUENCY
/* LED definitions *********************************************************/
/* Clocking *****************************************************************/
/* The Bambino 200E has 2 user-controllable LEDs labeled LED1 and LED2 in the
* schematic and on bus referred to has GPIO3[7] and GPIO5[5], respectively.
@ -309,8 +309,8 @@
* void board_userled(int led, bool ledon);
* void board_userled_all(uint32_t ledset);
*/
/* ON OFF */
/* LED1 LED2 LED1 LED2 */
/* LED1 LED2 LED1 LED2 */
#define LED_STARTED 0 /* OFF OFF - - */
#define LED_HEAPALLOCATE 1 /* ON OFF - - */
#define LED_IRQSENABLED 1 /* ON OFF - - */
@ -354,7 +354,7 @@
#define PINCONF_U3_RXD PINCONF_U3_RXD_2
#define PINCONF_U3_DIR PINCONF_U3_DIR_2
/* SPI Pins ****************************************************************/
/* SPI Pins *****************************************************************/
/* The Bambino 200E has SPI peripheral pins reserved for SPIFI.
* SSP0 and SSP1 are available on Socket 1 and 10, respectively:

View file

@ -3,7 +3,7 @@
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Alan Carvalho de Assis acassis@gmail.com [nuttx] <nuttx@googlegroups.com>
* Alan Carvalho de Assis acassis@gmail.com
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions

View file

@ -3,7 +3,7 @@
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Alan Carvalho de Assis acassis@gmail.com [nuttx] <nuttx@googlegroups.com>
* Alan Carvalho de Assis acassis@gmail.com
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions

View file

@ -51,7 +51,7 @@
* Pre-processor Definitions
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
/* NOTE: The following definitions require lpc43_cgu.h. It is not included
* here because the including C file may not have that file in its include
@ -144,9 +144,9 @@
/* This is the clock setup we configure for:
*
* SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source
* PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multipler=20, pre-divider=1
* CCLCK = 480MHz / 6 = 80MHz -> CCLK divider = 6
* SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Main oscillator for source
* PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> multipler=20, pre-divider=1
* CCLCK = 480MHz / 6 = 80MHz -> divider = 6
*/
#define LPC43_CCLK BOARD_FCLKOUT_FREQUENCY
@ -179,7 +179,7 @@
#define BOARD_SSP1_CLKSRC BASE_SSP1_CLKSEL_IDIVA
#define BOARD_SSP1_BASEFREQ BOARD_IDIVA_FREQUENCY
/* USB0 ********************************************************************/
/* USB0 *********************************************************************/
/* Settings needed in lpc43_cpu.c */
@ -187,7 +187,7 @@
#define BOARD_USB0_MDIV 0x06167ffa /* Table 149 datsheet, valid for 12Mhz Fclkin */
#define BOARD_USB0_NP_DIV 0x00302062 /* Table 149 datsheet, valid for 12Mhz Fclkin */
/* SPIFI clocking **********************************************************/
/* SPIFI clocking ***********************************************************/
/* The SPIFI will receive clocking from a divider per the settings provided
* in this file. The NuttX code will configure PLL1 as the input clock
@ -219,7 +219,7 @@
# define BOARD_SPIFI_FREQUENCY (102000000) /* 204MHz / 14 = 14.57MHz */
#endif
/* SD/MMC or SDIO interface ************************************************/
/* SD/MMC or SDIO interface *************************************************/
#define BOARD_SDMMC_CEIL(a,b) (((a) + (b) - 1) / (b))
@ -248,7 +248,7 @@
#define BOARD_CLKDIV_SDWIDEXFR BOARD_SDMMC_CEIL(BOARD_SDMMC_FREQUENCY, 25000000)
#define BOARD_CLKDIV_SDXFR BOARD_SDMMC_CEIL(BOARD_SDMMC_FREQUENCY, 25000000)
/* UART clocking ***********************************************************/
/* UART clocking ************************************************************/
/* Configure all U[S]ARTs to use the XTAL input frequency */
@ -264,7 +264,7 @@
#define BOARD_USART3_CLKSRC BASE_USART3_CLKSEL_XTAL
#define BOARD_USART3_BASEFREQ BOARD_XTAL_FREQUENCY
/* LED definitions *********************************************************/
/* Clocking *****************************************************************/
/* The LPC4330-Xplorer has 2 user-controllable LEDs labeled D2 an D3 in the
* schematic and on but referred to has LED1 and LED2 here, respectively.
@ -296,8 +296,8 @@
* void board_userled(int led, bool ledon);
* void board_userled_all(uint32_t ledset);
*/
/* ON OFF */
/* LED1 LED2 LED1 LED2 */
/* LED1 LED2 LED1 LED2 */
#define LED_STARTED 0 /* OFF OFF - - */
#define LED_HEAPALLOCATE 1 /* ON OFF - - */
#define LED_IRQSENABLED 1 /* ON OFF - - */

View file

@ -51,7 +51,7 @@
* Pre-processor Definitions
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
/* NOTE: The following definitions require lpc43_cgu.h. It is not included
* here because the including C file may not have that file in its include
@ -162,7 +162,7 @@
#define BOARD_IDIVA_CLKSRC IDIVA_CLKSEL_PLL1
#define BOARD_IDIVA_FREQUENCY (BOARD_FCLKOUT_FREQUENCY/BOARD_IDIVA_DIVIDER)
/* USB0 ********************************************************************/
/* USB0 *********************************************************************/
/* Settings needed in lpc43_cpu.c */
@ -170,7 +170,7 @@
#define BOARD_USB0_MDIV 0x06167ffa /* Table 149 datsheet, valid for 12Mhz Fclkin */
#define BOARD_USB0_NP_DIV 0x00302062 /* Table 149 datsheet, valid for 12Mhz Fclkin */
/* SPIFI clocking **********************************************************/
/* SPIFI clocking ***********************************************************/
/* The SPIFI will receive clocking from a divider per the settings provided
* in this file. The NuttX code will configure PLL1 as the input clock
@ -223,7 +223,7 @@
# define SPIFI_DEVICE_REQUENCY_DIVIDER 2 /* PLL1 clock divider */
#endif
/* UART clocking ***********************************************************/
/* UART clocking ************************************************************/
/* Configure all U[S]ARTs to use the XTAL input frequency */
@ -255,7 +255,7 @@
#define BOARD_SSP1_CLKSRC BASE_SSP1_CLKSEL_IDIVA
#define BOARD_SSP1_BASEFREQ BOARD_IDIVA_FREQUENCY
/* LED definitions *********************************************************/
/* Clocking *****************************************************************/
/* LED1 K2 GPIO0[8]
*
@ -279,6 +279,7 @@
* void board_userled(int led, bool ledon);
* void board_userled_all(uint32_t ledset);
*/
/* LED */
#define LED_STARTED 0 /* OFF */
#define LED_HEAPALLOCATE 0 /* OFF */

View file

@ -51,7 +51,7 @@
* Pre-processor Definitions
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
/* NOTE: The following definitions require lpc43_cgu.h. It is not included
* here because the including C file may not have that file in its include
@ -144,14 +144,14 @@
/* This is the clock setup we configure for:
*
* SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Select Main oscillator for source
* PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz -> PLL0 multipler=20, pre-divider=1
* CCLCK = 480MHz / 6 = 80MHz -> CCLK divider = 6
* SYSCLK = BOARD_OSCCLK_FREQUENCY = 12MHz -> Main oscillator for source
* PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz-> multipler=20, pre-divider=1
* CCLCK = 480MHz / 6 = 80MHz -> divider = 6
*/
#define LPC43_CCLK BOARD_FCLKOUT_FREQUENCY
/* USB0 ********************************************************************/
/* USB0 *********************************************************************/
/* Settings needed in lpc43_cpu.c */
@ -159,7 +159,7 @@
#define BOARD_USB0_MDIV 0x06167ffa /* Table 149 datsheet, valid for 12Mhz Fclkin */
#define BOARD_USB0_NP_DIV 0x00302062 /* Table 149 datsheet, valid for 12Mhz Fclkin */
/* SPIFI clocking **********************************************************/
/* SPIFI clocking ***********************************************************/
/* The SPIFI will receive clocking from a divider per the settings provided
* in this file. The NuttX code will configure PLL1 as the input clock
@ -191,7 +191,7 @@
# define BOARD_SPIFI_FREQUENCY (102000000) /* 204MHz / 14 = 14.57MHz */
#endif
/* UART clocking ***********************************************************/
/* UART clocking ************************************************************/
/* Configure all U[S]ARTs to use the XTAL input frequency */
@ -207,7 +207,7 @@
#define BOARD_USART3_CLKSRC BASE_USART3_CLKSEL_XTAL
#define BOARD_USART3_BASEFREQ BOARD_XTAL_FREQUENCY
/* LED definitions *********************************************************/
/* Clocking *****************************************************************/
/* The LPC4357-EVB has one user-controllable LED labelled D6 controlled
* by the signal LED_3V3:
@ -233,6 +233,7 @@
/* If CONFIG_ARCH_LEDS is defined, the LED will be controlled as follows
* for NuttX debug functionality (where NC means "No Change").
*/
/* LED */
#define LED_STARTED 0 /* OFF */
#define LED_HEAPALLOCATE 0 /* OFF */

View file

@ -51,7 +51,7 @@
* Pre-processor Definitions
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
/* NOTE: The following definitions require lpc43_cgu.h. It is not included
* here because the including C file may not have that file in its include
@ -157,7 +157,7 @@
#define BOARD_IDIVA_CLKSRC IDIVA_CLKSEL_PLL1
#define BOARD_IDIVA_FREQUENCY (BOARD_FCLKOUT_FREQUENCY/BOARD_IDIVA_DIVIDER)
/* USB0 ********************************************************************/
/* USB0 *********************************************************************/
/* Settings needed in lpc43_cpu.c */
@ -165,7 +165,7 @@
#define BOARD_USB0_MDIV 0x06167ffa /* Table 149 datsheet, valid for 12Mhz Fclkin */
#define BOARD_USB0_NP_DIV 0x00302062 /* Table 149 datsheet, valid for 12Mhz Fclkin */
/* SPIFI clocking **********************************************************/
/* SPIFI clocking ***********************************************************/
/* The SPIFI will receive clocking from a divider per the settings provided
* in this file. The NuttX code will configure PLL1 as the input clock
@ -218,7 +218,7 @@
# define SPIFI_DEVICE_REQUENCY_DIVIDER 2 /* PLL1 clock divider */
#endif
/* UART clocking ***********************************************************/
/* UART clocking ************************************************************/
/* Configure all U[S]ARTs to use the XTAL input frequency */
@ -250,7 +250,7 @@
#define BOARD_SSP1_CLKSRC BASE_SSP1_CLKSEL_IDIVA
#define BOARD_SSP1_BASEFREQ BOARD_IDIVA_FREQUENCY
/* LED definitions *********************************************************/
/* Clocking *****************************************************************/
/* LED1 K2 GPIO0[8]
*
@ -274,6 +274,7 @@
* void board_userled(int led, bool ledon);
* void board_userled_all(uint32_t ledset);
*/
/* LED */
#define LED_STARTED 0 /* OFF */
#define LED_HEAPALLOCATE 0 /* OFF */

View file

@ -46,7 +46,7 @@
* Pre-processor Definitions
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
#undef BOARD_180MHz
#define BOARD_220MHz 1
@ -248,7 +248,7 @@
#define BOARD_CLKDIV_SDWIDEXFR BOARD_SDMMC_CEIL(BOARD_SDMMC_FREQUENCY, 25000000)
#define BOARD_CLKDIV_SDXFR BOARD_SDMMC_CEIL(BOARD_SDMMC_FREQUENCY, 25000000)
/* LED definitions *********************************************************/
/* Clocking *****************************************************************/
/* The LPCXpress-LPC54628 has three user LEDs: D9, D11, and D12. These
* LEDs are for application use. They are illuminated when the driving
@ -280,6 +280,7 @@
* include/board.h and src/lpc54_autoleds.c. The LEDs are used to encode
* OS-related events as follows:
*/
/* D9 D11 D12 */
#define LED_STARTED 0 /* OFF OFF OFF */
#define LED_HEAPALLOCATE 1 /* ON OFF OFF */
@ -327,8 +328,8 @@
/* Flexcomm0/USART0
*
* USART0 connects to the serial bridge on LPC4322JET100 and is typically used
* for the serial console.
* USART0 connects to the serial bridge on LPC4322JET100 and is typically
* used for the serial console.
*
* BRIDGE_UART_RXD -> P0_29-ISP_FC0_RXD -> P0.29 GPIO_FC0_RXD_SDA_MOSI_2
* BRIDGE_UART_TXD <- P0_30-ISP_FC0_TXD <- P0.30 GPIO_FC0_TXD_SCL_MISO_2

View file

@ -51,11 +51,11 @@
* Pre-processor Definitions
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
#define BOARD_SYSTICK_CLOCK (64000000)
/* LED definitions *********************************************************/
/* Clocking *****************************************************************/
/* A low output illuminates the LED.
*

View file

@ -51,11 +51,11 @@
* Pre-processor Definitions
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
#define BOARD_SYSTICK_CLOCK (64000000)
/* LED definitions *********************************************************/
/* LED definitions **********************************************************/
/* A low output illuminates the LED.
*

View file

@ -51,11 +51,11 @@
* Pre-processor Definitions
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
#define BOARD_SYSTICK_CLOCK (64000000)
/* LED definitions *********************************************************/
/* LED definitions **********************************************************/
/* A low output illuminates the LED.
*

View file

@ -51,11 +51,11 @@
* Pre-processor Definitions
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
#define BOARD_SYSTICK_CLOCK (64000000)
/* LED definitions *********************************************************/
/* LED definitions **********************************************************/
/* A low output illuminates the LED.
*

View file

@ -32,6 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* There are three LEDs on board the SAM4L Xplained Pro board: The EDBG
* controls two of the LEDs, a power LED and a status LED. There is only
* one user controllable LED, a yellow LED labeled LED0 near the SAM4L USB
@ -106,8 +107,8 @@ void board_userled(int led, bool ledon)
*
* Description:
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED0 from user application logic. NOTE: since
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all()
* is available to control the LED0 from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
*
****************************************************************************/

View file

@ -86,7 +86,8 @@ void board_userled(int led, bool ledon)
void board_userled_all(uint32_t ledset)
{
sam_gpiowrite(GPIO_D301, (ledset & BOARD_D301_BIT) ? LED_D301_ON : LED_D301_OFF);
sam_gpiowrite(GPIO_D301,
(ledset & BOARD_D301_BIT) ? LED_D301_ON : LED_D301_OFF);
}
#endif /* !CONFIG_ARCH_LEDS */

View file

@ -32,6 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* There are two LEDs on the SAMA5D3 series-CM board that can be controlled
* by software. A blue LED is controlled via PIO pins. A red LED normally
* provides an indication that power is supplied to the board but can also

View file

@ -32,6 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* There are two LEDs on the SAMA5D3 series-CM board that can be controlled
* by software. A blue LED is controlled via PIO pins. A red LED normally
* provides an indication that power is supplied to the board but can also

View file

@ -35,13 +35,13 @@
/* There are 3 LEDs on the SAMA5D4-EK:
*
* ------------------------------ ------------------- -----------------------
* SAMA5D4 PIO SIGNAL USAGE
* ------------------------------ ------------------- -----------------------
* PE28/NWAIT/RTS4/A19 1Wire_PE28 1-WIRE ROM, LCD, D8 (green)
* PE8/A8/TCLK3/PWML3 LED_USER_PE8 LED_USER (D10)
* PE9/A9/TIOA2 LED_POWER_PE9 LED_POWER (D9, Red)
* ------------------------------ ------------------- -----------------------
* -------------------------- ------------------- -----------------------
* SAMA5D4 PIO SIGNAL USAGE
* -------------------------- ------------------- -----------------------
* PE28/NWAIT/RTS4/A19 1Wire_PE28 1-WIRE ROM, LCD, D8 (green)
* PE8/A8/TCLK3/PWML3 LED_USER_PE8 LED_USER (D10)
* PE9/A9/TIOA2 LED_POWER_PE9 LED_POWER (D9, Red)
* -------------------------- ------------------- -----------------------
*
* - D8: D8 is shared with other functions and cannot be used if the
* 1-Wire ROM is used.

View file

@ -35,8 +35,8 @@
/* There is a LED on board the Arduino M0.
*
* This LED is controlled by PA17 and the LED can be activated by driving PA17
* to High.
* This LED is controlled by PA17 and the LED can be activated by driving
* PA17 to High.
*
* When CONFIG_ARCH_LEDS is defined in the NuttX configuration, NuttX will
* control the LED. Otherwise, the LED can be controlled from user
@ -107,7 +107,7 @@ void board_userled(int led, bool ledon)
* LEDs.
* If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
* there is only a single LED on-board, this is function isn't very useful.
*
****************************************************************************/

View file

@ -38,8 +38,8 @@
* one user controllable LED, a yellow LED labeled STATUS near the SAMD20 USB
* connector.
*
* This LED is controlled by PA14 and the LED can be activated by driving PA14
* to GND.
* This LED is controlled by PA14 and the LED can be activated by driving
* PA14 to GND.
*
* When CONFIG_ARCH_LEDS is defined in the NuttX configuration, NuttX will
* control the LED. Otherwise, the LED can be controlled from user

View file

@ -35,11 +35,11 @@
/* There are three LEDs on board the SAMD21 Xplained Pro board: The EDBG
* controls two of the LEDs, a power LED and a status LED. There is only
* one user controllable LED, a yellow LED labelled STATUS near the SAMD21 USB
* connector.
* one user controllable LED, a yellow LED labelled STATUS near the SAMD21
* USB connector.
*
* This LED is controlled by PB30 and the LED can be activated by driving PB30
* to GND.
* This LED is controlled by PB30 and the LED can be activated by driving
* PB30 to GND.
*
* When CONFIG_ARCH_LEDS is defined in the NuttX configuration, NuttX will
* control the LED. Otherwise, the LED can be controlled from user
@ -110,7 +110,7 @@ void board_userled(int led, bool ledon)
* LEDs.
* If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
* there is only a single LED on-board, this is function isn't very useful.
*
****************************************************************************/

View file

@ -32,13 +32,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* There are three LEDs on board the SAML21 Xplained Pro board: The EDBG
* controls two of the LEDs, a power LED and a status LED. There is only
* one user controllable LED, a yellow LED labeled STATUS near the SAML21 USB
* connector.
*
* This LED is controlled by PB10 and the LED can be activated by driving PB10
* to GND.
* This LED is controlled by PB10 and the LED can be activated by driving
* PB10 to GND.
*
* When CONFIG_ARCH_LEDS is defined in the NuttX configuration, NuttX will
* control the LED.
@ -110,7 +111,7 @@ void board_userled(int led, bool ledon)
* LEDs.
* If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
* there is only a single LED on-board, this is function isn't very useful.
*
****************************************************************************/

View file

@ -33,7 +33,8 @@
*
****************************************************************************/
/* The SAME54 Xplained Pro has three LEDs, but only one is controllable by software:
/* The SAME54 Xplained Pro has three LEDs, but only one is controllable by
* software:
*
* 1. LED0 near the edge of the board
*

View file

@ -48,6 +48,10 @@
#ifndef CONFIG_ARCH_LEDS
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_userled_initialize
****************************************************************************/

View file

@ -57,6 +57,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =
@ -74,12 +75,12 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
uint32_t board_userled_initialize(void)
{
/* Configure LED1-3 GPIOs for output */
/* Configure LED1-3 GPIOs for output */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}

View file

@ -56,6 +56,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =
@ -73,11 +74,11 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
return 3;
}

View file

@ -123,8 +123,8 @@ void board_userled(int led, bool ledon)
*
* Description:
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED from user application logic. NOTE: since
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all()
* is available to control the LED from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
*
****************************************************************************/

View file

@ -123,8 +123,8 @@ void board_userled(int led, bool ledon)
*
* Description:
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED from user application logic. NOTE: since
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all()
* is available to control the LED from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
*
****************************************************************************/

View file

@ -101,35 +101,30 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}

View file

@ -101,35 +101,30 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}

View file

@ -102,35 +102,30 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}

View file

@ -60,6 +60,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =
@ -77,9 +78,9 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED_STATUS);
stm32_configgpio(GPIO_LED_STATUS);
return BOARD_NLEDS;
}

View file

@ -51,6 +51,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =
@ -68,9 +69,9 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED_STATUS);
stm32_configgpio(GPIO_LED_STATUS);
return BOARD_NLEDS;
}

View file

@ -56,6 +56,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =
@ -73,9 +74,9 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED_STATUS);
stm32_configgpio(GPIO_LED_STATUS);
return BOARD_NLEDS;
}

View file

@ -51,6 +51,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =
@ -80,12 +81,12 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}

View file

@ -51,6 +51,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =
@ -80,12 +81,12 @@ static uint32_t g_ledcfg[BOARD_NLEDS] =
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}

View file

@ -117,35 +117,30 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}

View file

@ -56,6 +56,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =

View file

@ -56,6 +56,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =

View file

@ -56,6 +56,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =

View file

@ -1,4 +1,4 @@
/*****************************************************************************
/****************************************************************************
* boards/arm/stm32/stm32butterfly2/src/stm32_leds.c
*
* Copyright (C) 2016 Michał Łyszczek. All rights reserved.
@ -32,7 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
****************************************************************************/
/*****************************************************************************
/****************************************************************************
* Included Files
****************************************************************************/
@ -44,7 +44,7 @@
#include "stm32_gpio.h"
/*****************************************************************************
/****************************************************************************
* Pre-processor definitions
****************************************************************************/
@ -57,7 +57,7 @@
#define GPIO_LED4 (GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz |\
GPIO_OUTPUT_SET | GPIO_PORTC | GPIO_PIN5)
/*****************************************************************************
/****************************************************************************
* Private Types
****************************************************************************/
@ -69,11 +69,11 @@ enum led_state
LED_OFF = true
};
/*****************************************************************************
/****************************************************************************
* Private Functions
****************************************************************************/
/*****************************************************************************
/****************************************************************************
* Name: led_state
*
* Description:
@ -103,11 +103,11 @@ static void led_state(enum led_state state, unsigned int leds)
}
}
/*****************************************************************************
/****************************************************************************
* Public Functions
****************************************************************************/
/*****************************************************************************
/****************************************************************************
* Name: stm32_led_initialize
*
* Description:
@ -124,14 +124,14 @@ void stm32_led_initialize(void)
#ifdef CONFIG_ARCH_LEDS
/*****************************************************************************
/****************************************************************************
* Name: board_autoled_on
*
* Description:
* Drives board leds when specific RTOS state led occurs.
*
* Input Parameters:
* led - This is actually an RTOS state not led number of anything like that
* led - This is actually RTOS state not led number of anything like that
****************************************************************************/
void board_autoled_on(int led)
@ -167,14 +167,14 @@ void board_autoled_on(int led)
}
}
/*****************************************************************************
/****************************************************************************
* Name: board_autoled_off
*
* Description:
* Drives board leds when specific RTOS state led ends
*
* Input Parameters:
* led - This is actually an RTOS state not led number of anything like that
* led - This is actually RTOS state not led number of anything like that
****************************************************************************/
void board_autoled_off(int led)
@ -204,14 +204,14 @@ void board_autoled_off(int led)
}
#endif
/*****************************************************************************
/****************************************************************************
* Name: board_userled_initialize
*
* Description:
* This function should initialize leds for user use, but on RTOS start we
* initialize every led for use by RTOS and at end, when RTOS is fully
* booted up, we give control of these specific leds for user. So that's why
* this function is empty.
* booted up, we give control of these specific leds for user. So that's
* why this function is empty.
****************************************************************************/
uint32_t board_userled_initialize(void)
@ -221,7 +221,7 @@ uint32_t board_userled_initialize(void)
return BOARD_NLEDS;
}
/*****************************************************************************
/****************************************************************************
* Name: board_userled
*
* Description:
@ -247,7 +247,7 @@ void board_userled(int led, bool ledon)
led_state(ledon, ledbit);
}
/*****************************************************************************
/****************************************************************************
* Name: board_userled_all
*
* Description:
@ -264,6 +264,6 @@ void board_userled_all(uint32_t ledset)
led_state(LED_OFF, ~(ledset | BOARD_LED4_BIT));
#else
led_state(LED_ON, ledset);
led_state(led_OFF, ~ledset);
led_state(LED_OFF, ~ledset);
#endif
}

View file

@ -54,6 +54,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static const uint32_t g_ledcfg[BOARD_NLEDS] =

View file

@ -54,6 +54,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static const uint32_t g_ledcfg[BOARD_NLEDS] =

View file

@ -57,6 +57,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =
@ -77,7 +78,6 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
enum pm_state_e pmstate);
#endif
/****************************************************************************
* Private Data
****************************************************************************/
@ -112,35 +112,30 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}
@ -181,10 +176,10 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
return BOARD_NLEDS;
}
@ -221,7 +216,7 @@ void stm32_ledpminitialize(void)
int ret = pm_register(&g_ledscb);
if (ret != OK)
{
{
board_autoled_on(LED_ASSERTION);
}
}

View file

@ -59,6 +59,7 @@
/****************************************************************************
* Private Data
****************************************************************************/
/* This array maps an LED number to GPIO pin configuration */
static uint32_t g_ledcfg[BOARD_NLEDS] =
@ -79,7 +80,6 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
enum pm_state_e pmstate);
#endif
/****************************************************************************
* Private Data
****************************************************************************/
@ -114,35 +114,30 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}
@ -183,12 +178,12 @@ static int led_pm_prepare(struct pm_callback_s *cb, int domain,
uint32_t board_userled_initialize(void)
{
/* Configure LED1-4 GPIOs for output */
/* Configure LED1-4 GPIOs for output */
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
stm32_configgpio(GPIO_LED1);
stm32_configgpio(GPIO_LED2);
stm32_configgpio(GPIO_LED3);
stm32_configgpio(GPIO_LED4);
return BOARD_NLEDS;
}

View file

@ -164,22 +164,22 @@ void board_autoled_on(int led)
switch (led)
{
case 0:
led_offbits(BOARD_LED2_BIT | BOARD_LED3_BIT |BOARD_LED4_BIT);
led_offbits(BOARD_LED2_BIT | BOARD_LED3_BIT | BOARD_LED4_BIT);
led_onbits(BOARD_LED1_BIT);
break;
case 1:
led_offbits(BOARD_LED1_BIT | BOARD_LED3_BIT |BOARD_LED4_BIT);
led_offbits(BOARD_LED1_BIT | BOARD_LED3_BIT | BOARD_LED4_BIT);
led_onbits(BOARD_LED2_BIT);
break;
case 2:
led_offbits(BOARD_LED3_BIT |BOARD_LED4_BIT);
led_offbits(BOARD_LED3_BIT | BOARD_LED4_BIT);
led_onbits(BOARD_LED1_BIT | BOARD_LED2_BIT);
break;
case 3:
led_offbits(BOARD_LED1_BIT | BOARD_LED2_BIT |BOARD_LED4_BIT);
led_offbits(BOARD_LED1_BIT | BOARD_LED2_BIT | BOARD_LED4_BIT);
led_onbits(BOARD_LED3_BIT);
break;
@ -235,12 +235,12 @@ void board_autoled_off(int led)
* Description:
* These interfaces allow user control of the board LEDs.
*
* If CONFIG_ARCH_LEDS is defined, then NuttX will control both on-board LEDs up
* until the completion of boot. The it will continue to control LED2; LED1 is
* available for application use.
* If CONFIG_ARCH_LEDS is defined, then NuttX will control both on-board
* LEDs up until the completion of boot. The it will continue to control
* LED2; LED1 is available for application use.
*
* If CONFIG_ARCH_LEDS is not defined, then both LEDs are available for application
* use.
* If CONFIG_ARCH_LEDS is not defined, then both LEDs are available for
* application use.
*
****************************************************************************/

View file

@ -101,35 +101,30 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}

View file

@ -101,35 +101,30 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}

View file

@ -125,8 +125,8 @@ void board_userled(int led, bool ledon)
*
* Description:
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED from user application logic. NOTE: since
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all()
* is available to control the LED from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
*
****************************************************************************/

View file

@ -91,8 +91,8 @@ void board_userled(int led, bool ledon)
*
* Description:
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED from user application logic. NOTE: since
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all()
* is available to control the LED from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
*
****************************************************************************/

View file

@ -91,8 +91,8 @@ void board_userled(int led, bool ledon)
*
* Description:
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED from user application logic. NOTE: since
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all()
* is available to control the LED from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
*
****************************************************************************/

View file

@ -123,8 +123,8 @@ void board_userled(int led, bool ledon)
*
* Description:
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED from user application logic. NOTE: since
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all()
* is available to control the LED from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
*
****************************************************************************/

View file

@ -126,8 +126,8 @@ void board_userled(int led, bool ledon)
*
* Description:
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED from user application logic. NOTE: since
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all()
* is available to control the LED from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
*
****************************************************************************/

View file

@ -74,7 +74,7 @@ void board_userled(int led, bool ledon)
{
stm32l4_gpiowrite(GPIO_LED1, ledon);
}
else if (led == BOARD_LED2)
else if (led == BOARD_LED2)
{
stm32l4_gpiowrite(GPIO_LED2, ledon);
}

View file

@ -101,35 +101,30 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}

View file

@ -102,35 +102,30 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}

View file

@ -101,35 +101,30 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
case(PM_NORMAL):
{
/* Restore normal LEDs operation */
}
break;
case(PM_IDLE):
{
/* Entering IDLE mode - Turn leds off */
}
break;
case(PM_STANDBY):
{
/* Entering STANDBY mode - Logic for PM_STANDBY goes here */
}
break;
case(PM_SLEEP):
{
/* Entering SLEEP mode - Logic for PM_SLEEP goes here */
}
break;
default:
{
/* Should not get here */
}
break;
}

View file

@ -125,8 +125,8 @@ void board_userled(int led, bool ledon)
*
* Description:
* If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all() is
* available to control the LED from user application logic. NOTE: since
* LEDs. If CONFIG_ARCH_LEDS is not defined, then the board_userled_all()
* is available to control the LED from user application logic. NOTE: since
* there is only a single LED on-board, this is function is not very useful.
*
****************************************************************************/

View file

@ -102,8 +102,13 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
{
/* Restore normal LEDs operation */
//stm32l4_gpiowrite(GPIO_LED_RED, (ledset & BOARD_LED_RED_BIT) != 0);
//stm32l4_gpiowrite(GPIO_LED_GRN, (ledset & BOARD_LED_GRN_BIT) != 0);
/* stm32l4_gpiowrite(GPIO_LED_RED,
* (ledset & BOARD_LED_RED_BIT) != 0);
*/
/* stm32l4_gpiowrite(GPIO_LED_GRN,
* (ledset & BOARD_LED_GRN_BIT) != 0);
*/
}
break;

View file

@ -102,9 +102,13 @@ static void led_pm_notify(struct pm_callback_s *cb, int domain,
{
/* Restore normal LEDs operation */
/* stm32l4_gpiowrite(GPIO_LED_RED, (ledset & BOARD_LED_RED_BIT) != 0); */
/* stm32l4_gpiowrite(GPIO_LED_RED,
* (ledset & BOARD_LED_RED_BIT) != 0);
*/
/* stm32l4_gpiowrite(GPIO_LED_GRN, (ledset & BOARD_LED_GRN_BIT) != 0); */
/* stm32l4_gpiowrite(GPIO_LED_GRN,
* (ledset & BOARD_LED_GRN_BIT) != 0);
*/
}
break;

View file

@ -32,6 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* The development board has one tri-color user LED.
*
* --- ------------ -----------------

View file

@ -32,6 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/* The EK-TM4C1294XL has a four green LEDs.
*
* --- ------------

View file

@ -55,7 +55,7 @@
/* LED Configuration ********************************************************/
/* The Mirtoo module has 2 user LEDs labelled LED0 and LED1 in the schematics:
/* The Mirtoo module has 2 user LEDs labelled LED0 and LED1:
*
* --- ----- --------------------------------------------------------------
* PIN Board Notes
@ -214,8 +214,8 @@ void board_userled_all(uint32_t ledset)
{
/* Call board_userled() with ledon == true to illuminated the LED */
board_userled(PIC32MX_MIRTOO_LED0, (ledset & PIC32MX_MIRTOO_LED0_BIT) != 0);
board_userled(PIC32MX_MIRTOO_LED1, (ledset & PIC32MX_MIRTOO_LED1_BIT) != 0);
board_userled(PIC32MX_MIRTOO_LED0, !!(ledset & PIC32MX_MIRTOO_LED0_BIT));
board_userled(PIC32MX_MIRTOO_LED1, !!(ledset & PIC32MX_MIRTOO_LED1_BIT));
}
#endif

View file

@ -55,6 +55,7 @@
#ifndef CONFIG_ARCH_LEDS
/* LED Configuration ********************************************************/
/* The PIC32MZ Ethernet Starter kit has 3 user LEDs labelled LED1-3 on the
* board:
*

View file

@ -1,4 +1,4 @@
/***************************************************************************
/****************************************************************************
* boards/renesas/rx65n/rx65n/include/board.h
*
* Copyright (C) 2008-2019 Gregory Nutt. All rights reserved.
@ -31,14 +31,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
***************************************************************************/
****************************************************************************/
#ifndef __BOARDS_RENESAS_RX65N_RX65N_INCLUDE_BOARD_H
#define __BOARDS_RENESAS_RX65N_RX65N_INCLUDE_BOARD_H
/***************************************************************************
/****************************************************************************
* Included Files
***************************************************************************/
****************************************************************************/
#ifndef __ASSEMBLY__
# include <stdint.h>
@ -46,9 +46,9 @@
/****************************************************************************
* Pre-processor Definitions
***************************************************************************/
****************************************************************************/
/* Clocking ****************************************************************/
/* Clocking *****************************************************************/
#define RX_CLK_1MHz (1000UL * 1000UL)
#define RX_FCLK ( 60 * RX_CLK_1MHz)
@ -138,7 +138,7 @@ extern "C"
#endif
/****************************************************************************
* Public Functions
* Public Functions Prototype
****************************************************************************/
#undef EXTERN