mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
53 lines
1.2 KiB
C
53 lines
1.2 KiB
C
/*
|
|
* Copyright (C) 2014-2016 Freie Universität Berlin
|
|
* 2015 Zolertia SL
|
|
*
|
|
* 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_common_remote
|
|
* @{
|
|
*
|
|
* @file
|
|
* @brief Common default ADC configuration for the RE-Mote board revision A
|
|
*
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
|
* @author Antonio Lignan <alinan@zolertia.com>
|
|
* @author Sebastian Meiling <s@mlng.net>
|
|
*/
|
|
|
|
#ifndef CFG_ADC_DEFAULT_H
|
|
#define CFG_ADC_DEFAULT_H
|
|
|
|
#include "periph_cpu.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @name ADC configuration
|
|
* @{
|
|
*/
|
|
#define SOC_ADC_ADCCON3_EREF SOC_ADC_ADCCON3_EREF_AVDD5
|
|
|
|
static const adc_conf_t adc_config[] = {
|
|
GPIO_PIN(PORT_A, 5), /**< GPIO_PA5 = ADC1_PIN */
|
|
GPIO_PIN(PORT_A, 4), /**< GPIO_PA4 = ADC2_PIN */
|
|
/* voltage divider with 5/3 relationship to allow 5V sensors */
|
|
GPIO_PIN(PORT_A, 2), /**< GPIO_PA2 = ADC3_PIN */
|
|
};
|
|
|
|
#define ADC_NUMOF ARRAY_SIZE(adc_config)
|
|
/** @} */
|
|
|
|
#ifdef __cplusplus
|
|
} /* end extern "C" */
|
|
#endif
|
|
|
|
#endif /* CFG_ADC_DEFAULT_H */
|
|
/** @} */
|