From 28e800d2d268cca73b4d135c93ea2a804b8196d2 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 30 Nov 2015 12:39:15 +0100 Subject: [PATCH] boards/samr21: add SAUL led parameters --- boards/samr21-xpro/include/board.h | 1 + boards/samr21-xpro/include/gpio_params.h | 48 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 boards/samr21-xpro/include/gpio_params.h diff --git a/boards/samr21-xpro/include/board.h b/boards/samr21-xpro/include/board.h index 7aa529cd5..dbbb9ee1e 100644 --- a/boards/samr21-xpro/include/board.h +++ b/boards/samr21-xpro/include/board.h @@ -68,6 +68,7 @@ extern "C" { */ #define LED_PORT PORT->Group[0] #define LED_PIN (19) +#define LED_GPIO GPIO_PIN(0, 19) /** @} */ /** diff --git a/boards/samr21-xpro/include/gpio_params.h b/boards/samr21-xpro/include/gpio_params.h new file mode 100644 index 000000000..fa1d6da52 --- /dev/null +++ b/boards/samr21-xpro/include/gpio_params.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2015 Freie Universität Berlin + * 2015 Kaspar Schleiser + * + * 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_samr21-xpro + * @{ + * + * @file + * @brief Board specific configuration of direct mapped GPIOs + * + * @author Hauke Petersen + * @author Kaspar Schleiser + */ + +#ifndef GPIO_PARAMS_H +#define GPIO_PARAMS_H + +#include "board.h" +#include "saul/periph.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief GPIO pin configuration + */ +static const saul_gpio_params_t saul_gpio_params[] = +{ + { + .name = "LED(orange)", + .pin = LED_GPIO, + .dir = GPIO_DIR_OUT, + }, +}; + +#ifdef __cplusplus +} +#endif + +#endif /* GPIO_PARAMS_H */ +/** @} */