configs/open1788: Fix some coding standard violations.
This commit is contained in:
parent
b747192f20
commit
33d14138c6
@ -56,6 +56,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in
|
/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in
|
||||||
* any way. The following definitions are used to access individual LEDs.
|
* any way. The following definitions are used to access individual LEDs.
|
||||||
*
|
*
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* configs/open1788/src/lpc17_boardinitialize.c
|
* configs/open1788/src/lpc17_boardinitialize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2013, 2015, 2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -79,37 +79,42 @@ void lpc17_boardinitialize(void)
|
|||||||
|
|
||||||
#ifdef CONFIG_LPC17_EMC
|
#ifdef CONFIG_LPC17_EMC
|
||||||
lpc17_emcinitialize();
|
lpc17_emcinitialize();
|
||||||
|
|
||||||
#ifdef CONFIG_LPC17_EXTDRAM
|
#ifdef CONFIG_LPC17_EXTDRAM
|
||||||
open1788_sdram_initialize();
|
open1788_sdram_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_LPC17_EXTNOR
|
#ifdef CONFIG_LPC17_EXTNOR
|
||||||
open1788_nor_initialize();
|
open1788_nor_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_LPC17_EXTNAND
|
#ifdef CONFIG_LPC17_EXTNAND
|
||||||
open1788_nand_initialize();
|
open1788_nand_initialize();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2) the weak
|
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1) || \
|
||||||
* function open1788_sspdev_initialize() has been brought into the link.
|
defined(CONFIG_LPC17_SSP2)
|
||||||
|
/* Configure SSP chip selects if 1) at least one SSP is enabled, and 2)
|
||||||
|
* the weak function open1788_sspdev_initialize() has been brought into
|
||||||
|
* the link.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_LPC17_SSP0) || defined(CONFIG_LPC17_SSP1) || defined(CONFIG_LPC17_SSP2)
|
|
||||||
if (open1788_sspdev_initialize)
|
if (open1788_sspdev_initialize)
|
||||||
{
|
{
|
||||||
open1788_sspdev_initialize();
|
open1788_sspdev_initialize();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
/* Configure on-board LEDs if LED support has been selected. */
|
/* Configure on-board LEDs if LED support has been selected. */
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LEDS
|
|
||||||
board_autoled_initialize();
|
board_autoled_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_LPC17_LCD
|
||||||
/* Configure the LCD GPIOs if LCD support has been selected. */
|
/* Configure the LCD GPIOs if LCD support has been selected. */
|
||||||
|
|
||||||
#ifdef CONFIG_LPC17_LCD
|
|
||||||
open1788_lcd_initialize();
|
open1788_lcd_initialize();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,8 @@ static int nsh_waiter(int argc, char *argv[])
|
|||||||
/* Wait for the device to change state */
|
/* Wait for the device to change state */
|
||||||
|
|
||||||
DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport));
|
DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport));
|
||||||
syslog(LOG_INFO, "nsh_waiter: %s\n", hport->connected ? "connected" : "disconnected");
|
syslog(LOG_INFO, "nsh_waiter: %s\n",
|
||||||
|
hport->connected ? "connected" : "disconnected");
|
||||||
|
|
||||||
/* Did we just become connected? */
|
/* Did we just become connected? */
|
||||||
|
|
||||||
@ -348,6 +349,7 @@ static int nsh_usbhostinitialize(void)
|
|||||||
(main_t)nsh_waiter, (FAR char * const *)NULL);
|
(main_t)nsh_waiter, (FAR char * const *)NULL);
|
||||||
return pid < 0 ? -ENOEXEC : OK;
|
return pid < 0 ? -ENOEXEC : OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -54,13 +54,10 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_ARCH_BUTTONS
|
#ifdef CONFIG_ARCH_BUTTONS
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* The Open1788 supports several buttons. All will read "1" when open and "0"
|
/* The Open1788 supports several buttons. All will read "1" when open and "0"
|
||||||
* when closed
|
* when closed
|
||||||
*
|
*
|
||||||
@ -102,10 +99,6 @@ static uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -137,9 +130,9 @@ void board_button_initialize(void)
|
|||||||
* Name: board_buttons
|
* Name: board_buttons
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* board_button_initialize() must be called to initialize button resources. After
|
* board_button_initialize() must be called to initialize button resources.
|
||||||
* that, board_buttons() may be called to collect the current state of all
|
* After that, board_buttons() may be called to collect the current state
|
||||||
* buttons.
|
* of all buttons.
|
||||||
*
|
*
|
||||||
* board_buttons() may be called at any time to harvest the state of every
|
* board_buttons() may be called at any time to harvest the state of every
|
||||||
* button. The state of the buttons is returned as a bitset with one
|
* button. The state of the buttons is returned as a bitset with one
|
||||||
@ -177,14 +170,15 @@ uint32_t board_buttons(void)
|
|||||||
* Button support.
|
* Button support.
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* board_button_initialize() must be called to initialize button resources. After
|
* board_button_initialize() must be called to initialize button resources.
|
||||||
* that, board_button_irq() may be called to register button interrupt handlers.
|
* After that, board_button_irq() may be called to register button
|
||||||
|
* interrupt handlers.
|
||||||
*
|
*
|
||||||
* board_button_irq() may be called to register an interrupt handler that will
|
* board_button_irq() may be called to register an interrupt handler that
|
||||||
* be called when a button is depressed or released. The ID value is a
|
* will be called when a button is depressed or released. The ID value is
|
||||||
* button enumeration value that uniquely identifies a button resource. See the
|
* a button enumeration value that uniquely identifies a button resource.
|
||||||
* BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for the meaning
|
* See the BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for
|
||||||
* of enumeration values.
|
* the meaning of enumeration values.
|
||||||
*
|
*
|
||||||
* Note that board_button_irq() also enables button interrupts. Button
|
* Note that board_button_irq() also enables button interrupts. Button
|
||||||
* interrupts will remain enabled after the interrupt handler is attached.
|
* interrupts will remain enabled after the interrupt handler is attached.
|
||||||
|
@ -50,14 +50,6 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_LPC17_LCD
|
#ifdef CONFIG_LPC17_LCD
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
@ -51,14 +51,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_LPC17_EXTNAND)
|
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_LPC17_EXTNAND)
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
@ -51,14 +51,6 @@
|
|||||||
|
|
||||||
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_LPC17_EXTNOR)
|
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_LPC17_EXTNOR)
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/* The core clock is LPC17_EMCCLK which may be either LPC17_CCLK* (undivided), or
|
/* The core clock is LPC17_EMCCLK which may be either LPC17_CCLK* (undivided), or
|
||||||
* LPC17_CCLK / 2 as determined by settings in the board.h header file.
|
* LPC17_CCLK / 2 as determined by settings in the board.h header file.
|
||||||
*
|
*
|
||||||
@ -96,10 +97,6 @@
|
|||||||
|
|
||||||
#define SDRAM_BASE 0xa0000000 /* CS0 */
|
#define SDRAM_BASE 0xa0000000 /* CS0 */
|
||||||
|
|
||||||
/************************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
************************************************************************************/
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
|
|
||||||
#ifndef CONFIG_INPUT
|
#ifndef CONFIG_INPUT
|
||||||
|
@ -71,6 +71,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* This array maps an LED number to GPIO pin configuration */
|
/* This array maps an LED number to GPIO pin configuration */
|
||||||
|
|
||||||
static uint32_t g_ledcfg[BOARD_NLEDS] =
|
static uint32_t g_ledcfg[BOARD_NLEDS] =
|
||||||
|
@ -161,7 +161,7 @@
|
|||||||
* Public Functions
|
* Public Functions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/************************************************************************************
|
||||||
* Name: lpc17_bringup
|
* Name: lpc17_bringup
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
@ -173,7 +173,7 @@
|
|||||||
* CONFIG_BOARD_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y :
|
* CONFIG_BOARD_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y :
|
||||||
* Called from the NSH library via boardctl()
|
* Called from the NSH library via boardctl()
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
int lpc17_bringup(void);
|
int lpc17_bringup(void);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user