diff --git a/boards/arduino-common/Makefile.dep b/boards/arduino-common/Makefile.dep new file mode 100644 index 0000000000000000000000000000000000000000..5472bf8b8d8fd463a18815c0f10e5d348f90fe51 --- /dev/null +++ b/boards/arduino-common/Makefile.dep @@ -0,0 +1,3 @@ +ifneq (,$(filter saul_default,$(USEMODULE))) + USEMODULE += saul_gpio +endif diff --git a/boards/arduino-common/Makefile.include b/boards/arduino-common/Makefile.include index 3b357838c7d2e7eed3c9fa4a3197a480f98c2e9c..e41cc78bed8681b98f39b661df22994339adc09b 100644 --- a/boards/arduino-common/Makefile.include +++ b/boards/arduino-common/Makefile.include @@ -1,6 +1,9 @@ # define the cpu used by the arduino uno and duemilanove boards export CPU = atmega328p +# include optional dependencies +include $(RIOTBOARD)/arduino-common/Makefile.dep + # define port used to flash the board OS = $(shell uname) ifeq ($(OS),Linux) diff --git a/boards/arduino-common/include/gpio_params.h b/boards/arduino-common/include/gpio_params.h new file mode 100644 index 0000000000000000000000000000000000000000..bb502a0c2e60c7f13a4bff8596ab7c13388b9c5c --- /dev/null +++ b/boards/arduino-common/include/gpio_params.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2016 Freie Universität Berlin + * + * 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-common + * @{ + * + * @file + * @brief Board specific configuration of direct mapped GPIOs + * + * @author Hauke Petersen <hauke.petersen@fu-berlin.de> + */ + +#ifndef GPIO_PARAMS_H +#define GPIO_PARAMS_H + +#include "board.h" +#include "saul/periph.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief LED configuration + */ +static const saul_gpio_params_t saul_gpio_params[] = +{ + { + .name = "LED", + .pin = LED0_PIN, + .mode = GPIO_OUT + } +}; + +#ifdef __cplusplus +} +#endif + +#endif /* GPIO_PARAMS_H */ +/** @} */