diff --git a/configs/arduino-due/src/sam_appinit.c b/configs/arduino-due/src/sam_appinit.c index ef52d100cc..32132ee330 100644 --- a/configs/arduino-due/src/sam_appinit.c +++ b/configs/arduino-due/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -76,11 +76,28 @@ * Name: board_app_initialize * * 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) && \ defined(CONFIG_MMCSD_SPI) diff --git a/configs/boardctl.c b/configs/boardctl.c index 82c5289065..749056d82a 100644 --- a/configs/boardctl.c +++ b/configs/boardctl.c @@ -250,14 +250,24 @@ int boardctl(unsigned int cmd, uintptr_t arg) { /* CMD: BOARDIOC_INIT * 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 * DEPENDENCIES: Board logic must provide board_app_initialization */ case BOARDIOC_INIT: { - ret = board_app_initialize(); + ret = board_app_initialize(arg); } break; diff --git a/configs/cc3200-launchpad/src/cc3200_boot.c b/configs/cc3200-launchpad/src/cc3200_boot.c index 9d466b2d75..cf644905e0 100644 --- a/configs/cc3200-launchpad/src/cc3200_boot.c +++ b/configs/cc3200-launchpad/src/cc3200_boot.c @@ -67,6 +67,7 @@ /**************************************************************************** * Public Functions ****************************************************************************/ + /**************************************************************************** * Name: board_app_initialize * @@ -80,9 +81,24 @@ * CONFIG_LIB_BOARDCTL=n : * 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; } diff --git a/configs/cloudctrl/src/stm32_appinit.c b/configs/cloudctrl/src/stm32_appinit.c index 6bd5e5a203..cc772b5add 100644 --- a/configs/cloudctrl/src/stm32_appinit.c +++ b/configs/cloudctrl/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * Darcy Gong * @@ -108,9 +108,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(HAVE_USBHOST) || defined(HAVE_W25) int ret; diff --git a/configs/compal_e86/src/boot.c b/configs/compal_e86/src/boot.c index 32364c631e..8c214a004c 100644 --- a/configs/compal_e86/src/boot.c +++ b/configs/compal_e86/src/boot.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -44,10 +44,31 @@ * 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 -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return 0; } diff --git a/configs/compal_e88/src/boot.c b/configs/compal_e88/src/boot.c index 540bc39ca1..a3c6829227 100644 --- a/configs/compal_e88/src/boot.c +++ b/configs/compal_e88/src/boot.c @@ -44,10 +44,31 @@ * 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 -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return 0; } diff --git a/configs/compal_e99/src/boot.c b/configs/compal_e99/src/boot.c index 74f17a2ebd..8bc7061daf 100644 --- a/configs/compal_e99/src/boot.c +++ b/configs/compal_e99/src/boot.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -44,10 +44,31 @@ * 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 -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return 0; } diff --git a/configs/demo9s12ne64/src/m9s12_appinit.c b/configs/demo9s12ne64/src/m9s12_appinit.c index ec3d9ba21c..0010a71e68 100644 --- a/configs/demo9s12ne64/src/m9s12_appinit.c +++ b/configs/demo9s12ne64/src/m9s12_appinit.c @@ -61,9 +61,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Configure SPI-based devices */ diff --git a/configs/dk-tm4c129x/src/tm4c_appinit.c b/configs/dk-tm4c129x/src/tm4c_appinit.c index bd6c1b4b6b..20d889d47e 100644 --- a/configs/dk-tm4c129x/src/tm4c_appinit.c +++ b/configs/dk-tm4c129x/src/tm4c_appinit.c @@ -53,9 +53,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* If CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/configs/ea3131/src/lpc31_appinit.c b/configs/ea3131/src/lpc31_appinit.c index 58e58709ca..43ef50be72 100644 --- a/configs/ea3131/src/lpc31_appinit.c +++ b/configs/ea3131/src/lpc31_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -107,9 +107,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; diff --git a/configs/ea3152/src/lpc31_appinit.c b/configs/ea3152/src/lpc31_appinit.c index e77cdb63ef..e05327622c 100644 --- a/configs/ea3152/src/lpc31_appinit.c +++ b/configs/ea3152/src/lpc31_appinit.c @@ -107,9 +107,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; diff --git a/configs/eagle100/src/lm_appinit.c b/configs/eagle100/src/lm_appinit.c index 6594f5abb1..72b7206fad 100644 --- a/configs/eagle100/src/lm_appinit.c +++ b/configs/eagle100/src/lm_appinit.c @@ -103,9 +103,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { FAR struct spi_dev_s *spi; int ret; diff --git a/configs/ekk-lm3s9b96/src/lm_appinit.c b/configs/ekk-lm3s9b96/src/lm_appinit.c index 313bdc9783..21be2c1952 100644 --- a/configs/ekk-lm3s9b96/src/lm_appinit.c +++ b/configs/ekk-lm3s9b96/src/lm_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * Jose Pablo Rojas V. * @@ -60,9 +60,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/fire-stm32v2/src/stm32_appinit.c b/configs/fire-stm32v2/src/stm32_appinit.c index 8c45062a8f..e8711ef204 100644 --- a/configs/fire-stm32v2/src/stm32_appinit.c +++ b/configs/fire-stm32v2/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -196,9 +196,24 @@ static void stm32_i2ctool(void) * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(HAVE_MMCSD) || defined(HAVE_W25) int ret; diff --git a/configs/freedom-kl25z/src/kl_appinit.c b/configs/freedom-kl25z/src/kl_appinit.c index a58a43c0bd..a00e675cdd 100644 --- a/configs/freedom-kl25z/src/kl_appinit.c +++ b/configs/freedom-kl25z/src/kl_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -59,13 +59,26 @@ * Name: board_app_initialize * * Description: - * 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. + * 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(CONFIG_SENSORS_ADXL345) int ret; diff --git a/configs/freedom-kl25z/src/kl_boardinitialize.c b/configs/freedom-kl25z/src/kl_boardinitialize.c index 2ab54047be..4da407d238 100644 --- a/configs/freedom-kl25z/src/kl_boardinitialize.c +++ b/configs/freedom-kl25z/src/kl_boardinitialize.c @@ -124,7 +124,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif /* CC3000 wireless initialization */ diff --git a/configs/freedom-kl26z/src/kl_appinit.c b/configs/freedom-kl26z/src/kl_appinit.c index c4e5ad7d42..96ac70a061 100644 --- a/configs/freedom-kl26z/src/kl_appinit.c +++ b/configs/freedom-kl26z/src/kl_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -57,13 +57,26 @@ * Name: board_app_initialize * * Description: - * 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. + * 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; } diff --git a/configs/freedom-kl26z/src/kl_boardinitialize.c b/configs/freedom-kl26z/src/kl_boardinitialize.c index 004274c6f6..3a3be5190a 100644 --- a/configs/freedom-kl26z/src/kl_boardinitialize.c +++ b/configs/freedom-kl26z/src/kl_boardinitialize.c @@ -124,7 +124,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/hymini-stm32v/src/stm32_appinit.c b/configs/hymini-stm32v/src/stm32_appinit.c index df8adca907..4a7b220633 100644 --- a/configs/hymini-stm32v/src/stm32_appinit.c +++ b/configs/hymini-stm32v/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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: * 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 int ret; diff --git a/configs/kwikstik-k40/src/k40_appinit.c b/configs/kwikstik-k40/src/k40_appinit.c index 1fb77c3634..43694bce93 100644 --- a/configs/kwikstik-k40/src/k40_appinit.c +++ b/configs/kwikstik-k40/src/k40_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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: * 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 int ret; diff --git a/configs/launchxl-tms57004/src/tms570_appinit.c b/configs/launchxl-tms57004/src/tms570_appinit.c index 448ea16577..6a187b033f 100644 --- a/configs/launchxl-tms57004/src/tms570_appinit.c +++ b/configs/launchxl-tms57004/src/tms570_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -50,14 +50,27 @@ * Name: board_app_initialize * * Description: - * 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. + * 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 -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform application level board initialization (if that was not already diff --git a/configs/lincoln60/src/lpc17_appinit.c b/configs/lincoln60/src/lpc17_appinit.c index a10646e751..2e1426635c 100644 --- a/configs/lincoln60/src/lpc17_appinit.c +++ b/configs/lincoln60/src/lpc17_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -47,10 +47,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -61,9 +57,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/lm3s6432-s2e/src/lm_appinit.c b/configs/lm3s6432-s2e/src/lm_appinit.c index ff74785425..d787ea3258 100644 --- a/configs/lm3s6432-s2e/src/lm_appinit.c +++ b/configs/lm3s6432-s2e/src/lm_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -47,10 +47,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -61,9 +57,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/lm3s6965-ek/src/lm_appinit.c b/configs/lm3s6965-ek/src/lm_appinit.c index 6f2480b80d..c9eaf61d81 100644 --- a/configs/lm3s6965-ek/src/lm_appinit.c +++ b/configs/lm3s6965-ek/src/lm_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -107,9 +107,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *spi; diff --git a/configs/lm3s8962-ek/src/lm_appinit.c b/configs/lm3s8962-ek/src/lm_appinit.c index 7a027dda55..ba601eacb6 100644 --- a/configs/lm3s8962-ek/src/lm_appinit.c +++ b/configs/lm3s8962-ek/src/lm_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -109,9 +109,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *spi; diff --git a/configs/lm4f120-launchpad/src/lm4f_appinit.c b/configs/lm4f120-launchpad/src/lm4f_appinit.c index b557f771f5..f667597398 100644 --- a/configs/lm4f120-launchpad/src/lm4f_appinit.c +++ b/configs/lm4f120-launchpad/src/lm4f_appinit.c @@ -2,7 +2,7 @@ * config/lm4f120-launchpad/src/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 * * Redistribution and use in source and binary forms, with or without @@ -79,9 +79,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/lpc4330-xplorer/src/lpc43_appinit.c b/configs/lpc4330-xplorer/src/lpc43_appinit.c index 6377c62de5..48225e0dde 100644 --- a/configs/lpc4330-xplorer/src/lpc43_appinit.c +++ b/configs/lpc4330-xplorer/src/lpc43_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -139,9 +139,24 @@ static int nsh_spifi_initialize(void) * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Initialize the SPIFI block device */ diff --git a/configs/lpc4337-ws/src/lpc43_appinit.c b/configs/lpc4337-ws/src/lpc43_appinit.c index 83b8cddc1e..976b78a418 100644 --- a/configs/lpc4337-ws/src/lpc43_appinit.c +++ b/configs/lpc4337-ws/src/lpc43_appinit.c @@ -116,9 +116,24 @@ static void lpc43_i2ctool(void) * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Register I2C drivers on behalf of the I2C tool */ diff --git a/configs/lpc4357-evb/src/lpc43_appinit.c b/configs/lpc4357-evb/src/lpc43_appinit.c index 2555797f22..43efc040ce 100644 --- a/configs/lpc4357-evb/src/lpc43_appinit.c +++ b/configs/lpc4357-evb/src/lpc43_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -139,9 +139,24 @@ static int nsh_spifi_initialize(void) * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Initialize the SPIFI block device */ diff --git a/configs/lpc4370-link2/src/lpc43_appinit.c b/configs/lpc4370-link2/src/lpc43_appinit.c index 74fce0eb1f..660fb2e5f7 100644 --- a/configs/lpc4370-link2/src/lpc43_appinit.c +++ b/configs/lpc4370-link2/src/lpc43_appinit.c @@ -116,9 +116,24 @@ static void lpc43_i2ctool(void) * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Register I2C drivers on behalf of the I2C tool */ diff --git a/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c b/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c index bbe61c493d..3ca2de5969 100644 --- a/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c +++ b/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -99,14 +99,6 @@ # define CONFIG_NSH_MMCSDMINOR 0 #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -117,9 +109,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *ssp; diff --git a/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c b/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c index a9b760b87c..0aefdd37d4 100644 --- a/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c +++ b/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -120,9 +120,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *ssp; diff --git a/configs/maple/src/stm32_appinit.c b/configs/maple/src/stm32_appinit.c index 3787833900..d1a7c50d22 100644 --- a/configs/maple/src/stm32_appinit.c +++ b/configs/maple/src/stm32_appinit.c @@ -55,9 +55,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/mbed/src/lpc17_appinit.c b/configs/mbed/src/lpc17_appinit.c index 505ae45545..f70e811f3b 100644 --- a/configs/mbed/src/lpc17_appinit.c +++ b/configs/mbed/src/lpc17_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -78,9 +78,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/mcu123-lpc214x/src/lpc2148_appinit.c b/configs/mcu123-lpc214x/src/lpc2148_appinit.c index 6437d12bf5..1e840af361 100644 --- a/configs/mcu123-lpc214x/src/lpc2148_appinit.c +++ b/configs/mcu123-lpc214x/src/lpc2148_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -108,9 +108,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef HAVE_MMCSD FAR struct spi_dev_s *spi; diff --git a/configs/mikroe-stm32f4/src/stm32_appinit.c b/configs/mikroe-stm32f4/src/stm32_appinit.c index 4ac23362d3..9970d6927b 100644 --- a/configs/mikroe-stm32f4/src/stm32_appinit.c +++ b/configs/mikroe-stm32f4/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -147,10 +147,6 @@ # endif #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -161,9 +157,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef CONFIG_STM32_SPI3 FAR struct spi_dev_s *spi; diff --git a/configs/mirtoo/src/pic32_appinit.c b/configs/mirtoo/src/pic32_appinit.c index 459e97b844..9fad1495bf 100644 --- a/configs/mirtoo/src/pic32_appinit.c +++ b/configs/mirtoo/src/pic32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -96,9 +96,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef HAVE_SST25 FAR struct spi_dev_s *spi; diff --git a/configs/moxa/src/moxart_appinit.c b/configs/moxa/src/moxart_appinit.c index f33045ccf5..1b7c8114d6 100644 --- a/configs/moxa/src/moxart_appinit.c +++ b/configs/moxa/src/moxart_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -70,9 +70,24 @@ * CONFIG_LIB_BOARDCTL=n : * 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 #ifdef CONFIG_NET_FTMAC100 diff --git a/configs/ne64badge/src/m9s12_appinit.c b/configs/ne64badge/src/m9s12_appinit.c index ba61f1eaf3..1550f5d519 100644 --- a/configs/ne64badge/src/m9s12_appinit.c +++ b/configs/ne64badge/src/m9s12_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -61,9 +61,24 @@ * 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. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Configure SPI-based devices */ diff --git a/configs/nucleo-144/src/stm32_appinitialize.c b/configs/nucleo-144/src/stm32_appinitialize.c index 8dabb2bc4f..e1b318684c 100644 --- a/configs/nucleo-144/src/stm32_appinitialize.c +++ b/configs/nucleo-144/src/stm32_appinitialize.c @@ -56,9 +56,24 @@ * 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_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) int ret; diff --git a/configs/nucleo-144/src/stm32_boot.c b/configs/nucleo-144/src/stm32_boot.c index 3a6b8cb951..210c0982a3 100644 --- a/configs/nucleo-144/src/stm32_boot.c +++ b/configs/nucleo-144/src/stm32_boot.c @@ -105,7 +105,7 @@ void board_initialize(void) * but the initialization function must run in kernel space. */ - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/nucleo-f303re/src/stm32_appinitialize.c b/configs/nucleo-f303re/src/stm32_appinitialize.c index dce4fd5090..d79c7d5041 100644 --- a/configs/nucleo-f303re/src/stm32_appinitialize.c +++ b/configs/nucleo-f303re/src/stm32_appinitialize.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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. * Authors: Gregory Nutt * Paul Alexander Patience @@ -61,9 +61,24 @@ * 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; } diff --git a/configs/nucleo-f4x1re/src/stm32_appinit.c b/configs/nucleo-f4x1re/src/stm32_appinit.c index 7f0d889d47..97cbc4ffc4 100644 --- a/configs/nucleo-f4x1re/src/stm32_appinit.c +++ b/configs/nucleo-f4x1re/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -89,11 +89,28 @@ void up_netinitialize(void) * Name: board_app_initialize * * 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) int ret; diff --git a/configs/nucleo-f4x1re/src/stm32_boot.c b/configs/nucleo-f4x1re/src/stm32_boot.c index 580b2d08c4..2b6f69e65e 100644 --- a/configs/nucleo-f4x1re/src/stm32_boot.c +++ b/configs/nucleo-f4x1re/src/stm32_boot.c @@ -121,7 +121,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - board_app_initialize(); + board_app_initialize(0); #endif /* CC3000 wireless initialization */ diff --git a/configs/nucleo-l476rg/src/stm32_appinit.c b/configs/nucleo-l476rg/src/stm32_appinit.c index 5a8b78513a..1e1bad7d9e 100644 --- a/configs/nucleo-l476rg/src/stm32_appinit.c +++ b/configs/nucleo-l476rg/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -82,11 +82,28 @@ void up_netinitialize(void) * Name: board_app_initialize * * 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 FAR struct rtc_lowerhalf_s *rtclower; diff --git a/configs/nucleo-l476rg/src/stm32_boot.c b/configs/nucleo-l476rg/src/stm32_boot.c index 52d1a28f08..0389d18cf1 100644 --- a/configs/nucleo-l476rg/src/stm32_boot.c +++ b/configs/nucleo-l476rg/src/stm32_boot.c @@ -121,7 +121,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - board_app_initialize(); + board_app_initialize(0); #endif /* CC3000 wireless initialization */ diff --git a/configs/olimex-lpc-h3131/src/lpc31_appinit.c b/configs/olimex-lpc-h3131/src/lpc31_appinit.c index d24c412ffd..551a2d9bb6 100644 --- a/configs/olimex-lpc-h3131/src/lpc31_appinit.c +++ b/configs/olimex-lpc-h3131/src/lpc31_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -79,11 +79,28 @@ * Name: board_app_initialize * * 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) int ret; diff --git a/configs/olimex-lpc1766stk/src/lpc17_appinit.c b/configs/olimex-lpc1766stk/src/lpc17_appinit.c index 89fd701173..a8176afa25 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_appinit.c +++ b/configs/olimex-lpc1766stk/src/lpc17_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -320,11 +320,28 @@ static int nsh_usbhostinitialize(void) * Name: board_app_initialize * * 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; diff --git a/configs/olimex-lpc2378/src/lpc2378_appinit.c b/configs/olimex-lpc2378/src/lpc2378_appinit.c index 6f7e8b194f..ed9ee4910a 100644 --- a/configs/olimex-lpc2378/src/lpc2378_appinit.c +++ b/configs/olimex-lpc2378/src/lpc2378_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * This is part of the NuttX RTOS and based on the LPC2148 port: @@ -88,11 +88,28 @@ * Name: board_app_initialize * * 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; } diff --git a/configs/olimex-stm32-h405/src/stm32_appinit.c b/configs/olimex-stm32-h405/src/stm32_appinit.c index 623d9e3428..776b5ffa5c 100644 --- a/configs/olimex-stm32-h405/src/stm32_appinit.c +++ b/configs/olimex-stm32-h405/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -73,7 +73,9 @@ * Name: board_app_initialize * * 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 : * Called from the NSH library @@ -82,9 +84,24 @@ * CONFIG_LIB_BOARDCTL=n : * 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) int ret; diff --git a/configs/olimex-stm32-h405/src/stm32_boot.c b/configs/olimex-stm32-h405/src/stm32_boot.c index f057314fb4..7332b8a4ef 100644 --- a/configs/olimex-stm32-h405/src/stm32_boot.c +++ b/configs/olimex-stm32-h405/src/stm32_boot.c @@ -118,7 +118,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - board_app_initialize(); + board_app_initialize(0); #endif } #endif diff --git a/configs/olimex-stm32-h407/src/stm32_appinit.c b/configs/olimex-stm32-h407/src/stm32_appinit.c index e67ab3138b..6f0cd2dd64 100644 --- a/configs/olimex-stm32-h407/src/stm32_appinit.c +++ b/configs/olimex-stm32-h407/src/stm32_appinit.c @@ -71,16 +71,33 @@ * Name: board_app_initialize * * 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: * If CONFIG_NSH_ARCHINITIALIZE=y: * Called from the NSH library (or other application) * Otherse, assumed to be called from some other application. * + * 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 stm32_bringup(); } diff --git a/configs/olimex-stm32-p207/src/stm32_appinit.c b/configs/olimex-stm32-p207/src/stm32_appinit.c index 01f6362c34..695cc0607b 100644 --- a/configs/olimex-stm32-p207/src/stm32_appinit.c +++ b/configs/olimex-stm32-p207/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/olimex-stm32-p207/src/stm32_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -102,7 +102,9 @@ * Name: board_app_initialize * * 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 : * Called from the NSH library @@ -111,9 +113,24 @@ * CONFIG_LIB_BOARDCTL=n : * 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(HAVE_USBHOST) || defined(HAVE_USBMONITOR) || defined(CONFIG_ADC) int ret; diff --git a/configs/olimex-stm32-p207/src/stm32_boot.c b/configs/olimex-stm32-p207/src/stm32_boot.c index 7234449534..1d81c62109 100644 --- a/configs/olimex-stm32-p207/src/stm32_boot.c +++ b/configs/olimex-stm32-p207/src/stm32_boot.c @@ -47,14 +47,6 @@ #include "olimex-stm32-p207.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -119,7 +111,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - board_app_initialize(); + board_app_initialize(0); #endif } #endif diff --git a/configs/olimex-strp711/src/str71_appinit.c b/configs/olimex-strp711/src/str71_appinit.c index 44cca74773..e064cd5988 100644 --- a/configs/olimex-strp711/src/str71_appinit.c +++ b/configs/olimex-strp711/src/str71_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/olimex-strp711/src/str71_appinit.c * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2010, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -105,11 +105,28 @@ * Name: board_app_initialize * * 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 NSH_HAVEMMCSD FAR struct spi_dev_s *spi; diff --git a/configs/olimexino-stm32/src/stm32_appinit.c b/configs/olimexino-stm32/src/stm32_appinit.c index c7de1858b3..e9cd7fe0b4 100644 --- a/configs/olimexino-stm32/src/stm32_appinit.c +++ b/configs/olimexino-stm32/src/stm32_appinit.c @@ -68,11 +68,28 @@ * Name: board_app_initialize * * 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 = OK; diff --git a/configs/olimexino-stm32/src/stm32_boot.c b/configs/olimexino-stm32/src/stm32_boot.c index e7f0b807e8..1d8d40bb3f 100644 --- a/configs/olimexino-stm32/src/stm32_boot.c +++ b/configs/olimexino-stm32/src/stm32_boot.c @@ -136,7 +136,7 @@ void board_initialize(void) * space but the initialization function must run in kernel space. */ - board_app_initialize(); + board_app_initialize(0); #endif #if defined(CONFIG_USBDEV) diff --git a/configs/open1788/src/lpc17_appinit.c b/configs/open1788/src/lpc17_appinit.c index 53dd70aeb9..d1ccc94df2 100644 --- a/configs/open1788/src/lpc17_appinit.c +++ b/configs/open1788/src/lpc17_appinit.c @@ -1,8 +1,7 @@ /**************************************************************************** * config/open1788/src/lpc17_appinit.c - * arch/arm/src/board/lpc17_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -362,7 +361,9 @@ static int nsh_usbhostinitialize(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization for NSH. + * 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 : * Called from the NSH library @@ -371,9 +372,24 @@ static int nsh_usbhostinitialize(void) * CONFIG_LIB_BOARDCTL=n: * 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) { int ret; diff --git a/configs/open1788/src/lpc17_boardinitialize.c b/configs/open1788/src/lpc17_boardinitialize.c index 201e6ff210..0a4a3d11a0 100644 --- a/configs/open1788/src/lpc17_boardinitialize.c +++ b/configs/open1788/src/lpc17_boardinitialize.c @@ -136,7 +136,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/pcblogic-pic32mx/src/pic32mx_appinit.c b/configs/pcblogic-pic32mx/src/pic32mx_appinit.c index 97baa0009e..414d4b395b 100644 --- a/configs/pcblogic-pic32mx/src/pic32mx_appinit.c +++ b/configs/pcblogic-pic32mx/src/pic32mx_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/pcblocic-pic32mx/src/pic32mx_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -65,11 +65,28 @@ * Name: board_app_initialize * * 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 = OK; diff --git a/configs/pcduino-a10/src/a1x_boot.c b/configs/pcduino-a10/src/a1x_boot.c index 951e8a8775..265d728731 100644 --- a/configs/pcduino-a10/src/a1x_boot.c +++ b/configs/pcduino-a10/src/a1x_boot.c @@ -96,7 +96,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/configs/pic32mx-starterkit/src/pic32mx_appinit.c b/configs/pic32mx-starterkit/src/pic32mx_appinit.c index 6423630733..64bba54fc7 100644 --- a/configs/pic32mx-starterkit/src/pic32mx_appinit.c +++ b/configs/pic32mx-starterkit/src/pic32mx_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/pic32mx-starterkit/src/pic32mx_appinit.c * - * Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -351,11 +351,28 @@ static int nsh_usbdevinitialize(void) * Name: board_app_initialize * * 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; diff --git a/configs/pic32mx7mmb/src/pic32_appinit.c b/configs/pic32mx7mmb/src/pic32_appinit.c index 0970e27781..8c62c9a766 100644 --- a/configs/pic32mx7mmb/src/pic32_appinit.c +++ b/configs/pic32mx7mmb/src/pic32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/pic32mx7mmb/src/pic32_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -361,11 +361,28 @@ static int nsh_usbdevinitialize(void) * Name: board_app_initialize * * 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; diff --git a/configs/pic32mz-starterkit/src/pic32mz_appinit.c b/configs/pic32mz-starterkit/src/pic32mz_appinit.c index a312b0e327..0b3a3dc823 100644 --- a/configs/pic32mz-starterkit/src/pic32mz_appinit.c +++ b/configs/pic32mz-starterkit/src/pic32mz_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/pic32mz-starterkit/src/pic32mz_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -53,11 +53,28 @@ * Name: board_app_initialize * * 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 CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/configs/pirelli_dpl10/src/boot.c b/configs/pirelli_dpl10/src/boot.c index 4cd07fb0a6..38d1fe8ac2 100644 --- a/configs/pirelli_dpl10/src/boot.c +++ b/configs/pirelli_dpl10/src/boot.c @@ -44,10 +44,33 @@ * Public Functions ****************************************************************************/ -/* Application initialization stub for boardctl() */ +/**************************************************************************** + * Name: board_app_initialize + * + * Description: + * 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. + * + ****************************************************************************/ #ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return 0; } diff --git a/configs/sabre-6quad/src/imx_appinit.c b/configs/sabre-6quad/src/imx_appinit.c index a1022c6cf1..7b7f66ead6 100644 --- a/configs/sabre-6quad/src/imx_appinit.c +++ b/configs/sabre-6quad/src/imx_appinit.c @@ -55,11 +55,28 @@ * Name: board_app_initialize * * 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) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/configs/sam3u-ek/src/sam_appinit.c b/configs/sam3u-ek/src/sam_appinit.c index 481cc8ffbc..632d630394 100644 --- a/configs/sam3u-ek/src/sam_appinit.c +++ b/configs/sam3u-ek/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sam3u-ek/src/sam_appinit.c * - * Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -105,11 +105,28 @@ * Name: board_app_initialize * * 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 NSH_HAVE_MMCSD FAR struct sdio_dev_s *sdio; diff --git a/configs/sam4e-ek/src/sam_appinit.c b/configs/sam4e-ek/src/sam_appinit.c index 0a577dc925..6eef612187 100644 --- a/configs/sam4e-ek/src/sam_appinit.c +++ b/configs/sam4e-ek/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sam4e-ek/src/sam_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -66,11 +66,28 @@ * Name: board_app_initialize * * 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_AT25) || defined(HAVE_HSMCI) || defined(HAVE_USBMONITOR) int ret; diff --git a/configs/sam4e-ek/src/sam_boot.c b/configs/sam4e-ek/src/sam_boot.c index d75f6bebc3..d0dda097b0 100644 --- a/configs/sam4e-ek/src/sam_boot.c +++ b/configs/sam4e-ek/src/sam_boot.c @@ -152,7 +152,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/configs/sam4l-xplained/src/sam_appinit.c b/configs/sam4l-xplained/src/sam_appinit.c index 48c072c98a..15330a80a2 100644 --- a/configs/sam4l-xplained/src/sam_appinit.c +++ b/configs/sam4l-xplained/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sam4l-xplained/src/sam_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -79,11 +79,28 @@ * Name: board_app_initialize * * 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_SAM34_LCDCA) && defined(CONFIG_SAM4L_XPLAINED_SLCD1MODULE) /* Initialize the SLCD and register the SLCD device as /dev/slcd */ diff --git a/configs/sam4s-xplained-pro/src/sam_appinit.c b/configs/sam4s-xplained-pro/src/sam_appinit.c index e85b97ae93..7e0d3c3d08 100644 --- a/configs/sam4s-xplained-pro/src/sam_appinit.c +++ b/configs/sam4s-xplained-pro/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sam4s-xplained-pro/src/sam_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * Bob Doiron * @@ -81,11 +81,28 @@ * Name: board_app_initialize * * 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_USBDEV) || defined(HAVE_HSMCI) || defined (HAVE_PROC) || \ defined(HAVE_USBMONITOR) diff --git a/configs/sama5d2-xult/src/sam_appinit.c b/configs/sama5d2-xult/src/sam_appinit.c index 8472bc995c..518dc37696 100644 --- a/configs/sama5d2-xult/src/sam_appinit.c +++ b/configs/sama5d2-xult/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sama5d2-xult/src/sam_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -57,11 +57,28 @@ * Name: board_app_initialize * * 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) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/configs/sama5d3-xplained/src/sam_appinit.c b/configs/sama5d3-xplained/src/sam_appinit.c index 1215fea595..cfee95be1f 100644 --- a/configs/sama5d3-xplained/src/sam_appinit.c +++ b/configs/sama5d3-xplained/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sama5d3-xplained/src/sam_appinit.c * - * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -54,10 +54,6 @@ #include "sama5d3-xplained.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -66,11 +62,28 @@ * Name: board_app_initialize * * 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_NAND) || defined(HAVE_AT25) || defined(HAVE_HSMCI) || \ defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) || \\ diff --git a/configs/sama5d3-xplained/src/sam_boot.c b/configs/sama5d3-xplained/src/sam_boot.c index 9a3c34c825..901c30e243 100644 --- a/configs/sama5d3-xplained/src/sam_boot.c +++ b/configs/sama5d3-xplained/src/sam_boot.c @@ -153,7 +153,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/configs/sama5d3x-ek/src/sam_appinit.c b/configs/sama5d3x-ek/src/sam_appinit.c index 56589915ce..9f4fff0f73 100644 --- a/configs/sama5d3x-ek/src/sam_appinit.c +++ b/configs/sama5d3x-ek/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sama5d3x-ek/src/sam_appinit.c * - * Copyright (C) 2013-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2013-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -66,11 +66,28 @@ * Name: board_app_initialize * * 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_NAND) || defined(HAVE_AT25) || defined(HAVE_AT24) || \ defined(HAVE_HSMCI) || defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) ||\ diff --git a/configs/sama5d3x-ek/src/sam_boot.c b/configs/sama5d3x-ek/src/sam_boot.c index ce065150c4..d12ec87c75 100644 --- a/configs/sama5d3x-ek/src/sam_boot.c +++ b/configs/sama5d3x-ek/src/sam_boot.c @@ -153,7 +153,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/configs/sama5d4-ek/src/sam_appinit.c b/configs/sama5d4-ek/src/sam_appinit.c index 9632e33353..066bbf00c3 100644 --- a/configs/sama5d4-ek/src/sam_appinit.c +++ b/configs/sama5d4-ek/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sama5d4-ek/src/sam_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -57,11 +57,28 @@ * Name: board_app_initialize * * 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) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/configs/samd20-xplained/src/sam_appinit.c b/configs/samd20-xplained/src/sam_appinit.c index dd0ca0c9f3..8bc9a35b4f 100644 --- a/configs/samd20-xplained/src/sam_appinit.c +++ b/configs/samd20-xplained/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/samd20-xplained/src/sam_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -97,11 +97,28 @@ * Name: board_app_initialize * * 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(SAMDL_HAVE_SPI0) && defined(CONFIG_SAMD20_XPLAINED_IOMODULE) /* Initialize the SPI-based MMC/SD slot */ diff --git a/configs/samd21-xplained/src/sam_appinit.c b/configs/samd21-xplained/src/sam_appinit.c index e0bca03010..56afb0ff24 100644 --- a/configs/samd21-xplained/src/sam_appinit.c +++ b/configs/samd21-xplained/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/samd21-xplained/src/sam_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -97,11 +97,28 @@ * Name: board_app_initialize * * 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(SAMDL_HAVE_SPI0) && defined(CONFIG_SAMD21_XPLAINED_IOMODULE) /* Initialize the SPI-based MMC/SD slot */ diff --git a/configs/same70-xplained/src/sam_appinit.c b/configs/same70-xplained/src/sam_appinit.c index d3d1447122..5e8a871522 100644 --- a/configs/same70-xplained/src/sam_appinit.c +++ b/configs/same70-xplained/src/sam_appinit.c @@ -55,11 +55,28 @@ * Name: board_app_initialize * * 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) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/configs/saml21-xplained/src/sam_appinit.c b/configs/saml21-xplained/src/sam_appinit.c index 98d66e9213..9f299c1f71 100644 --- a/configs/saml21-xplained/src/sam_appinit.c +++ b/configs/saml21-xplained/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/saml21-xplained/src/sam_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -97,11 +97,28 @@ * Name: board_app_initialize * * 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(SAMDL_HAVE_SPI0) && defined(CONFIG_SAML21_XPLAINED_IOMODULE) /* Initialize the SPI-based MMC/SD slot */ diff --git a/configs/samv71-xult/src/sam_appinit.c b/configs/samv71-xult/src/sam_appinit.c index 451c97600d..f7215ff465 100644 --- a/configs/samv71-xult/src/sam_appinit.c +++ b/configs/samv71-xult/src/sam_appinit.c @@ -55,11 +55,28 @@ * Name: board_app_initialize * * 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) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/configs/shenzhou/src/stm32_appinit.c b/configs/shenzhou/src/stm32_appinit.c index 4ef9ad82db..9b18c80d5d 100644 --- a/configs/shenzhou/src/stm32_appinit.c +++ b/configs/shenzhou/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/shenzhou/src/stm32_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -142,11 +142,28 @@ * Name: board_app_initialize * * 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) || defined(HAVE_W25) int ret; diff --git a/configs/sim/src/sim_appinit.c b/configs/sim/src/sim_appinit.c index eecf0415cf..4100ec736b 100644 --- a/configs/sim/src/sim_appinit.c +++ b/configs/sim/src/sim_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/sim/src/sim_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -54,10 +54,25 @@ * 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 -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifndef CONFIG_BOARD_INITIALIZE sim_bringup(); diff --git a/configs/spark/src/stm32_appinit.c b/configs/spark/src/stm32_appinit.c index 9b2d965a31..c91969cd59 100644 --- a/configs/spark/src/stm32_appinit.c +++ b/configs/spark/src/stm32_appinit.c @@ -130,11 +130,28 @@ static bool g_app_initialzed; * Name: board_app_initialize * * 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) { /* Check if already initialized */ diff --git a/configs/spark/src/stm32_boot.c b/configs/spark/src/stm32_boot.c index 763538bebd..6d278fb502 100644 --- a/configs/spark/src/stm32_boot.c +++ b/configs/spark/src/stm32_boot.c @@ -123,7 +123,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - board_app_initialize(); + board_app_initialize(0); #endif /* CC3000 wireless initialization diff --git a/configs/spark/src/stm32_usbmsc.c b/configs/spark/src/stm32_usbmsc.c index 23c4cc9533..57e9e30d82 100644 --- a/configs/spark/src/stm32_usbmsc.c +++ b/configs/spark/src/stm32_usbmsc.c @@ -62,7 +62,7 @@ int board_usbmsc_initialize(int port) { - return board_app_initialize(); + return board_app_initialize(0); } #endif /* CONFIG_USBMSC && CONFIG_BOARDCTL_USBDEVCTRL */ diff --git a/configs/stm3210e-eval/src/stm32_appinit.c b/configs/stm3210e-eval/src/stm32_appinit.c index abc4e5881d..4a5d55c9eb 100644 --- a/configs/stm3210e-eval/src/stm32_appinit.c +++ b/configs/stm3210e-eval/src/stm32_appinit.c @@ -176,11 +176,28 @@ static void stm32_i2ctool(void) * Name: board_app_initialize * * 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 CONFIG_STM32_SPI1 FAR struct spi_dev_s *spi; diff --git a/configs/stm3220g-eval/src/stm32_appinit.c b/configs/stm3220g-eval/src/stm32_appinit.c index 54311e8fe8..89795b54d5 100644 --- a/configs/stm3220g-eval/src/stm32_appinit.c +++ b/configs/stm3220g-eval/src/stm32_appinit.c @@ -189,11 +189,28 @@ static void stm32_i2ctool(void) * Name: board_app_initialize * * 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 CONFIG_STM32_SPI1 FAR struct spi_dev_s *spi; diff --git a/configs/stm3240g-eval/src/stm32_appinit.c b/configs/stm3240g-eval/src/stm32_appinit.c index fd16151127..469180c390 100644 --- a/configs/stm3240g-eval/src/stm32_appinit.c +++ b/configs/stm3240g-eval/src/stm32_appinit.c @@ -207,11 +207,28 @@ static void stm32_i2ctool(void) * Name: board_app_initialize * * 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 FAR struct rtc_lowerhalf_s *lower; diff --git a/configs/stm3240g-eval/src/stm32_boot.c b/configs/stm3240g-eval/src/stm32_boot.c index 47322b69cd..09b3b82eed 100644 --- a/configs/stm3240g-eval/src/stm32_boot.c +++ b/configs/stm3240g-eval/src/stm32_boot.c @@ -161,7 +161,7 @@ static int board_initthread(int argc, char *argv[]) * but the initialization function must run in kernel space. */ - ret = board_app_initialize(); + ret = board_app_initialize(0); if (ret < 0) { gdbg("ERROR: board_app_initialize failed: %d\n", ret); diff --git a/configs/stm32_tiny/src/stm32_appinit.c b/configs/stm32_tiny/src/stm32_appinit.c index 2f117d2c2e..4b590de5d5 100644 --- a/configs/stm32_tiny/src/stm32_appinit.c +++ b/configs/stm32_tiny/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32_tiny/src/stm32_appinit.c * - * Copyright (C) 2009, 2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011, 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -49,10 +49,6 @@ #include "stm32.h" #include "stm32_tiny.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -61,11 +57,28 @@ * Name: board_app_initialize * * 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_WL_NRF24L01) syslog(LOG_INFO, "Register the nRF24L01 module"); diff --git a/configs/stm32f103-minimum/src/stm32_appinit.c b/configs/stm32f103-minimum/src/stm32_appinit.c index 73544527b1..d9291f9a16 100644 --- a/configs/stm32f103-minimum/src/stm32_appinit.c +++ b/configs/stm32f103-minimum/src/stm32_appinit.c @@ -57,11 +57,28 @@ * Name: board_app_initialize * * 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; } diff --git a/configs/stm32f3discovery/src/stm32_appinit.c b/configs/stm32f3discovery/src/stm32_appinit.c index 445dfbc2c4..3d23db6296 100644 --- a/configs/stm32f3discovery/src/stm32_appinit.c +++ b/configs/stm32f3discovery/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f3discovery/src/stm32_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -92,11 +92,28 @@ * Name: board_app_initialize * * 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_USBMONITOR int ret; diff --git a/configs/stm32f411e-disco/src/stm32_appinit.c b/configs/stm32f411e-disco/src/stm32_appinit.c index 9f35fd24f8..9228ec0366 100644 --- a/configs/stm32f411e-disco/src/stm32_appinit.c +++ b/configs/stm32f411e-disco/src/stm32_appinit.c @@ -61,11 +61,28 @@ * Name: board_app_initialize * * 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 CONFIG_SCHED_INSTRUMENTATION /* Configure CPU load estimation */ diff --git a/configs/stm32f411e-disco/src/stm32_boot.c b/configs/stm32f411e-disco/src/stm32_boot.c index 5164e8837e..dec40d4b70 100644 --- a/configs/stm32f411e-disco/src/stm32_boot.c +++ b/configs/stm32f411e-disco/src/stm32_boot.c @@ -112,7 +112,7 @@ void board_initialize(void) * but the initialization function must run in kernel space. */ - board_app_initialize(); + board_app_initialize(0); #endif } diff --git a/configs/stm32f429i-disco/src/stm32_appinit.c b/configs/stm32f429i-disco/src/stm32_appinit.c index 719ebc031a..29bbb24320 100644 --- a/configs/stm32f429i-disco/src/stm32_appinit.c +++ b/configs/stm32f429i-disco/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f429i-disco/src/stm32_appinit.c * - * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -121,7 +121,9 @@ * Name: board_app_initialize * * 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 : * Called from the NSH library @@ -130,9 +132,24 @@ * CONFIG_LIB_BOARDCTL=n : * 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_STM32_SPI4) FAR struct spi_dev_s *spi; diff --git a/configs/stm32f429i-disco/src/stm32_boot.c b/configs/stm32f429i-disco/src/stm32_boot.c index 77653432e0..33f855a28c 100644 --- a/configs/stm32f429i-disco/src/stm32_boot.c +++ b/configs/stm32f429i-disco/src/stm32_boot.c @@ -149,7 +149,7 @@ void board_initialize(void) * but the initialization function must run in kernel space. */ - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/stm32f4discovery/src/stm32_appinit.c b/configs/stm32f4discovery/src/stm32_appinit.c index 4ce0e55bdb..75e635988c 100644 --- a/configs/stm32f4discovery/src/stm32_appinit.c +++ b/configs/stm32f4discovery/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f4discovery/src/stm32_appinit.c * - * Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -59,12 +59,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture-specific initialization (if this was not already - * done by board_initialize(); + * 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 CONFIG_BMP180 stm32_bmp180initialize("/dev/press0"); diff --git a/configs/stm32f746g-disco/src/stm32_appinitialize.c b/configs/stm32f746g-disco/src/stm32_appinitialize.c index aa2818899a..88d62fc154 100644 --- a/configs/stm32f746g-disco/src/stm32_appinitialize.c +++ b/configs/stm32f746g-disco/src/stm32_appinitialize.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f746g-disco/src/stm32_appinitilaize.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -42,10 +42,6 @@ #include "stm32_ccm.h" #include "stm32f746g-disco.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -58,9 +54,24 @@ * 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 CONFIG_FS_PROCFS int ret; diff --git a/configs/stm32f746g-disco/src/stm32_boot.c b/configs/stm32f746g-disco/src/stm32_boot.c index 381925dee1..c5954af177 100644 --- a/configs/stm32f746g-disco/src/stm32_boot.c +++ b/configs/stm32f746g-disco/src/stm32_boot.c @@ -121,7 +121,7 @@ void board_initialize(void) * but the initialization function must run in kernel space. */ - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/stm32l476vg-disco/src/stm32_appinit.c b/configs/stm32l476vg-disco/src/stm32_appinit.c index ec485fa1f1..0c5591dcfa 100644 --- a/configs/stm32l476vg-disco/src/stm32_appinit.c +++ b/configs/stm32l476vg-disco/src/stm32_appinit.c @@ -123,12 +123,29 @@ FAR struct mtd_dev_s *g_mtd_fs; * Name: board_app_initialize * * Description: - * Application initialization stub for boardctl() + * 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. * ****************************************************************************/ #ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef HAVE_RTC_DRIVER FAR struct rtc_lowerhalf_s *rtclower; diff --git a/configs/stm32l476vg-disco/src/stm32_boot.c b/configs/stm32l476vg-disco/src/stm32_boot.c index 5886183380..59d3822f2f 100644 --- a/configs/stm32l476vg-disco/src/stm32_boot.c +++ b/configs/stm32l476vg-disco/src/stm32_boot.c @@ -113,7 +113,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - board_app_initialize(); + board_app_initialize(0); #endif } #endif diff --git a/configs/stm32ldiscovery/src/stm32_appinit.c b/configs/stm32ldiscovery/src/stm32_appinit.c index 6141247b0e..359e271eb9 100644 --- a/configs/stm32ldiscovery/src/stm32_appinit.c +++ b/configs/stm32ldiscovery/src/stm32_appinit.c @@ -2,7 +2,7 @@ * config/stm32ldiscovery/src/stm32_appinit.c * arch/arm/src/board/stm32_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -59,11 +59,28 @@ * Name: board_app_initialize * * 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 CONFIG_STM32_LCD /* Initialize the SLCD and register the SLCD device as /dev/slcd */ diff --git a/configs/sure-pic32mx/src/pic32mx_appinit.c b/configs/sure-pic32mx/src/pic32mx_appinit.c index 6992300bd0..ef09c7641c 100644 --- a/configs/sure-pic32mx/src/pic32mx_appinit.c +++ b/configs/sure-pic32mx/src/pic32mx_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sure-pic32mx/src/pic32mx_appinit.c * - * Copyright (C) 2011-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2013, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -359,11 +359,28 @@ static int nsh_usbdevinitialize(void) * Name: board_app_initialize * * 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; diff --git a/configs/teensy-3.x/src/k20_appinit.c b/configs/teensy-3.x/src/k20_appinit.c index d5cf13fe61..fd1b2bd5c8 100644 --- a/configs/teensy-3.x/src/k20_appinit.c +++ b/configs/teensy-3.x/src/k20_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/teensy-3.x/src/k20_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,23 +43,6 @@ #include "teensy-3x.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Configuration ************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -68,11 +51,28 @@ * Name: board_app_initialize * * 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; } diff --git a/configs/teensy-lc/src/kl_appinit.c b/configs/teensy-lc/src/kl_appinit.c index 8d96c28e76..fdd1e3bd30 100644 --- a/configs/teensy-lc/src/kl_appinit.c +++ b/configs/teensy-lc/src/kl_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/teensy-lc/src/kl_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -47,10 +47,6 @@ #ifdef CONFIG_LIB_BOARDCTL -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -63,9 +59,24 @@ * 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; } diff --git a/configs/teensy-lc/src/kl_boardinitialize.c b/configs/teensy-lc/src/kl_boardinitialize.c index 119a2d4ca6..576e941ee2 100644 --- a/configs/teensy-lc/src/kl_boardinitialize.c +++ b/configs/teensy-lc/src/kl_boardinitialize.c @@ -136,7 +136,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/tm4c123g-launchpad/src/tm4c_appinit.c b/configs/tm4c123g-launchpad/src/tm4c_appinit.c index 0763742bf1..c1ad4dd105 100644 --- a/configs/tm4c123g-launchpad/src/tm4c_appinit.c +++ b/configs/tm4c123g-launchpad/src/tm4c_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/tm4c123g-launchpad/src/tm4c_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,10 +43,6 @@ #include "tm4c123g-launchpad.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -55,11 +51,28 @@ * Name: board_app_initialize * * 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 CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/configs/tm4c1294-launchpad/src/tm4c_appinit.c b/configs/tm4c1294-launchpad/src/tm4c_appinit.c index c360d7f00c..2245ac31e9 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_appinit.c +++ b/configs/tm4c1294-launchpad/src/tm4c_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/tm4c1294-launchpad/src/tm4c_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,10 +43,6 @@ #include "tm4c1294-launchpad.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -55,11 +51,28 @@ * Name: board_app_initialize * * 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 CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/configs/twr-k60n512/src/k60_appinit.c b/configs/twr-k60n512/src/k60_appinit.c index 6c6795c2ad..ffcb0b7f9f 100644 --- a/configs/twr-k60n512/src/k60_appinit.c +++ b/configs/twr-k60n512/src/k60_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/twr-k60n512/src/k60_appinit.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -193,11 +193,28 @@ static int kinetis_cdinterrupt(int irq, FAR void *context) * Name: board_app_initialize * * 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 NSH_HAVEMMCSD int ret; diff --git a/configs/u-blox-c027/src/lpc17_appinit.c b/configs/u-blox-c027/src/lpc17_appinit.c index ce83755f4d..f315953dfb 100644 --- a/configs/u-blox-c027/src/lpc17_appinit.c +++ b/configs/u-blox-c027/src/lpc17_appinit.c @@ -126,11 +126,28 @@ * Name: board_app_initialize * * 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; diff --git a/configs/ubw32/src/pic32_appinit.c b/configs/ubw32/src/pic32_appinit.c index 612e3aa70f..22cf57b4b0 100644 --- a/configs/ubw32/src/pic32_appinit.c +++ b/configs/ubw32/src/pic32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/ubw32/src/pic32_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -89,11 +89,28 @@ static int nsh_usbdevinitialize(void) * Name: board_app_initialize * * 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; diff --git a/configs/viewtool-stm32f107/src/stm32_appinit.c b/configs/viewtool-stm32f107/src/stm32_appinit.c index 5884d7d053..8bc77a200c 100644 --- a/configs/viewtool-stm32f107/src/stm32_appinit.c +++ b/configs/viewtool-stm32f107/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/viewtool-stm32f107/src/stm32_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -123,11 +123,28 @@ static int rtc_driver_initialize(void) * Name: board_app_initialize * * 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 (void)rtc_driver_initialize(); diff --git a/configs/zkit-arm-1769/src/lpc17_appinit.c b/configs/zkit-arm-1769/src/lpc17_appinit.c index e9d9c1baa1..9817d76c33 100644 --- a/configs/zkit-arm-1769/src/lpc17_appinit.c +++ b/configs/zkit-arm-1769/src/lpc17_appinit.c @@ -129,14 +129,6 @@ # endif #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -145,11 +137,28 @@ * Name: board_app_initialize * * 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 CONFIG_NSH_HAVEMMCSD FAR struct spi_dev_s *spi; diff --git a/configs/zp214xpa/src/lpc2148_appinit.c b/configs/zp214xpa/src/lpc2148_appinit.c index ae403949bc..b5efe18344 100644 --- a/configs/zp214xpa/src/lpc2148_appinit.c +++ b/configs/zp214xpa/src/lpc2148_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/zp214xpa/src/lpc2148_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -56,9 +56,24 @@ * 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; } diff --git a/include/nuttx/board.h b/include/nuttx/board.h index 9e0ea70ab8..e143c4862b 100644 --- a/include/nuttx/board.h +++ b/include/nuttx/board.h @@ -144,9 +144,24 @@ void board_initialize(void); * 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); /**************************************************************************** * Name: board_power_off diff --git a/include/sys/boardctl.h b/include/sys/boardctl.h index 1470988418..5177dd8074 100644 --- a/include/sys/boardctl.h +++ b/include/sys/boardctl.h @@ -54,9 +54,19 @@ * * CMD: BOARDIOC_INIT * 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 - * DEPENDENCIES: Board logic must provide board_app_initialization() + * DEPENDENCIES: Board logic must provide board_app_initialize() * * CMD: BOARDIOC_POWEROFF * DESCRIPTION: Power off the board