Skip to content
Snippets Groups Projects
Commit 2d748ab5 authored by Hauke Petersen's avatar Hauke Petersen
Browse files

boards/arduino-due: unified LED defines

parent 8eeac35b
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......@@ -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)
/** @} */
/**
* @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)
#define LED0_PIN GPIO_PIN(PB, 27)
/* 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)
/** @} */
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment