configs/open1788: Fix some coding standard violations.

This commit is contained in:
Gregory Nutt 2017-09-16 13:48:06 -06:00
parent b747192f20
commit 33d14138c6
11 changed files with 32 additions and 55 deletions

View File

@ -56,6 +56,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* 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.
*

View File

@ -1,7 +1,7 @@
/************************************************************************************
* 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>
*
* Redistribution and use in source and binary forms, with or without
@ -79,37 +79,42 @@ void lpc17_boardinitialize(void)
#ifdef CONFIG_LPC17_EMC
lpc17_emcinitialize();
#ifdef CONFIG_LPC17_EXTDRAM
open1788_sdram_initialize();
#endif
#ifdef CONFIG_LPC17_EXTNOR
open1788_nor_initialize();
#endif
#ifdef CONFIG_LPC17_EXTNAND
open1788_nand_initialize();
#endif
#endif
/* 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)
/* 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)
{
open1788_sspdev_initialize();
}
#endif
#ifdef CONFIG_ARCH_LEDS
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
board_autoled_initialize();
#endif
#ifdef CONFIG_LPC17_LCD
/* Configure the LCD GPIOs if LCD support has been selected. */
#ifdef CONFIG_LPC17_LCD
open1788_lcd_initialize();
#endif
}

View File

@ -183,7 +183,8 @@ static int nsh_waiter(int argc, char *argv[])
/* Wait for the device to change state */
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? */
@ -348,6 +349,7 @@ static int nsh_usbhostinitialize(void)
(main_t)nsh_waiter, (FAR char * const *)NULL);
return pid < 0 ? -ENOEXEC : OK;
}
return -ENODEV;
}
#else

View File

@ -54,13 +54,10 @@
#ifdef CONFIG_ARCH_BUTTONS
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Data
****************************************************************************/
/* The Open1788 supports several buttons. All will read "1" when open and "0"
* when closed
*
@ -102,10 +99,6 @@ static uint8_t g_buttonirq[BOARD_NUM_BUTTONS] =
};
#endif
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
@ -137,9 +130,9 @@ void board_button_initialize(void)
* Name: board_buttons
*
* Description:
* board_button_initialize() must be called to initialize button resources. After
* that, board_buttons() may be called to collect the current state of all
* buttons.
* board_button_initialize() must be called to initialize button resources.
* After that, board_buttons() may be called to collect the current state
* of all buttons.
*
* 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
@ -177,14 +170,15 @@ uint32_t board_buttons(void)
* Button support.
*
* Description:
* board_button_initialize() must be called to initialize button resources. After
* that, board_button_irq() may be called to register button interrupt handlers.
* board_button_initialize() must be called to initialize button resources.
* 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
* be called when a button is depressed or released. The ID value is a
* button enumeration value that uniquely identifies a button resource. See the
* BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for the meaning
* of enumeration values.
* board_button_irq() may be called to register an interrupt handler that
* will be called when a button is depressed or released. The ID value is
* a button enumeration value that uniquely identifies a button resource.
* See the BOARD_BUTTON_* and BOARD_JOYSTICK_* definitions in board.h for
* the meaning of enumeration values.
*
* Note that board_button_irq() also enables button interrupts. Button
* interrupts will remain enabled after the interrupt handler is attached.

View File

@ -50,14 +50,6 @@
#ifdef CONFIG_LPC17_LCD
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/

View File

@ -51,14 +51,6 @@
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_LPC17_EXTNAND)
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/

View File

@ -51,14 +51,6 @@
#if defined(CONFIG_LPC17_EMC) && defined(CONFIG_LPC17_EXTNOR)
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/

View File

@ -57,6 +57,7 @@
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/* 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.
*
@ -96,10 +97,6 @@
#define SDRAM_BASE 0xa0000000 /* CS0 */
/************************************************************************************
* Private Functions
************************************************************************************/
/************************************************************************************
* Public Functions
************************************************************************************/

View File

@ -61,6 +61,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
#ifndef CONFIG_INPUT

View File

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

View File

@ -161,7 +161,7 @@
* Public Functions
************************************************************************************/
/****************************************************************************
/************************************************************************************
* Name: lpc17_bringup
*
* Description:
@ -173,7 +173,7 @@
* CONFIG_BOARD_INITIALIZE=n && CONFIG_LIB_BOARDCTL=y :
* Called from the NSH library via boardctl()
*
****************************************************************************/
************************************************************************************/
int lpc17_bringup(void);