diff --git a/configs/nucleo-f303re/src/stm32_appinitialize.c b/configs/nucleo-f303re/src/stm32_appinitialize.c index 41423a4489..dce4fd5090 100644 --- a/configs/nucleo-f303re/src/stm32_appinitialize.c +++ b/configs/nucleo-f303re/src/stm32_appinitialize.c @@ -41,8 +41,9 @@ #include +#include + #include -#include /**************************************************************************** * Pre-processor Definitions @@ -64,10 +65,5 @@ int board_app_initialize(void) { -#ifdef CONFIG_CANUTILS_UAVCAN - (void)stm32_configgpio(GPIO_CAN1_RX); - (void)stm32_configgpio(GPIO_CAN1_TX); -#endif - return OK; } diff --git a/configs/nucleo-f303re/src/stm32_boot.c b/configs/nucleo-f303re/src/stm32_boot.c index 97cac120a1..1bd8390f8a 100644 --- a/configs/nucleo-f303re/src/stm32_boot.c +++ b/configs/nucleo-f303re/src/stm32_boot.c @@ -86,6 +86,11 @@ void stm32_boardinitialize(void) } #endif +#ifdef CONFIG_CANUTILS_UAVCAN + (void)stm32_configgpio(GPIO_CAN1_RX); + (void)stm32_configgpio(GPIO_CAN1_TX); +#endif + /* Configure on-board LEDs if LED support has been selected. */ #ifdef CONFIG_ARCH_LEDS diff --git a/configs/nucleo-f303re/src/stm32_ssd1351.c b/configs/nucleo-f303re/src/stm32_ssd1351.c index ef39a8711f..f4ccf495e6 100644 --- a/configs/nucleo-f303re/src/stm32_ssd1351.c +++ b/configs/nucleo-f303re/src/stm32_ssd1351.c @@ -136,4 +136,5 @@ FAR struct lcd_dev_s *board_graphics_setup(unsigned int devno) return NULL; } + #endif /* CONFIG_LCD_SSD1351 */ diff --git a/configs/nucleo-f303re/uavcan/defconfig b/configs/nucleo-f303re/uavcan/defconfig index f98e0145f1..d16d6a21d4 100644 --- a/configs/nucleo-f303re/uavcan/defconfig +++ b/configs/nucleo-f303re/uavcan/defconfig @@ -471,13 +471,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # # Board-Specific Options # -CONFIG_LIB_BOARDCTL=y -# CONFIG_BOARDCTL_RESET is not set -# CONFIG_BOARDCTL_TSCTEST is not set -# CONFIG_BOARDCTL_ADCTEST is not set -# CONFIG_BOARDCTL_PWMTEST is not set -# CONFIG_BOARDCTL_GRAPHICS is not set -# CONFIG_BOARDCTL_IOCTL is not set +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features diff --git a/configs/stm32f4discovery/src/Makefile b/configs/stm32f4discovery/src/Makefile index ec029b1ea1..31a8f3dd23 100644 --- a/configs/stm32f4discovery/src/Makefile +++ b/configs/stm32f4discovery/src/Makefile @@ -48,10 +48,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_LIB_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_STM32_OTGFS),y) CSRCS += stm32_usb.c endif diff --git a/configs/stm32f4discovery/src/stm32_appinitialize.c b/configs/stm32f4discovery/src/stm32_appinitialize.c deleted file mode 100644 index a9ff218e96..0000000000 --- a/configs/stm32f4discovery/src/stm32_appinitialize.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * configs/stm32f4discovery/src/stm32_appinitialize.c - * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. - * Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved. - * Authors: Gregory Nutt - * Paul Alexander Patience - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * 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. - * - ****************************************************************************/ - -int board_app_initialize(void) -{ -#ifdef CONFIG_CANUTILS_UAVCAN - (void)stm32_configgpio(GPIO_CAN1_RX); - (void)stm32_configgpio(GPIO_CAN1_TX); -#endif - - return OK; -} diff --git a/configs/stm32f4discovery/src/stm32_boot.c b/configs/stm32f4discovery/src/stm32_boot.c index 2f1a431ae7..fd4840da2d 100644 --- a/configs/stm32f4discovery/src/stm32_boot.c +++ b/configs/stm32f4discovery/src/stm32_boot.c @@ -104,6 +104,11 @@ void stm32_boardinitialize(void) } #endif +#ifdef CONFIG_CANUTILS_UAVCAN + (void)stm32_configgpio(GPIO_CAN1_RX); + (void)stm32_configgpio(GPIO_CAN1_TX); +#endif + #ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ diff --git a/configs/stm32f4discovery/uavcan/defconfig b/configs/stm32f4discovery/uavcan/defconfig index becda00937..d59cde3627 100644 --- a/configs/stm32f4discovery/uavcan/defconfig +++ b/configs/stm32f4discovery/uavcan/defconfig @@ -492,13 +492,7 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # Board-Specific Options # # CONFIG_STM32F4DISBB is not set -CONFIG_LIB_BOARDCTL=y -# CONFIG_BOARDCTL_RESET is not set -# CONFIG_BOARDCTL_TSCTEST is not set -# CONFIG_BOARDCTL_ADCTEST is not set -# CONFIG_BOARDCTL_PWMTEST is not set -# CONFIG_BOARDCTL_GRAPHICS is not set -# CONFIG_BOARDCTL_IOCTL is not set +# CONFIG_LIB_BOARDCTL is not set # # RTOS Features