From 615d863c00992ff84788604dd4f6a2769572a1fb Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Sat, 26 Feb 2022 22:51:50 +0100 Subject: [PATCH] boards: drop manual button auto-init --- boards/calliope-mini/board.c | 29 ----------------------------- boards/microbit-v2/board.c | 29 ----------------------------- boards/microbit/board.c | 29 ----------------------------- boards/nrf51dk/board.c | 31 ------------------------------- boards/nrf9160dk/board.c | 32 -------------------------------- boards/olimexino-stm32/board.c | 28 ---------------------------- boards/omote/board.c | 2 -- boards/openmote-b/board.c | 1 - boards/qn9080dk/board.c | 8 -------- boards/samd10-xmini/board.c | 5 ----- boards/samd20-xpro/board.c | 30 ------------------------------ boards/samd21-xpro/board.c | 33 --------------------------------- boards/same54-xpro/board.c | 6 ------ boards/sensebox_samd21/board.c | 5 ----- boards/stm32g0316-disco/board.c | 29 ----------------------------- 15 files changed, 297 deletions(-) delete mode 100644 boards/calliope-mini/board.c delete mode 100644 boards/microbit-v2/board.c delete mode 100644 boards/microbit/board.c delete mode 100644 boards/nrf51dk/board.c delete mode 100644 boards/nrf9160dk/board.c delete mode 100644 boards/olimexino-stm32/board.c delete mode 100644 boards/samd20-xpro/board.c delete mode 100644 boards/samd21-xpro/board.c delete mode 100644 boards/stm32g0316-disco/board.c diff --git a/boards/calliope-mini/board.c b/boards/calliope-mini/board.c deleted file mode 100644 index 9c7e7a8d5f..0000000000 --- a/boards/calliope-mini/board.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2016 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_calliope-mini - * @{ - * - * @file - * @brief Board initialization code for the Calliope mini - * - * @author Hauke Petersen - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ - /* initialize the mini's buttons */ - gpio_init(BTN0_PIN, BTN0_MODE); - gpio_init(BTN1_PIN, BTN1_MODE); -} diff --git a/boards/microbit-v2/board.c b/boards/microbit-v2/board.c deleted file mode 100644 index 7a84fb4a99..0000000000 --- a/boards/microbit-v2/board.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2021 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_microbit_v2 - * @{ - * - * @file - * @brief Board initialization code for the BBC micro:bit v2 - * - * @author Alexandre Abadie - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ - /* initialize the on board buttons */ - gpio_init(BTN0_PIN, BTN0_MODE); - gpio_init(BTN1_PIN, BTN1_MODE); -} diff --git a/boards/microbit/board.c b/boards/microbit/board.c deleted file mode 100644 index 3a0e2ea411..0000000000 --- a/boards/microbit/board.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2016 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_microbit - * @{ - * - * @file - * @brief Board initialization code for the BBC micro:bit - * - * @author Hauke Petersen - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ - /* initialize the micro:bit's buttons */ - gpio_init(BTN0_PIN, BTN0_MODE); - gpio_init(BTN1_PIN, BTN1_MODE); -} diff --git a/boards/nrf51dk/board.c b/boards/nrf51dk/board.c deleted file mode 100644 index f39d6d3ee9..0000000000 --- a/boards/nrf51dk/board.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2018 Inria - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_nrf51dk - * @{ - * - * @file - * @brief Board initialization code for the nRF51DK - * - * @author Alexandre Abadie - * - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ - /* initialize the board buttons */ - gpio_init(BTN0_PIN, BTN0_MODE); - gpio_init(BTN1_PIN, BTN1_MODE); - gpio_init(BTN2_PIN, BTN2_MODE); - gpio_init(BTN3_PIN, BTN3_MODE); -} diff --git a/boards/nrf9160dk/board.c b/boards/nrf9160dk/board.c deleted file mode 100644 index 3da2963715..0000000000 --- a/boards/nrf9160dk/board.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2021 Mesotic SAS - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_nrf9160dk - * @{ - * - * @file - * @brief Board initialization for the nRF9160DK - * - * @author Dylan Laduranty - * - * @} - */ - -#include "cpu.h" -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ - - gpio_init(BTN0_PIN, BTN0_MODE); - gpio_init(BTN1_PIN, BTN1_MODE); - gpio_init(BTN2_PIN, BTN2_MODE); - gpio_init(BTN3_PIN, BTN3_MODE); -} diff --git a/boards/olimexino-stm32/board.c b/boards/olimexino-stm32/board.c deleted file mode 100644 index 57b9eb4e45..0000000000 --- a/boards/olimexino-stm32/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2020 Scallog - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_olimexino-stm32 - * @{ - * - * @file - * @brief Board specific implementations for the OLIMEXINO STM32 board - * - * @author Corentin Vigourt - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ - - /* initialize the button */ - gpio_init(BTN0_PIN, BTN0_MODE); -} -/** @} */ diff --git a/boards/omote/board.c b/boards/omote/board.c index 55e6e5fb9b..3c6f7f2863 100644 --- a/boards/omote/board.c +++ b/boards/omote/board.c @@ -22,6 +22,4 @@ void board_init(void) { /* The boot pin must be set to input otherwise it may lock the bootloader */ gpio_init(BOOT_PIN, GPIO_IN); - - gpio_init(BTN0_PIN, BTN0_MODE); } diff --git a/boards/openmote-b/board.c b/boards/openmote-b/board.c index 9550cebef8..31e358086b 100644 --- a/boards/openmote-b/board.c +++ b/boards/openmote-b/board.c @@ -27,7 +27,6 @@ void board_init(void) /* The boot pin must be set to input otherwise it may lock the bootloader */ gpio_init(BOOT_PIN, GPIO_IN); - gpio_init(BTN0_PIN, BTN0_MODE); gpio_init(RF24_SWITCH_CC2538_PIN, GPIO_OUT); gpio_init(RF24_SWITCH_AT86RF215_PIN, GPIO_OUT); diff --git a/boards/qn9080dk/board.c b/boards/qn9080dk/board.c index 6af89542d4..7c53642757 100644 --- a/boards/qn9080dk/board.c +++ b/boards/qn9080dk/board.c @@ -57,11 +57,3 @@ static mtd_spi_nor_t mtd_nor_dev = { mtd_dev_t *mtd0 = (mtd_dev_t *)&mtd_nor_dev; #endif /* MODULE_MTD */ - -void board_init(void) -{ - /* Initialize LEDs and Buttons. */ - gpio_init(BTN1_PIN, BTN1_MODE); - gpio_init(BTN2_PIN, BTN2_MODE); - -} diff --git a/boards/samd10-xmini/board.c b/boards/samd10-xmini/board.c index 8cccd775f4..da221650e8 100644 --- a/boards/samd10-xmini/board.c +++ b/boards/samd10-xmini/board.c @@ -23,15 +23,10 @@ void board_init(void) { - - /* initialize the on-board button */ - gpio_init(BTN0_PIN, BTN0_MODE); - /* If the PA24 and PA25 pins are not connected, it is recommended * to enable a pull-up on PA24 and PA25 through input GPIO mode. * (those have external pull-ups on the board that would leak current) */ gpio_init(GPIO_PIN(PA, 24), GPIO_IN_PU); gpio_init(GPIO_PIN(PA, 25), GPIO_IN_PU); - } diff --git a/boards/samd20-xpro/board.c b/boards/samd20-xpro/board.c deleted file mode 100644 index 9c5ee9c8b5..0000000000 --- a/boards/samd20-xpro/board.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2020 ML!PA Consulting GmbH - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_samd20-xpro - * @{ - * - * @file - * @brief Board specific implementations for the Atmel SAM D20 Xplained - * Pro board - * - * @author Benjamin Valentin - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ - - /* initialize the on-board button */ - gpio_init(BTN0_PIN, BTN0_MODE); - -} diff --git a/boards/samd21-xpro/board.c b/boards/samd21-xpro/board.c deleted file mode 100644 index c0d9e9693b..0000000000 --- a/boards/samd21-xpro/board.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2017 Travis Griggs - * Copyright (C) 2017 Dan Evans - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_samd21-xpro - * @{ - * - * @file - * @brief Board specific implementations for the Atmel SAM D21 Xplained - * Pro board - * - * @author Travis Griggs - * @author Dan Evans - * @author Sebastian Meiling - * @} - */ - -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ - - /* initialize the on-board button */ - gpio_init(BTN0_PIN, BTN0_MODE); - -} diff --git a/boards/same54-xpro/board.c b/boards/same54-xpro/board.c index 0b8597d004..4a0ff7a140 100644 --- a/boards/same54-xpro/board.c +++ b/boards/same54-xpro/board.c @@ -67,9 +67,3 @@ mtd_dev_t *mtd1 = (mtd_dev_t *)&at24mac_dev; VFS_AUTO_MOUNT(littlefs2, VFS_MTD(same54_nor_dev), "/nvm", 0); #endif #endif /* MODULE_MTD */ - -void board_init(void) -{ - /* initialize the on-board button */ - gpio_init(BTN0_PIN, BTN0_MODE); -} diff --git a/boards/sensebox_samd21/board.c b/boards/sensebox_samd21/board.c index 6fcc85c19a..918bd4b14a 100644 --- a/boards/sensebox_samd21/board.c +++ b/boards/sensebox_samd21/board.c @@ -44,11 +44,6 @@ mtd_dev_t *mtd0 = (mtd_dev_t *)&sensebox_sd_dev; void board_init(void) { - - - /* initialize the on-board button on pin PA20 */ - gpio_init(BTN0_PIN, BTN0_MODE); - /* initialize XBEE1 bus enable pin */ gpio_init(XBEE1_EN_PIN, XBEE1_EN_MODE); diff --git a/boards/stm32g0316-disco/board.c b/boards/stm32g0316-disco/board.c deleted file mode 100644 index b546982f30..0000000000 --- a/boards/stm32g0316-disco/board.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2021 BISSELL Homecare, Inc. - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup boards_stm32g0316-disco - * @{ - * - * @file - * @brief Board specific implementations for the STM32G0316-DISCO board - * - * @author Dave VanKampen - * - * @} - */ - -#include "cpu.h" -#include "board.h" -#include "periph/gpio.h" - -void board_init(void) -{ - - gpio_init(BTN0_PIN, BTN0_MODE); -}