diff --git a/boards/remote-common/Makefile.dep b/boards/remote-common/Makefile.dep index c469001389..ffda1d988e 100644 --- a/boards/remote-common/Makefile.dep +++ b/boards/remote-common/Makefile.dep @@ -4,6 +4,8 @@ ifneq (,$(filter gnrc_netdev_default,$(USEMODULE))) USEMODULE += gnrc_netdev USEMODULE += netdev_ieee802154 endif + ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio + USEMODULE += saul_adc endif diff --git a/boards/remote-pa/include/adc_params.h b/boards/remote-pa/include/adc_params.h new file mode 100644 index 0000000000..9c1f348ab5 --- /dev/null +++ b/boards/remote-pa/include/adc_params.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2016 Eistec AB + * + * 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_remote + * @{ + * + * @file + * @brief Board specific configuration of direct mapped ADC + * + * @author Joakim Nohlgård + * @author Antonio Lignan + */ + +#ifndef ADC_PARAMS_H +#define ADC_PARAMS_H + +#include "board.h" +#include "saul/periph.h" +#include "periph/adc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief ADC configuration + */ +static const saul_adc_params_t saul_adc_params[] = +{ + { + .name = "ADC2", + .line = ADC_LINE(0), + .res = ADC_RES_12BIT, + }, + { + .name = "ADC3", + .line = ADC_LINE(1), + .res = ADC_RES_12BIT, + } +}; + +#ifdef __cplusplus +} +#endif + +#endif /* ADC_PARAMS_H */ +/** @} */ diff --git a/boards/remote-reva/include/adc_params.h b/boards/remote-reva/include/adc_params.h new file mode 100644 index 0000000000..c900322539 --- /dev/null +++ b/boards/remote-reva/include/adc_params.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2016 Eistec AB + * + * 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_remote + * @{ + * + * @file + * @brief Board specific configuration of direct mapped ADC + * + * @author Joakim Nohlgård + * @author Antonio Lignan + */ + +#ifndef ADC_PARAMS_H +#define ADC_PARAMS_H + +#include "board.h" +#include "saul/periph.h" +#include "periph/adc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief ADC configuration + */ +static const saul_adc_params_t saul_adc_params[] = +{ + { + .name = "ADC1", + .line = ADC_LINE(0), + .res = ADC_RES_12BIT, + }, + { + .name = "ADC2", + .line = ADC_LINE(1), + .res = ADC_RES_12BIT, + }, + { + .name = "ADC3", + .line = ADC_LINE(2), + .res = ADC_RES_12BIT, + } +}; + +#ifdef __cplusplus +} +#endif + +#endif /* ADC_PARAMS_H */ +/** @} */ diff --git a/boards/remote-revb/include/adc_params.h b/boards/remote-revb/include/adc_params.h new file mode 100644 index 0000000000..aa148afda6 --- /dev/null +++ b/boards/remote-revb/include/adc_params.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2016 Eistec AB + * + * 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_remote + * @{ + * + * @file + * @brief Board specific configuration of direct mapped ADC in Revision B + * + * @author Joakim Nohlgård + * @author Antonio Lignan + */ + +#ifndef ADC_PARAMS_H +#define ADC_PARAMS_H + +#include "board.h" +#include "saul/periph.h" +#include "periph/adc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief ADC configuration + */ +static const saul_adc_params_t saul_adc_params[] = +{ + { + .name = "ADC1", + .line = ADC_LINE(0), + .res = ADC_RES_12BIT, + }, + { + .name = "ADC2", + .line = ADC_LINE(1), + .res = ADC_RES_12BIT, + }, + { + .name = "ADC3", + .line = ADC_LINE(2), + .res = ADC_RES_12BIT, + } +}; + +#ifdef __cplusplus +} +#endif + +#endif /* ADC_PARAMS_H */ +/** @} */