Skip to content

Commit

Permalink
boards: drop LED init
Browse files Browse the repository at this point in the history
this is handled by auto_init_leds now
  • Loading branch information
benpicco committed Feb 15, 2022
1 parent 87bce41 commit 13ffe88
Show file tree
Hide file tree
Showing 139 changed files with 42 additions and 719 deletions.
6 changes: 0 additions & 6 deletions boards/6lowpan-clicker/clicker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
3 changes: 0 additions & 3 deletions boards/acd52832/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@

void board_init(void)
{
/* initialize the boards LEDs */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
}
3 changes: 0 additions & 3 deletions boards/adafruit-clue/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions boards/adafruit-itsybitsy-m4/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 0 additions & 3 deletions boards/adafruit-itsybitsy-nrf52/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,4 @@

void board_init(void)
{
/* initialize the board's single LED */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
}
4 changes: 0 additions & 4 deletions boards/alientek-pandora/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
7 changes: 0 additions & 7 deletions boards/arduino-leonardo/led_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,4 @@

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;
}
10 changes: 0 additions & 10 deletions boards/arduino-nano-33-ble/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 0 additions & 2 deletions boards/arduino-nano-33-iot/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,4 @@

void board_init(void)
{
/* initialize the on-board "Yellow" LED */
gpio_init(LED0_PIN, GPIO_OUT);
}
2 changes: 0 additions & 2 deletions boards/atmega256rfr2-xpro/led_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@

void led_init(void)
{
LED0_ENABLE_PORT;
LED0_OFF;
}
2 changes: 1 addition & 1 deletion boards/avr-rss2/led_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ void led_init(void)
/* Ports Pins as Output */
LED_PORT_DDR |= LED1_MASK | LED0_MASK;
/* All LEDs OFF */
LED_PORT |= (LED1_MASK | LED0_MASK);
LED_PORT |= LED1_MASK | LED0_MASK;
}
5 changes: 5 additions & 0 deletions boards/b-l072z-lrwan1/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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 += auto_init_led0
endif
10 changes: 0 additions & 10 deletions boards/b-l072z-lrwan1/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion boards/b-l072z-lrwan1/include/gpio_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern "C" {
*/
static const saul_gpio_params_t saul_gpio_params[] =
{
#ifdef AUTO_INIT_LED0
#ifdef MODULE_AUTO_INIT_LED0
{
.name = "LD2(red)",
.pin = LED0_PIN,
Expand Down
5 changes: 5 additions & 0 deletions boards/b-l475e-iot01a/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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 += auto_init_led0
endif
5 changes: 0 additions & 5 deletions boards/b-l475e-iot01a/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion boards/b-l475e-iot01a/include/gpio_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern "C" {
*/
static const saul_gpio_params_t saul_gpio_params[] =
{
#ifdef AUTO_INIT_LED0
#ifdef MODULE_AUTO_INIT_LED0
/* The LED pin is also used for SPI, so we enable it
only if explicitly wanted by the user */
{
Expand Down
5 changes: 5 additions & 0 deletions boards/b-u585i-iot02a/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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 += auto_init_led0
endif
7 changes: 0 additions & 7 deletions boards/b-u585i-iot02a/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion boards/b-u585i-iot02a/include/gpio_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern "C" {
*/
static const saul_gpio_params_t saul_gpio_params[] =
{
#ifdef AUTO_INIT_LED0
#ifdef MODULE_AUTO_INIT_LED0
/* The LED pin is also used for SPI, so we enable it
only if explicitly wanted by the user */
{
Expand Down
2 changes: 0 additions & 2 deletions boards/bastwan/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 0 additions & 2 deletions boards/bluepill-stm32f030c8/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@

void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
LED0_OFF;
}
2 changes: 0 additions & 2 deletions boards/cc1312-launchpad/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,4 @@

void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}
2 changes: 0 additions & 2 deletions boards/cc1350-launchpad/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@

void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}
2 changes: 0 additions & 2 deletions boards/cc1352-launchpad/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,4 @@

void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}
2 changes: 0 additions & 2 deletions boards/cc1352p-launchpad/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@

void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}
5 changes: 0 additions & 5 deletions boards/cc2538dk/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 0 additions & 2 deletions boards/cc2650-launchpad/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,4 @@

void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}
2 changes: 0 additions & 2 deletions boards/cc2650stk/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@
*/
void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
gpio_init(LED1_PIN, GPIO_OUT);
}
3 changes: 0 additions & 3 deletions boards/common/arduino-atmega/led_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,4 @@

void __attribute__((weak)) led_init(void)
{
/* initialize the on-board LED */
gpio_init(LED0_PIN, GPIO_OUT);
LED0_OFF;
}
2 changes: 0 additions & 2 deletions boards/common/arduino-due/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@

void board_init(void)
{
/* initialize the on-board Amber "L" LED @ pin PB27 */
gpio_init(LED0_PIN, GPIO_OUT);
}
2 changes: 0 additions & 2 deletions boards/common/arduino-mkr/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@

void board_init(void)
{
/* initialize the on-board Amber "L" LED */
gpio_init(LED0_PIN, GPIO_OUT);
}
2 changes: 0 additions & 2 deletions boards/common/arduino-zero/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,4 @@

void board_init(void)
{
/* initialize the on-board Amber "L" LED on pin PA17 */
gpio_init(LED0_PIN, GPIO_OUT);
}
1 change: 0 additions & 1 deletion boards/common/blxxxpill/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@

void board_init(void)
{
gpio_init(LED0_PIN, GPIO_OUT);
}
4 changes: 0 additions & 4 deletions boards/common/e104-bt50xxa-tb/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 0 additions & 12 deletions boards/common/esp32/board_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 0 additions & 12 deletions boards/common/esp8266/board_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 0 additions & 7 deletions boards/common/iotlab/board_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
25 changes: 0 additions & 25 deletions boards/common/kw41z/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
4 changes: 0 additions & 4 deletions boards/common/nrf52xxxdk/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,4 @@

void board_init(void)
{
/* initialize the boards LEDs */
LED_PORT->DIRSET = (LED_MASK);
LED_PORT->OUTSET = (LED_MASK);

}
Loading

0 comments on commit 13ffe88

Please sign in to comment.