Add an argument to board_app_initialize()

This commit is contained in:
Gregory Nutt
2016-05-24 10:51:22 -06:00
parent 15cc1b973d
commit 4b3e710af6
118 changed files with 1824 additions and 333 deletions
+20 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/arduino-due/src/sam_appinit.c * config/arduino-due/src/sam_appinit.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013, 2016 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
@@ -76,11 +76,28 @@
* Name: board_app_initialize * Name: board_app_initialize
* *
* Description: * Description:
* Perform architecture specific initialization * Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
* *
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#if defined(CONFIG_ARDUINO_ITHEAD_TFT) && defined(CONFIG_SPI_BITBANG) && \ #if defined(CONFIG_ARDUINO_ITHEAD_TFT) && defined(CONFIG_SPI_BITBANG) && \
defined(CONFIG_MMCSD_SPI) defined(CONFIG_MMCSD_SPI)
+12 -2
View File
@@ -250,14 +250,24 @@ int boardctl(unsigned int cmd, uintptr_t arg)
{ {
/* CMD: BOARDIOC_INIT /* CMD: BOARDIOC_INIT
* DESCRIPTION: Perform one-time application initialization. * DESCRIPTION: Perform one-time application initialization.
* ARG: None * ARG: The boardctl() argument is passed to the
* board_app_initialize() implementation without modification.
* The argument has no meaning to NuttX; the meaning of the
* argument is a contract between the board-specific
* initalization logic and the the matching application logic.
* The value cold be such things as a mode enumeration value,
* a set of DIP switch switch settings, a pointer to
* configuration data read from a file or serial FLASH, or
* whatever you would like to do with it. Every
* implementation should accept zero/NULL as a default
* configuration.
* CONFIGURATION: CONFIG_LIB_BOARDCTL * CONFIGURATION: CONFIG_LIB_BOARDCTL
* DEPENDENCIES: Board logic must provide board_app_initialization * DEPENDENCIES: Board logic must provide board_app_initialization
*/ */
case BOARDIOC_INIT: case BOARDIOC_INIT:
{ {
ret = board_app_initialize(); ret = board_app_initialize(arg);
} }
break; break;
+17 -1
View File
@@ -67,6 +67,7 @@
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Name: board_app_initialize * Name: board_app_initialize
* *
@@ -80,9 +81,24 @@
* CONFIG_LIB_BOARDCTL=n : * CONFIG_LIB_BOARDCTL=n :
* Called from board_initialize(). * Called from board_initialize().
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return OK; return OK;
} }
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/cloudctrl/src/stm32_appinit.c * config/cloudctrl/src/stm32_appinit.c
* *
* Copyright (C) 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* Darcy Gong <darcy.gong@gmail.com> * Darcy Gong <darcy.gong@gmail.com>
* *
@@ -108,9 +108,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#if defined(HAVE_USBHOST) || defined(HAVE_W25) #if defined(HAVE_USBHOST) || defined(HAVE_W25)
int ret; int ret;
+24 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* configs/compal_e86/boot.c * configs/compal_e86/boot.c
* *
* Copyright (C) 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2015-2016 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
@@ -44,10 +44,31 @@
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
/* Application initialization stub for boardctl() */ /****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform architecture specific initialization
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
#ifdef CONFIG_LIB_BOARDCTL #ifdef CONFIG_LIB_BOARDCTL
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return 0; return 0;
} }
+23 -2
View File
@@ -44,10 +44,31 @@
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
/* Application initialization stub for boardctl() */ /****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform architecture specific initialization
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
#ifdef CONFIG_LIB_BOARDCTL #ifdef CONFIG_LIB_BOARDCTL
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return 0; return 0;
} }
+24 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* configs/compal_e99/boot.c * configs/compal_e99/boot.c
* *
* Copyright (C) 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2015-2016 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
@@ -44,10 +44,31 @@
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
/* Application initialization stub for boardctl() */ /****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform architecture specific initialization
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
#ifdef CONFIG_LIB_BOARDCTL #ifdef CONFIG_LIB_BOARDCTL
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return 0; return 0;
} }
+16 -1
View File
@@ -61,9 +61,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
/* Configure SPI-based devices */ /* Configure SPI-based devices */
+16 -1
View File
@@ -53,9 +53,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
/* If CONFIG_BOARD_INITIALIZE is selected then board initialization was /* If CONFIG_BOARD_INITIALIZE is selected then board initialization was
* already performed in board_initialize. * already performed in board_initialize.
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/ea3131/src/lpc31_appinit.c * config/ea3131/src/lpc31_appinit.c
* *
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2009, 2012, 2016 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
@@ -107,9 +107,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef NSH_HAVEMMCSD #ifdef NSH_HAVEMMCSD
FAR struct sdio_dev_s *sdio; FAR struct sdio_dev_s *sdio;
+16 -1
View File
@@ -107,9 +107,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef NSH_HAVEMMCSD #ifdef NSH_HAVEMMCSD
FAR struct sdio_dev_s *sdio; FAR struct sdio_dev_s *sdio;
+16 -1
View File
@@ -103,9 +103,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
FAR struct spi_dev_s *spi; FAR struct spi_dev_s *spi;
int ret; int ret;
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/ekk-lm3s9b96/src/lm_appinit.c * config/ekk-lm3s9b96/src/lm_appinit.c
* *
* Copyright (C) 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
* Authors: Gregory Nutt <gnutt@nuttx.org> * Authors: Gregory Nutt <gnutt@nuttx.org>
* Jose Pablo Rojas V. <jrojas@nx-engineering.com> * Jose Pablo Rojas V. <jrojas@nx-engineering.com>
* *
@@ -60,9 +60,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return OK; return OK;
} }
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/fire-stm32v2/src/stm32_appinit.c * config/fire-stm32v2/src/stm32_appinit.c
* *
* Copyright (C) 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2012, 2016 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
@@ -196,9 +196,24 @@ static void stm32_i2ctool(void)
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#if defined(HAVE_MMCSD) || defined(HAVE_W25) #if defined(HAVE_MMCSD) || defined(HAVE_W25)
int ret; int ret;
+18 -5
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/stm32f4discovery/src/kl_appinit.c * config/stm32f4discovery/src/kl_appinit.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013, 2016 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
@@ -59,13 +59,26 @@
* Name: board_app_initialize * Name: board_app_initialize
* *
* Description: * Description:
* Perform application specific initialization. This function is never * Perform architecture specific initialization
* called directly from application code, but only indirectly via the *
* (non-standard) boardctl() interface using the command BOARDIOC_INIT. * Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
* *
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#if defined(CONFIG_SENSORS_ADXL345) #if defined(CONFIG_SENSORS_ADXL345)
int ret; int ret;
@@ -124,7 +124,7 @@ void board_initialize(void)
*/ */
#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)
(void)board_app_initialize(); (void)board_app_initialize(0);
#endif #endif
/* CC3000 wireless initialization */ /* CC3000 wireless initialization */
+18 -5
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/stm32f4discovery/src/kl_appinit.c * config/stm32f4discovery/src/kl_appinit.c
* *
* Copyright (C) 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2015-2016 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
@@ -57,13 +57,26 @@
* Name: board_app_initialize * Name: board_app_initialize
* *
* Description: * Description:
* Perform application specific initialization. This function is never * Perform architecture specific initialization
* called directly from application code, but only indirectly via the *
* (non-standard) boardctl() interface using the command BOARDIOC_INIT. * Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
* *
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return OK; return OK;
} }
@@ -124,7 +124,7 @@ void board_initialize(void)
*/ */
#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)
(void)board_app_initialize(); (void)board_app_initialize(0);
#endif #endif
} }
#endif #endif
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/hymini-stm32v/src/stm32_appinit.c * config/hymini-stm32v/src/stm32_appinit.c
* *
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Copyright (C) 2009, 2011, 2016 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
@@ -151,9 +151,24 @@ static int nsh_cdinterrupt(int irq, FAR void *context)
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef NSH_HAVEMMCSD #ifdef NSH_HAVEMMCSD
int ret; int ret;
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/kwikstik-k40/src/k40_appinit.c * config/kwikstik-k40/src/k40_appinit.c
* *
* Copyright (C) 2011 Gregory Nutt. All rights reserved. * Copyright (C) 2011, 2016 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
@@ -185,9 +185,24 @@ static int kinetis_cdinterrupt(int irq, FAR void *context)
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef NSH_HAVEMMCSD #ifdef NSH_HAVEMMCSD
int ret; int ret;
+18 -5
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* configs/launchxl_tms57004/src/sim_appinit.c * configs/launchxl_tms57004/src/sim_appinit.c
* *
* Copyright (C) 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2015-2016 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
@@ -50,14 +50,27 @@
* Name: board_app_initialize * Name: board_app_initialize
* *
* Description: * Description:
* Perform application specific initialization. This function is never * Perform architecture specific initialization
* called directly from application code, but only indirectly via the *
* (non-standard) boardctl() interface using the command BOARDIOC_INIT. * Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
* *
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_LIB_BOARDCTL #ifdef CONFIG_LIB_BOARDCTL
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifndef CONFIG_BOARD_INITIALIZE #ifndef CONFIG_BOARD_INITIALIZE
/* Perform application level board initialization (if that was not already /* Perform application level board initialization (if that was not already
+17 -6
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/lincoln60/src/lpc17_appinit.c * config/lincoln60/src/lpc17_appinit.c
* *
* Copyright (C) 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2012, 2016 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
@@ -47,10 +47,6 @@
#include <nuttx/spi/spi.h> #include <nuttx/spi/spi.h>
#include <nuttx/mmcsd.h> #include <nuttx/mmcsd.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@@ -61,9 +57,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return OK; return OK;
} }
+17 -6
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/lm3s6432-s2e/src/lm_appinit.c * config/lm3s6432-s2e/src/lm_appinit.c
* *
* Copyright (C) 2010 Gregory Nutt. All rights reserved. * Copyright (C) 2010, 2016 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
@@ -47,10 +47,6 @@
#include <nuttx/spi/spi.h> #include <nuttx/spi/spi.h>
#include <nuttx/mmcsd.h> #include <nuttx/mmcsd.h>
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@@ -61,9 +57,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return OK; return OK;
} }
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/lm3s6965-ek/src/lm_appinit.c * config/lm3s6965-ek/src/lm_appinit.c
* *
* Copyright (C) 2010 Gregory Nutt. All rights reserved. * Copyright (C) 2010, 2016 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
@@ -107,9 +107,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef NSH_HAVEMMCSD #ifdef NSH_HAVEMMCSD
FAR struct spi_dev_s *spi; FAR struct spi_dev_s *spi;
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/lm3s8962-ek/src/lm_appinit.c * config/lm3s8962-ek/src/lm_appinit.c
* *
* Copyright (C) 2010, 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2010, 2015-2016 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
@@ -109,9 +109,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef NSH_HAVEMMCSD #ifdef NSH_HAVEMMCSD
FAR struct spi_dev_s *spi; FAR struct spi_dev_s *spi;
+17 -2
View File
@@ -2,7 +2,7 @@
* config/lm4f120-launchpad/src/lm4f_appinit.c * config/lm4f120-launchpad/src/lm4f_appinit.c
* arch/arm/src/board/lm4f_appinit.c * arch/arm/src/board/lm4f_appinit.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013, 2016 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,9 +79,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return OK; return OK;
} }
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/lpc4330-xplorer/src/lpc43_appinit.c * config/lpc4330-xplorer/src/lpc43_appinit.c
* *
* Copyright (C) 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2012, 2016 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
@@ -139,9 +139,24 @@ static int nsh_spifi_initialize(void)
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
/* Initialize the SPIFI block device */ /* Initialize the SPIFI block device */
+16 -1
View File
@@ -116,9 +116,24 @@ static void lpc43_i2ctool(void)
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
/* Register I2C drivers on behalf of the I2C tool */ /* Register I2C drivers on behalf of the I2C tool */
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/lpc4357-evb/src/lpc43_appinit.c * config/lpc4357-evb/src/lpc43_appinit.c
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2014, 2016 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
@@ -139,9 +139,24 @@ static int nsh_spifi_initialize(void)
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
/* Initialize the SPIFI block device */ /* Initialize the SPIFI block device */
+16 -1
View File
@@ -116,9 +116,24 @@ static void lpc43_i2ctool(void)
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
/* Register I2C drivers on behalf of the I2C tool */ /* Register I2C drivers on behalf of the I2C tool */
+17 -10
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/lpcxpresso-lpc1115/src/lpc11_appinit.c * config/lpcxpresso-lpc1115/src/lpc11_appinit.c
* *
* Copyright (C) 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2015-2016 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
@@ -99,14 +99,6 @@
# define CONFIG_NSH_MMCSDMINOR 0 # define CONFIG_NSH_MMCSDMINOR 0
#endif #endif
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@@ -117,9 +109,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef NSH_HAVEMMCSD #ifdef NSH_HAVEMMCSD
FAR struct spi_dev_s *ssp; FAR struct spi_dev_s *ssp;
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/lpcxpresso-lpc1768/src/lpc17_appinit.c * config/lpcxpresso-lpc1768/src/lpc17_appinit.c
* *
* Copyright (C) 2011 Gregory Nutt. All rights reserved. * Copyright (C) 2011, 2016 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
@@ -120,9 +120,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef NSH_HAVEMMCSD #ifdef NSH_HAVEMMCSD
FAR struct spi_dev_s *ssp; FAR struct spi_dev_s *ssp;
+16 -1
View File
@@ -55,9 +55,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return OK; return OK;
} }
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/mbed/src/lpc17_appinit.c * config/mbed/src/lpc17_appinit.c
* *
* Copyright (C) 2010 Gregory Nutt. All rights reserved. * Copyright (C) 2010, 2016 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
@@ -78,9 +78,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return OK; return OK;
} }
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/mcu123-lpc214x/src/lpc2148_appinit.c * config/mcu123-lpc214x/src/lpc2148_appinit.c
* *
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Copyright (C) 2008-2009, 2016 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
@@ -108,9 +108,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef HAVE_MMCSD #ifdef HAVE_MMCSD
FAR struct spi_dev_s *spi; FAR struct spi_dev_s *spi;
+17 -6
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/mikroe_stm32f4/src/stm32_appinit.c * config/mikroe_stm32f4/src/stm32_appinit.c
* *
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Copyright (C) 2012-2013, 2016 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
@@ -147,10 +147,6 @@
# endif # endif
#endif #endif
/****************************************************************************
* Private Data
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@@ -161,9 +157,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef CONFIG_STM32_SPI3 #ifdef CONFIG_STM32_SPI3
FAR struct spi_dev_s *spi; FAR struct spi_dev_s *spi;
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/mirtoo/src/pic32_appinit.c * config/mirtoo/src/pic32_appinit.c
* *
* Copyright (C) 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2012, 2016 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
@@ -96,9 +96,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef HAVE_SST25 #ifdef HAVE_SST25
FAR struct spi_dev_s *spi; FAR struct spi_dev_s *spi;
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/moxart/src/moxart_appinit.c * config/moxart/src/moxart_appinit.c
* *
* Copyright (C) 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
* Author: Anton D. Kachalov <mouse@mayc.ru> * Author: Anton D. Kachalov <mouse@mayc.ru>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -70,9 +70,24 @@
* CONFIG_LIB_BOARDCTL=n : * CONFIG_LIB_BOARDCTL=n :
* Called from board_initialize(). * Called from board_initialize().
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifndef CONFIG_BOARD_INITIALIZE #ifndef CONFIG_BOARD_INITIALIZE
#ifdef CONFIG_NET_FTMAC100 #ifdef CONFIG_NET_FTMAC100
+17 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/ne64badge/src/m9s12_appinit.c * config/ne64badge/src/m9s12_appinit.c
* *
* Copyright (C) 2011 Gregory Nutt. All rights reserved. * Copyright (C) 2011, 2016 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
@@ -61,9 +61,24 @@
* Description: * Description:
* Perform architecture specific initialization * Perform architecture specific initialization
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
/* Configure SPI-based devices */ /* Configure SPI-based devices */
+16 -1
View File
@@ -56,9 +56,24 @@
* called directly from application code, but only indirectly via the * called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT. * (non-standard) boardctl() interface using the command BOARDIOC_INIT.
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) #if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER)
int ret; int ret;
+1 -1
View File
@@ -105,7 +105,7 @@ void board_initialize(void)
* but the initialization function must run in kernel space. * but the initialization function must run in kernel space.
*/ */
(void)board_app_initialize(); (void)board_app_initialize(0);
#endif #endif
} }
#endif #endif
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* configs/nucleo-f303re/src/stm32_appinitialize.c * configs/nucleo-f303re/src/stm32_appinitialize.c
* *
* Copyright (C) 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved. * Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved.
* Authors: Gregory Nutt <gnutt@nuttx.org> * Authors: Gregory Nutt <gnutt@nuttx.org>
* Paul Alexander Patience <paul-a.patience@polymtl.ca> * Paul Alexander Patience <paul-a.patience@polymtl.ca>
@@ -61,9 +61,24 @@
* called directly from application code, but only indirectly via the * called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT. * (non-standard) boardctl() interface using the command BOARDIOC_INIT.
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return OK; return OK;
} }
+20 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* configs/nucleo-f4x1re/src/stm32_appinit.c * configs/nucleo-f4x1re/src/stm32_appinit.c
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2014, 2016 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
@@ -89,11 +89,28 @@ void up_netinitialize(void)
* Name: board_app_initialize * Name: board_app_initialize
* *
* Description: * Description:
* Perform architecture specific initialization * Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
* *
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#if defined(HAVE_MMCSD) || defined(CONFIG_AJOYSTICK) #if defined(HAVE_MMCSD) || defined(CONFIG_AJOYSTICK)
int ret; int ret;
+1 -1
View File
@@ -121,7 +121,7 @@ void board_initialize(void)
*/ */
#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL)
board_app_initialize(); board_app_initialize(0);
#endif #endif
/* CC3000 wireless initialization */ /* CC3000 wireless initialization */
+20 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* configs/nucleo-l476rg/src/stm32_appinit.c * configs/nucleo-l476rg/src/stm32_appinit.c
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2014, 2016 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
@@ -82,11 +82,28 @@ void up_netinitialize(void)
* Name: board_app_initialize * Name: board_app_initialize
* *
* Description: * Description:
* Perform architecture specific initialization * Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
* *
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#ifdef HAVE_RTC_DRIVER #ifdef HAVE_RTC_DRIVER
FAR struct rtc_lowerhalf_s *rtclower; FAR struct rtc_lowerhalf_s *rtclower;
+1 -1
View File
@@ -121,7 +121,7 @@ void board_initialize(void)
*/ */
#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT)
board_app_initialize(); board_app_initialize(0);
#endif #endif
/* CC3000 wireless initialization */ /* CC3000 wireless initialization */
+20 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* configs/olimex-lpc-h3131/src/lpc31_appinit.c * configs/olimex-lpc-h3131/src/lpc31_appinit.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013, 2016 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,11 +79,28 @@
* Name: board_app_initialize * Name: board_app_initialize
* *
* Description: * Description:
* Perform architecture specific initialization * Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
* *
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#if defined(HAVE_MMCSD) || defined(HAVE_USBHOST) #if defined(HAVE_MMCSD) || defined(HAVE_USBHOST)
int ret; int ret;
+20 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/olimex-lpc1766stk/src/lpc17_appinit.c * config/olimex-lpc1766stk/src/lpc17_appinit.c
* *
* Copyright (C) 2010, 2013-2015 Gregory Nutt. All rights reserved. * Copyright (C) 2010, 2013-2016 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
@@ -320,11 +320,28 @@ static int nsh_usbhostinitialize(void)
* Name: board_app_initialize * Name: board_app_initialize
* *
* Description: * Description:
* Perform architecture specific initialization * Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
* *
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
int ret; int ret;
+20 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/olimex-lpc2378/src/lpc2378_appinit.c * config/olimex-lpc2378/src/lpc2378_appinit.c
* *
* Copyright (C) 2010 Rommel Marcelo. All rights reserved. * Copyright (C) 2010, 2016 Rommel Marcelo. All rights reserved.
* Author: Rommel Marcelo * Author: Rommel Marcelo
* *
* This is part of the NuttX RTOS and based on the LPC2148 port: * This is part of the NuttX RTOS and based on the LPC2148 port:
@@ -88,11 +88,28 @@
* Name: board_app_initialize * Name: board_app_initialize
* *
* Description: * Description:
* Perform architecture specific initialization * Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
* *
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
return OK; return OK;
} }
+20 -3
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/olimex-stm32-h405/src/stm32_appinit.c * config/olimex-stm32-h405/src/stm32_appinit.c
* *
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2014, 2016 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
@@ -73,7 +73,9 @@
* Name: board_app_initialize * Name: board_app_initialize
* *
* Description: * Description:
* Perform architecture specific initialization * Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
* *
* CONFIG_LIB_BOARDCTL=y : * CONFIG_LIB_BOARDCTL=y :
* Called from the NSH library * Called from the NSH library
@@ -82,9 +84,24 @@
* CONFIG_LIB_BOARDCTL=n : * CONFIG_LIB_BOARDCTL=n :
* Called from board_initialize(). * Called from board_initialize().
* *
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initalization logic and the the
* matching application logic. The value cold be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/ ****************************************************************************/
int board_app_initialize(void) int board_app_initialize(uintptr_t arg)
{ {
#if defined(CONFIG_CAN) || defined(CONFIG_ADC) #if defined(CONFIG_CAN) || defined(CONFIG_ADC)
int ret; int ret;

Some files were not shown because too many files have changed in this diff Show More