1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards: drop LED init

This is handled by periph_init_leds now
This commit is contained in:
Benjamin Valentin 2022-01-28 13:28:20 +01:00
parent cd6aea3549
commit 468ea89953
184 changed files with 163 additions and 966 deletions

View File

@ -15,12 +15,6 @@ extern void dummy(void);
void board_init(void)
{
/* Turn off all LED's */
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
LED1_OFF;
LED2_OFF;
/* Stop the linker from throwing away the PIC32 config register settings */
dummy();
}

View File

@ -15,3 +15,66 @@ config MODULE_BOARD
depends on TEST_KCONFIG
help
Module which holds all board-specific files.
config MODULE_AUTO_INIT_LEDS
bool
default y
depends on TEST_KCONFIG
help
Enable auto initalization of board leds
config MODULE_AUTO_INIT_LED0
bool
default y
depends on TEST_KCONFIG
help
Enable auto initalization of LED0 if present
config MODULE_AUTO_INIT_LED1
bool
default y
depends on TEST_KCONFIG
help
Enable auto initalization of LED1 if present
config MODULE_AUTO_INIT_LED2
bool
default y
depends on TEST_KCONFIG
help
Enable auto initalization of LED2 if present
config MODULE_AUTO_INIT_LED3
bool
default y
depends on TEST_KCONFIG
help
Enable auto initalization of LED3 if present
config MODULE_AUTO_INIT_LED4
bool
default y
depends on TEST_KCONFIG
help
Enable auto initalization of LED4 if present
config MODULE_AUTO_INIT_LED5
bool
default y
depends on TEST_KCONFIG
help
Enable auto initalization of LED5 if present
config MODULE_AUTO_INIT_LED6
bool
default y
depends on TEST_KCONFIG
help
Enable auto initalization of LED6 if present
config MODULE_AUTO_INIT_LED7
bool
default y
depends on TEST_KCONFIG
help
Enable auto initalization of LED7 if present

View File

@ -23,7 +23,4 @@
void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
}

View File

@ -25,9 +25,6 @@
void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT); /* Red LED */
/* initialize the screen backlight, turn it off by default */
gpio_init(BACKLIGHT_PIN, GPIO_OUT);
gpio_clear(BACKLIGHT_PIN);

View File

@ -56,7 +56,4 @@ mtd_dev_t *mtd0 = (mtd_dev_t *)&samd51_nor_dev;
void board_init(void)
{
/* initialize the on-board LED */
gpio_init(LED0_PIN, GPIO_OUT);
LED0_OFF;
}

View File

@ -24,7 +24,4 @@
void board_init(void)
{
/* initialize the board's single LED */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
}

View File

@ -23,8 +23,4 @@
void board_init(void)
{
/* initialize LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
}

View File

@ -19,11 +19,7 @@
*/
#include "board.h"
#include "cpu.h"
void led_init(void);
void board_init(void)
{
led_init();
}

View File

@ -1,34 +0,0 @@
/*
* Copyright (C) 2017 Thomas Perrot <thomas.perrot@tupi.fr>
*
* 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_arduino-leonardo
* @{
*
* @file
* @brief Board specific led initialization for Arduino Leonardo
*
* @author Thomas Perrot <thomas.perrot@tupi.fr>
*
* @}
*/
#include "board.h"
#include "cpu.h"
#include "periph/gpio.h"
void led_init(void)
{
/* initialize the on-board LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
LED0_OFF;
gpio_init(LED1_PIN, GPIO_OUT);
LED2_OFF;
gpio_init(LED2_PIN, GPIO_OUT);
LED2_OFF;
}

View File

@ -25,14 +25,4 @@
void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT); /* Orange LED */
gpio_init(LED1_PIN, GPIO_OUT); /* Red LED */
gpio_set(LED1_PIN);
gpio_init(LED2_PIN, GPIO_OUT); /* Green LED */
gpio_set(LED2_PIN);
gpio_init(LED3_PIN, GPIO_OUT); /* Blue LED */
gpio_set(LED3_PIN);
gpio_init(LED4_PIN, GPIO_OUT); /* PWR LED */
gpio_clear(LED4_PIN);
}

View File

@ -23,6 +23,4 @@
void board_init(void)
{
/* initialize the on-board "Yellow" LED */
gpio_init(LED0_PIN, GPIO_OUT);
}

View File

@ -1,27 +0,0 @@
/*
* Copyright (C) 2019 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_atmega256rfr2-xpro
* @{
*
* @file
* @brief Board specific implementation for the Atmega256RFR2 Xplained Pro
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*
* @}
*/
#include "board.h"
void led_init(void)
{
LED0_ENABLE_PORT;
LED0_OFF;
}

View File

@ -1,29 +0,0 @@
/*
* Copyright (C) 2019 Robert Olsson <roolss@kth.se>
*
* 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_avr-rss2
* @{
*
* @file
* @brief Board specific LED initialization
* @author Robert Olsson <roolss@kth.se>
*
*
* @}
*/
#include "board.h"
void led_init(void)
{
/* Ports Pins as Output */
LED_PORT_DDR |= LED1_MASK | LED0_MASK;
/* All LEDs OFF */
LED_PORT |= (LED1_MASK | LED0_MASK);
}

View File

@ -34,4 +34,7 @@ config BOARD_B_L072Z_LRWAN1
select HAVE_SAUL_GPIO
config MODULE_PERIPH_INIT_LED0
default n if MODULE_PERIPH_SPI
source "$(RIOTBOARD)/common/stm32/Kconfig"

View File

@ -5,3 +5,8 @@ endif
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
endif
ifneq (,$(filter periph_spi,$(USEMODULE)))
# The LED pin is also used for SPI
DISABLE_MODULE += periph_init_led0
endif

View File

@ -28,14 +28,4 @@ void board_init(void)
gpio_init(RADIO_TCXO_VCC_PIN, GPIO_OUT);
gpio_set(RADIO_TCXO_VCC_PIN);
#endif
#ifdef AUTO_INIT_LED0
/* The LED pin is also used for SPI, so we enable it
only if explicitly wanted by the user */
gpio_init(LED0_PIN, GPIO_OUT);
#endif
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_init(LED3_PIN, GPIO_OUT);
}

View File

@ -31,7 +31,7 @@ extern "C" {
*/
static const saul_gpio_params_t saul_gpio_params[] =
{
#ifdef AUTO_INIT_LED0
#ifdef MODULE_PERIPH_INIT_LED0
{
.name = "LD2(red)",
.pin = LED0_PIN,

View File

@ -36,4 +36,7 @@ config BOARD_B_L475E_IOT01A
select HAVE_LPS22HB
select HAVE_LSM6DSL
config MODULE_PERIPH_INIT_LED0
default n if MODULE_PERIPH_SPI
source "$(RIOTBOARD)/common/stm32/Kconfig"

View File

@ -5,3 +5,8 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += lps22hb
USEMODULE += lsm6dsl
endif
ifneq (,$(filter periph_spi,$(USEMODULE)))
# The LED pin is also used for SPI
DISABLE_MODULE += periph_init_led0
endif

View File

@ -23,9 +23,4 @@
void board_init(void)
{
#ifdef AUTO_INIT_LED0
/* The LED pin is also used for SPI, so we enable it
only if explicitly wanted by the user */
gpio_init(LED0_PIN, GPIO_OUT);
#endif
}

View File

@ -31,7 +31,7 @@ extern "C" {
*/
static const saul_gpio_params_t saul_gpio_params[] =
{
#ifdef AUTO_INIT_LED0
#ifdef MODULE_PERIPH_INIT_LED0
/* The LED pin is also used for SPI, so we enable it
only if explicitly wanted by the user */
{

View File

@ -25,4 +25,7 @@ config BOARD_B_U585I_IOT02A
select HAVE_HTS221
select HAVE_LPS22HH
config MODULE_PERIPH_INIT_LED0
default n if MODULE_PERIPH_SPI
source "$(RIOTBOARD)/common/stm32/Kconfig"

View File

@ -3,3 +3,8 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += hts221
USEMODULE += lps22hh
endif
ifneq (,$(filter periph_spi,$(USEMODULE)))
# The LED pin is also used for SPI
DISABLE_MODULE += periph_init_led0
endif

View File

@ -23,11 +23,4 @@
void board_init(void)
{
#ifdef AUTO_INIT_LED0
/* The LED pin is also used for SPI, so we enable it
only if explicitly wanted by the user */
gpio_init(LED0_PIN, GPIO_OUT);
#endif
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
}

View File

@ -31,7 +31,7 @@ extern "C" {
*/
static const saul_gpio_params_t saul_gpio_params[] =
{
#ifdef AUTO_INIT_LED0
#ifdef MODULE_PERIPH_INIT_LED0
/* The LED pin is also used for SPI, so we enable it
only if explicitly wanted by the user */
{

View File

@ -31,8 +31,6 @@
void board_init(void)
{
/* initialize the boards LED */
gpio_init(LED0_PIN, GPIO_OUT);
#ifdef TX_SWITCH_PWR_PIN
/* Enables pwr to the Antenna switch circuit */

View File

@ -24,6 +24,4 @@
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
LED0_OFF;
}

View File

@ -27,6 +27,4 @@
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}

View File

@ -25,6 +25,4 @@
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}

View File

@ -27,6 +27,4 @@
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}

View File

@ -25,6 +25,4 @@
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}

View File

@ -30,9 +30,4 @@
*/
void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_init(LED3_PIN, GPIO_OUT);
}

View File

@ -27,6 +27,4 @@
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}

View File

@ -25,6 +25,4 @@
*/
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}

View File

@ -1,34 +0,0 @@
/*
* Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
* 2015-18 Kaspar Schleiser <kaspar@schleiser.de>
* 2016 Laurent Navet <laurent.navet@gmail.com>
*
* 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_common_arduino-atmega
* @{
*
* @file
* @brief Common led initialization for Arduino Atmega boards
*
* @author Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
* @author Kaspar Schleiser <kaspar@schleiser.de>
* @author Laurent Navet <laurent.navet@gmail.com>
*
* @}
*/
#include "board.h"
#include "cpu.h"
#include "periph/gpio.h"
void __attribute__((weak)) led_init(void)
{
/* initialize the on-board LED */
gpio_init(LED0_PIN, GPIO_OUT);
LED0_OFF;
}

View File

@ -24,6 +24,4 @@
void board_init(void)
{
/* initialize the on-board Amber "L" LED @ pin PB27 */
gpio_init(LED0_PIN, GPIO_OUT);
}

View File

@ -25,6 +25,4 @@
void board_init(void)
{
/* initialize the on-board Amber "L" LED */
gpio_init(LED0_PIN, GPIO_OUT);
}

View File

@ -27,6 +27,4 @@
void board_init(void)
{
/* initialize the on-board Amber "L" LED on pin PA17 */
gpio_init(LED0_PIN, GPIO_OUT);
}

View File

@ -19,14 +19,7 @@
*/
#include "board.h"
#include "cpu.h"
#include "periph/gpio.h"
void led_init(void);
void __attribute__((weak)) board_init(void)
{
#ifdef LED0_ON
led_init();
#endif
}

View File

@ -21,17 +21,6 @@
#include "board.h"
#include "cpu.h"
#ifdef LED_PORT
void __attribute__((weak)) led_init(void)
{
LED_PORT.DIR = LED_PORT_MASK;
LED_PORT.OUT = LED_PORT_MASK;
}
#endif
void __attribute__((weak)) board_init(void)
{
#ifdef LED_PORT
led_init();
#endif
}

View File

@ -27,5 +27,4 @@
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
}

View File

@ -26,10 +26,6 @@ extern void pm_reboot(void*);
void board_init(void)
{
/* initialize the boards LEDs */
LED_PORT->DIRSET = (LED_MASK);
LED_PORT->OUTSET = (LED_MASK);
/* configure software RST button */
#ifdef MODULE_BOARD_SOFTWARE_RESET
gpio_init_int(BTN0_PIN, BTN0_MODE, GPIO_FALLING,

View File

@ -32,18 +32,6 @@
void board_init_common(void)
{
#ifdef LED0_PIN
gpio_init (LED0_PIN, GPIO_OUT);
LED0_OFF;
#endif
#ifdef LED1_PIN
gpio_init (LED1_PIN, GPIO_OUT);
LED1_OFF;
#endif
#ifdef LED2_PIN
gpio_init (LED2_PIN, GPIO_OUT);
LED2_OFF;
#endif
}
extern void adc_print_config(void);

View File

@ -29,18 +29,6 @@ extern "C" {
void board_init(void)
{
#ifdef LED0_PIN
gpio_init (LED0_PIN, GPIO_OUT);
LED0_OFF;
#endif
#ifdef LED1_PIN
gpio_init (LED1_PIN, GPIO_OUT);
LED1_OFF;
#endif
#ifdef LED2_PIN
gpio_init (LED2_PIN, GPIO_OUT);
LED2_OFF;
#endif
}
extern void adc_print_config(void);

View File

@ -23,11 +23,4 @@
void board_init(void)
{
/* initialize the boards LEDs and turn them off */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_set(LED1_PIN);
gpio_set(LED2_PIN);
}

View File

@ -21,31 +21,6 @@
#include "board.h"
#include "periph/gpio.h"
static void led_init(void)
{
/* initialize and turn off LEDs */
#ifdef LED0_PIN
gpio_init(LED0_PIN, GPIO_OUT);
LED0_OFF;
#endif
#ifdef LED1_PIN
gpio_init(LED1_PIN, GPIO_OUT);
LED1_OFF;
#endif
#ifdef LED2_PIN
gpio_init(LED2_PIN, GPIO_OUT);
LED2_OFF;
#endif
#ifdef LED3_PIN
gpio_init(LED3_PIN, GPIO_OUT);
LED3_OFF;
#endif
}
void board_init(void)
{
/* initialize LEDs, skip for riotboot */
if (!IS_ACTIVE(RIOTBOOT)) {
led_init();
}
}

View File

@ -23,8 +23,4 @@
void board_init(void)
{
/* initialize the boards LEDs */
LED_PORT->DIRSET = (LED_MASK);
LED_PORT->OUTSET = (LED_MASK);
}

View File

@ -28,25 +28,6 @@
* @}
*/
#include "board.h"
#include "board_nucleo.h"
#include "periph/gpio.h"
void board_common_nucleo_init(void)
{
/* initialization of on-board LEDs
* NOTE: LED0 must be explicitly enabled as it is also used for SPI_DEV(0) */
#ifdef AUTO_INIT_LED0
gpio_init(LED0_PIN, GPIO_OUT);
#endif
#ifdef LED1_PIN
gpio_init(LED1_PIN, GPIO_OUT);
#endif
#ifdef LED2_PIN
gpio_init(LED2_PIN, GPIO_OUT);
#endif
}
/*
* Allow overwriting board_init if common implementation doesn't work.
* If at link time another implementation of board_init() not marked as weak
@ -54,5 +35,4 @@ void board_common_nucleo_init(void)
*/
void __attribute__((weak)) board_init(void)
{
board_common_nucleo_init();
}

View File

@ -55,11 +55,6 @@ extern "C" {
#endif
/** @} */
/**
* @brief Common board initialization routine for Nucleo boards
*/
void board_common_nucleo_init(void);
/**
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
*/

View File

@ -69,11 +69,6 @@ extern "C" {
#define LED2_ON (LED2_PORT->BSRR = LED2_MASK)
#define LED2_OFF (LED2_PORT->BSRR = (LED2_MASK << 16))
#define LED2_TOGGLE (LED2_PORT->ODR ^= LED2_MASK)
/* the Nucleo144 boards always use LED0, as there is no dual use of its pin */
#ifndef AUTO_INIT_LED0
#define AUTO_INIT_LED0
#endif
/** @} */
/**

View File

@ -12,5 +12,8 @@ config BOARD_COMMON_NUCLEO32
# Clock configuration
select BOARD_HAS_LSE if (CPU_FAM_L0 || CPU_FAM_L4) && !BOARD_NUCLEO_L011K4
config MODULE_PERIPH_INIT_LED0
default n if MODULE_PERIPH_SPI
source "$(RIOTBOARD)/common/nucleo/Kconfig"
source "$(RIOTBOARD)/common/stm32/Kconfig"

View File

@ -0,0 +1,6 @@
ifneq (,$(filter periph_spi,$(USEMODULE)))
# The LED pin is also used for SPI
DISABLE_MODULE += periph_init_led0
endif
include $(RIOTBOARD)/common/nucleo/Makefile.dep

View File

@ -26,7 +26,7 @@
extern "C" {
#endif
#ifndef AUTO_INIT_LED0
#ifndef MODULE_PERIPH_INIT_LED0
#define SAUL_GPIO_NUMOF (0U)
#else
/**
@ -40,7 +40,7 @@ static const saul_gpio_params_t saul_gpio_params[] =
.mode = GPIO_OUT
}
};
#endif /* AUTO_INIT_LED0 */
#endif /* MODULE_PERIPH_INIT_LED0 */
#ifdef __cplusplus
}

View File

@ -13,5 +13,8 @@ config BOARD_COMMON_NUCLEO64
select BOARD_HAS_HSE if !CPU_FAM_G0 && !CPU_FAM_L0 && !CPU_FAM_L1 && !CPU_FAM_L4
select BOARD_HAS_LSE if !BOARD_NUCLEO_L152RE
config MODULE_PERIPH_INIT_LED0
default n if MODULE_PERIPH_SPI
source "$(RIOTBOARD)/common/nucleo/Kconfig"
source "$(RIOTBOARD)/common/stm32/Kconfig"

View File

@ -0,0 +1,6 @@
ifneq (,$(filter periph_spi,$(USEMODULE)))
# The LED pin is also used for SPI
DISABLE_MODULE += periph_init_led0
endif
include $(RIOTBOARD)/common/nucleo/Makefile.dep

View File

@ -32,7 +32,7 @@ extern "C" {
*/
static const saul_gpio_params_t saul_gpio_params[] =
{
#ifdef AUTO_INIT_LED0
#ifdef MODULE_PERIPH_INIT_LED0
{
.name = "LED(green)",
.pin = LED0_PIN,

View File

@ -73,14 +73,6 @@ void post_startup(void)
void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_set(LED1_PIN);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED2_PIN);
gpio_init(VCTL1_PIN, GPIO_OUT);
#ifdef VCTL2_PIN
/* On boards without VCLT2_PIN (Boron), the VCTL2 net is driven by NOT(VCTL1) */
@ -88,5 +80,4 @@ void board_init(void)
#endif
board_nrfantenna_select(BOARD_NRFANTENNA_DEFAULT);
}

View File

@ -19,24 +19,8 @@
* @}
*/
#include "cpu.h"
#include "board.h"
#include "periph/gpio.h"
void led_init(void);
void board_init(void)
{
/* initialize the boards LEDs */
led_init();
}
/**
* @brief Initialize the boards on-board LED
*/
void led_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
LED0_OFF;
}

View File

@ -42,10 +42,6 @@ void board_common_init(void)
bc_init();
#endif
/* initialize the LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
/* initialize the push buttons */
gpio_init(PB0_PIN, GPIO_IN);
gpio_init(PB1_PIN, GPIO_IN);

View File

@ -23,7 +23,4 @@
void board_init(void)
{
/* initialize the on-board LED */
gpio_init(LED0_PIN, GPIO_OUT);
}

View File

@ -56,6 +56,4 @@ mtd_dev_t *mtd0 = (mtd_dev_t *)&weact_nor_dev;
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
LED0_OFF;
}

View File

@ -25,13 +25,4 @@
void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_set(LED1_PIN);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED2_PIN);
gpio_init(LED3_PIN, GPIO_OUT);
gpio_set(LED3_PIN);
}

View File

@ -24,10 +24,6 @@
void board_init(void)
{
#ifndef RIOTBOOT
/* initialize the LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
/* initialize the push buttons */
gpio_init(PB0_PIN, GPIO_IN);
gpio_init(PB1_PIN, GPIO_IN);

View File

@ -19,23 +19,7 @@
*/
#include "board.h"
static void leds_init(void);
void board_init(void)
{
/* initialize the boards LEDs, this is done for debugging purpose */
leds_init();
}
/**
* @brief initialize the boards on-boards LEDS.
*/
static void leds_init(void)
{
/* enable clock for PORTF */
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
/*configure the pins as general output */
ROM_GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3);
}

View File

@ -24,8 +24,4 @@
void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
}

View File

@ -24,6 +24,4 @@
void board_init(void)
{
/* initialize the on-board red LED on pin PA17 */
gpio_init(LED0_PIN, GPIO_OUT);
}

View File

@ -20,12 +20,6 @@
void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_clear(LED0_PIN);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_clear(LED1_PIN);
}
/** @} */

View File

@ -26,7 +26,6 @@ static inline void leds_init(void);
void board_init(void)
{
/* initialize the boards LEDs */
leds_init();
}
@ -38,10 +37,6 @@ void board_init(void)
*/
static inline void leds_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
/* Shoot rainbows */
LED_RAINBOW();
}

View File

@ -25,11 +25,4 @@
void board_init(void)
{
/* initialize and turn off the on-board RGB-LED */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_set(LED1_PIN);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED2_PIN);
}

View File

@ -27,13 +27,4 @@ void board_init(void)
/* RMII RXCLK pin configuration */
SIM->SCGC5 |= SIM_SCGC5_PORTA_MASK;
PORTA->PCR[18] &= ~(PORT_PCR_ISF_MASK | PORT_PCR_MUX(0x07));
/* initialize and turn off the on-board RGB-LED */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_set(LED1_PIN);
gpio_set(LED2_PIN);
}

View File

@ -23,9 +23,4 @@
void board_init(void)
{
/* initialize and turn off the on-board RGB-LED */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_set(LED1_PIN);
}

View File

@ -25,7 +25,4 @@
void board_init(void)
{
/* initialize the on-board LED */
gpio_init(LED0_PIN, GPIO_OUT);
}

View File

@ -24,13 +24,4 @@
void board_init(void)
{
/* Configure GPIOs for LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
/* Turn all the LEDs off */
LED0_OFF;
LED1_OFF;
LED2_OFF;
}

View File

@ -24,13 +24,4 @@
void board_init(void)
{
/* Configure GPIOs for LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
/* Turn all the LEDs off */
LED0_OFF;
LED1_OFF;
LED2_OFF;
}

View File

@ -55,12 +55,6 @@ mtd_dev_t *mtd0 = (mtd_dev_t *)&ikea_tradfri_nor_dev;
void board_init(void)
{
#ifndef RIOTBOOT
/* initialize the LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
#endif
#ifdef MODULE_MTD
/* enable NOR flash (only on the ICC-1-A) */
if (gpio_is_valid(IKEA_TRADFRI_NOR_EN)) {

View File

@ -23,6 +23,4 @@
void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
}

View File

@ -22,6 +22,5 @@
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(EN3V3_PIN, GPIO_OUT);
}

View File

@ -30,12 +30,6 @@
void board_init(void)
{
/* initialization of on-board LEDs */
#ifdef AUTO_INIT_LED0
gpio_init(LED0_PIN, GPIO_OUT);
LED0_OFF;
#endif
if(IS_ACTIVE(CONFIG_LORA_E5_DEV_ENABLE_3P3V)) {
gpio_init(LORA_E5_DEV_3P3V_ENABLE_PIN, GPIO_OUT);
gpio_set(LORA_E5_DEV_3P3V_ENABLE_PIN);

View File

@ -54,15 +54,6 @@ extern void lora_e5_dev_sx126x_set_rf_mode(sx126x_t *dev, sx126x_rf_mode_t rf_mo
#define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
/** @} */
/**
* @brief Lora-E5-Dev always use LED0, as there is no dual use of its pin
* @{
*/
#ifndef AUTO_INIT_LED0
#define AUTO_INIT_LED0
#endif
/** @} */
/**
* @name User button
* @{

View File

@ -32,13 +32,11 @@ extern "C" {
*/
static const saul_gpio_params_t saul_gpio_params[] =
{
#ifdef AUTO_INIT_LED0
{
.name = "LED(red)",
.pin = LED0_PIN,
.mode = GPIO_OUT
},
#endif
{
.name = "Button(B1 Boot)",
.pin = BTN0_PIN,

View File

@ -23,6 +23,4 @@
void board_init(void)
{
/* initialize the boards LED */
gpio_init(LED0_PIN, GPIO_OUT);
}

View File

@ -25,26 +25,8 @@
extern void SystemInit(void);
/**
* @brief Initialize the on-board LEDs.
*/
static void leds_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_init(LED3_PIN, GPIO_OUT);
LED0_OFF;
LED1_OFF;
LED2_OFF;
LED3_OFF;
}
void board_init(void)
{
/* initialize core clocks via CMSIS function */
SystemInit();
/* initialize the boards LEDs */
leds_init();
}

View File

@ -24,7 +24,6 @@
#include "cpu.h"
#include "mtd.h"
#include "periph/init.h"
#include "stdio_base.h"
#ifdef MODULE_MTD_MCI
extern const mtd_desc_t mtd_mci_driver;
@ -34,7 +33,4 @@ mtd_dev_t *mtd0 = &_mtd_mci;
void board_init(void)
{
/* LEDS */
FIO2DIR |= LED0_MASK | LED1_MASK | LED2_MASK | LED3_MASK \
| LED4_MASK | LED5_MASK | LED6_MASK | LED7_MASK;
}

View File

@ -1,38 +0,0 @@
/*
* Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
* 2015-18 Kaspar Schleiser <kaspar@schleiser.de>
* 2016 Laurent Navet <laurent.navet@gmail.com>
* 2018 Matthew Blue <matthew.blue.neuro@gmail.com>
*
* 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_mega-xplained
* @{
*
* @file
* @brief Board specific implementation for the Mega Xplained
*
* @author Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
* @author Kaspar Schleiser <kaspar@schleiser.de>
* @author Laurent Navet <laurent.navet@gmail.com>
* @author Matthew Blue <matthew.blu.neuro@gmail.com>
*
* @}
*/
#include "board.h"
void led_init(void)
{
/* LED0,2 currently unsupported due to lack of GPIO_OD support */
LED1_ENABLE_PORT;
LED1_OFF;
LED3_ENABLE_PORT;
LED3_OFF;
}

View File

@ -38,10 +38,4 @@ mtd_dev_t *mtd0 = &_mtd_mci;
void board_init(void)
{
/* LEDS */
FIO3DIR |= LED0_MASK;
FIO3DIR |= LED1_MASK;
LED0_OFF;
LED0_OFF;
}

View File

@ -25,7 +25,6 @@ static void gpios_init(void);
void board_init(void)
{
/* initialize the boards LEDs */
gpios_init();
}
@ -44,9 +43,6 @@ void board_init(void)
*/
static void gpios_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_init(BUTTON0_PIN, GPIO_IN);
gpio_init(BUTTON1_PIN, GPIO_IN);
}

View File

@ -93,10 +93,6 @@ void board_init(void)
{
int status;
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
/* Initialize power control pins */
power_pins_init();

View File

@ -78,8 +78,5 @@ VFS_AUTO_MOUNT(fatfs, VFS_MTD(mtd0_dev), "/nvm", 0);
*/
void board_init(void)
{
LED0_OFF;
LED1_ON;
puts("RIOT native board initialized.");
}

View File

@ -23,20 +23,9 @@
void board_init(void)
{
/* initialize the board LEDs, set pins as output and turn LEDs off */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_init(LED3_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_set(LED1_PIN);
gpio_set(LED2_PIN);
gpio_set(LED3_PIN);
/* 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);
}

View File

@ -23,9 +23,5 @@
void board_init(void)
{
/* initialize the boards LEDs, set pins as output and turn LEDs off */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_init(LED2_PIN, GPIO_OUT);
}

View File

@ -25,12 +25,5 @@
void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_set(LED1_PIN);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED2_PIN);
}

View File

@ -25,12 +25,5 @@
void board_init(void)
{
/* initialize the board's RGB LED */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_set(LED1_PIN);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED2_PIN);
}

View File

@ -25,12 +25,5 @@
void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_set(LED1_PIN);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED2_PIN);
}

View File

@ -25,16 +25,6 @@
void board_init(void)
{
/* initialize the board's single LED */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
/* initialize the board's RGB LED */
gpio_init(LED1_PIN, GPIO_OUT);
gpio_set(LED1_PIN);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED2_PIN);
gpio_init(LED3_PIN, GPIO_OUT);
gpio_set(LED3_PIN);
}

View File

@ -28,5 +28,4 @@ void board_init(void)
/* initialize and turn off on-board LEDs */
NRF_GPIO->DIRSET = (LED0_MASK | LED1_MASK | LED2_MASK);
NRF_GPIO->OUTSET = (LED0_MASK | LED1_MASK | LED2_MASK);
}

View File

@ -24,14 +24,6 @@
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_clear(LED0_PIN);
gpio_init(LED1_PIN, GPIO_OUT);
gpio_clear(LED1_PIN);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_clear(LED2_PIN);
gpio_init(LED3_PIN, GPIO_OUT);
gpio_clear(LED3_PIN);
gpio_init(BTN0_PIN, BTN0_MODE);
gpio_init(BTN1_PIN, BTN1_MODE);

View File

@ -1 +1 @@
include $(RIOTBOARD)/common/nucleo/Makefile.dep
include $(RIOTBOARD)/common/nucleo64/Makefile.dep

View File

@ -1 +1 @@
include $(RIOTBOARD)/common/nucleo/Makefile.dep
include $(RIOTBOARD)/common/nucleo32/Makefile.dep

View File

@ -1 +1 @@
include $(RIOTBOARD)/common/nucleo/Makefile.dep
include $(RIOTBOARD)/common/nucleo32/Makefile.dep

View File

@ -1 +1 @@
include $(RIOTBOARD)/common/nucleo/Makefile.dep
include $(RIOTBOARD)/common/nucleo64/Makefile.dep

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