From 2d748ab55be19f96f307cbca1f0d8f98f0ef904e Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Fri, 11 Mar 2016 17:57:38 +0100 Subject: [PATCH] boards/arduino-due: unified LED defines --- boards/arduino-due/board.c | 2 +- boards/arduino-due/include/board.h | 23 ++++------------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/boards/arduino-due/board.c b/boards/arduino-due/board.c index 8d24fddc60..9d116a371a 100644 --- a/boards/arduino-due/board.c +++ b/boards/arduino-due/board.c @@ -27,5 +27,5 @@ void board_init(void) /* initialize the CPU */ cpu_init(); /* initialize the on-board Amber "L" LED @ pin PB27 */ - gpio_init(LED_PIN, GPIO_DIR_OUT, GPIO_NOPULL); + gpio_init(LED0_PIN, GPIO_DIR_OUT, GPIO_NOPULL); } diff --git a/boards/arduino-due/include/board.h b/boards/arduino-due/include/board.h index 20453ec6d6..20d1c9708d 100644 --- a/boards/arduino-due/include/board.h +++ b/boards/arduino-due/include/board.h @@ -32,26 +32,11 @@ extern "C" { * @name LED pin definitions * @{ */ -#define LED_PORT PIOB -#define LED_BIT PIO_PB27 -#define LED_PIN GPIO_PIN(PB, 27) -/** @} */ +#define LED0_PIN GPIO_PIN(PB, 27) -/** - * @name Macros for controlling the on-board LEDs. - * @{ - */ -#define LED_ON (LED_PORT->PIO_SODR = LED_BIT) -#define LED_OFF (LED_PORT->PIO_CODR = LED_BIT) -#define LED_TOGGLE (LED_PORT->PIO_ODSR ^= LED_BIT) - -/* for compatability to other boards */ -#define LED_GREEN_ON LED_ON -#define LED_GREEN_OFF LED_OFF -#define LED_GREEN_TOGGLE LED_TOGGLE -#define LED_RED_ON /* not available */ -#define LED_RED_OFF /* not available */ -#define LED_RED_TOGGLE /* not available */ +#define LED0_ON (PIOB->PIO_SODR = PIO_PB27) +#define LED0_OFF (PIOB->PIO_CODR = PIO_PB27) +#define LED0_TOGGLE (PIOB->PIO_ODSR ^= PIO_PB27) /** @} */ /**