diff --git a/configs/stm32f4discovery/src/Makefile b/configs/stm32f4discovery/src/Makefile index 535440d6e52..8f8a4b14cea 100644 --- a/configs/stm32f4discovery/src/Makefile +++ b/configs/stm32f4discovery/src/Makefile @@ -116,7 +116,7 @@ ifeq ($(CONFIG_SENSORS_XEN1210),y) CSRCS += stm32_xen1210.c endif -ifeq ($(CONFIG_NSH_LIBRARY),y) +ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif diff --git a/configs/stm32f4discovery/src/stm32_appinit.c b/configs/stm32f4discovery/src/stm32_appinit.c index 3b6446a3fed..996122e9d65 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, 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2014, 2016, 20018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -67,7 +67,7 @@ * 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 + * between the board-specific initialization logic and 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, @@ -82,10 +82,6 @@ int board_app_initialize(uintptr_t arg) { -#ifdef CONFIG_SENSORS_BMP180 - stm32_bmp180initialize("/dev/press0"); -#endif - #ifdef CONFIG_BOARD_INITIALIZE /* Board initialization already performed by board_initialize() */ diff --git a/configs/stm32f4discovery/src/stm32_bringup.c b/configs/stm32f4discovery/src/stm32_bringup.c index 16349a413c3..28a841d1507 100644 --- a/configs/stm32f4discovery/src/stm32_bringup.c +++ b/configs/stm32f4discovery/src/stm32_bringup.c @@ -107,6 +107,10 @@ int stm32_bringup(void) #endif int ret = OK; +#ifdef CONFIG_SENSORS_BMP180 + stm32_bmp180initialize("/dev/press0"); +#endif + #ifdef CONFIG_SENSORS_BH1750FVI stm32_bh1750initialize("/dev/light0"); #endif