[riot-devel] ADC

Oleg Hahm oliver.hahm at inria.fr
Wed Feb 24 16:21:45 CET 2016


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20160224/c8c4ad90/attachment.sig>


More information about the devel mailing list