Loading...
Searching...
No Matches
cfg_adc_default.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014-2016 Freie Universität Berlin
3 * 2015 Zolertia SL
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
10#pragma once
11
23
24#include "periph_cpu.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#define SOC_ADC_ADCCON3_EREF SOC_ADC_ADCCON3_EREF_AVDD5
35
36static const adc_conf_t adc_config[] = {
37 GPIO_PIN(PORT_A, 5),
38 GPIO_PIN(PORT_A, 4),
39 /* voltage divider with 5/3 relationship to allow 5V sensors */
40 GPIO_PIN(PORT_A, 2),
41};
42
43#define ADC_NUMOF ARRAY_SIZE(adc_config)
45
46#ifdef __cplusplus
47} /* end extern "C" */
48#endif
49
@ PORT_A
port A
Definition periph_cpu.h:46
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:45
ADC device configuration.
Definition periph_cpu.h:377