[riot-devel] ADC

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


Dear Oleg,
Thank you for your reply.
I am sorry I didn't mention that or didn't include my "include" statements,
but I took it for granted that you will know that I used "include
periph/adc.h"
as well as "include periph/gpio.h".Furthermore, I used the
"FEATURES_REQUIRED = periph_adc periph_gpio"
statement in my Makefile.
Thats the weird, I have the files in the right directories but doesn't
work.(I even copied them from the watrli branch(The cpu foder)).
Mit besten Grüßen,
Ilias

2016-02-24 16:21 GMT+01:00 Oleg Hahm <oliver.hahm at inria.fr>:

> Dear Ilias,
>
> without looking into this in any detail: are you sure you have included
> "periph/adc.h"?
>
> Cheers,
> Oleg
>
> On Wed, Feb 24, 2016 at 04:19:19PM +0100, Ilias Seitanidis wrote:
> > 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
>
> > _______________________________________________
> > devel mailing list
> > devel at riot-os.org
> > https://lists.riot-os.org/mailman/listinfo/devel
>
>
> --
> Dprintk("oh dear, we are idle\n");
>         linux-2.6.6/drivers/net/ns83820.c
>
> _______________________________________________
> devel mailing list
> devel at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20160224/cd6c2f7f/attachment.html>


More information about the devel mailing list