[riot-devel] ADC

Ilias Seitanidis iliasseitanidis at gmail.com
Wed Feb 24 16:19:19 CET 2016


Dear all ,
I want to test adc with R21 board, something already done by many people.
The repository I use is [1].
After having tried almost all adc examples I get the following output.

/home/RIOT/examples/gnrc_networking/sensor.c: In function 'r21_sensor_init':
/home/RIOT/examples/gnrc_networking/sensor.c:6:5: error: implicit
declaration of function 'adc_init' [-Werror=implicit-function-declaration]
     if (adc_init(ADC_NUM, RES) == 0) {
     ^
In file included from /home/RIOT/examples/gnrc_networking/sensor.c:1:0:
/home/RIOT/examples/gnrc_networking/sensor.h:14:25: error: 'ADC_RES_12BIT'
undeclared (first use in this function)
 #define RES             ADC_RES_12BIT
                         ^
/home/RIOT/examples/gnrc_networking/sensor.c:6:27: note: in expansion of
macro 'RES'
     if (adc_init(ADC_NUM, RES) == 0) {
                           ^
/home/RIOT/examples/gnrc_networking/sensor.h:14:25: note: each undeclared
identifier is reported only once for each function it appears in
 #define RES             ADC_RES_12BIT
                         ^
/home/RIOT/examples/gnrc_networking/sensor.c:6:27: note: in expansion of
macro 'RES'
     if (adc_init(ADC_NUM, RES) == 0) {
                           ^
/home/RIOT/examples/gnrc_networking/sensor.c: In function 'r21_getValue':
/home/RIOT/examples/gnrc_networking/sensor.c:18:5: error: implicit
declaration of function 'adc_sample' [-Werror=implicit-function-declaration]
     *value = adc_sample(ADC_NUM, ADC_CH);
     ^
cc1: all warnings being treated as errors
make[1]: ***
[/home/RIOT/examples/gnrc_networking/bin/samr21-xpro/gnrc_networking/sensor.o]
Error 1
make: *** [all] Error 2


I attach my last configuration (Its from watr.li project ).
Thank you in advance!
Your Faithfully,
Ilias
[1]  https://github.com/kaspar030/RIOT/tree/ethos_br_hack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20160224/0b7355ed/attachment-0001.html>


More information about the devel mailing list