Re: [riot-devel] ADC API resolution

2020-01-09 Thread Hauke Petersen
Hej, @Koen I like that idea! However, we must be careful to differentiate between the actual bit-width (6,8,10,...) of the ADC and the value assigned to the enum members of adc_res_t. While a user might be interested in the former for result shaping etc, the latter can have any arbitrary

Re: [riot-devel] ADC API resolution

2020-01-08 Thread Marian Buschsieweke
Hi, > I was thinking of a function such as `adc_res_t adc_res_max(adc_line_t line)` > to be able to support different ADC peripherals on a single image. good point! This could be provided with no run-time overhead in drivers/include/periph/adc.h e.g. via: #if !defined(HAVE_ADC_RES_MAX)

Re: [riot-devel] ADC API resolution

2020-01-08 Thread Koen Zandberg
Hi all, A month or so back I added ADC peripherals bindings for the MicroPython fork. As this had to be generic across boards I also stumbled over a missing run-time indicator for which resolutions are supported. At that moment I worked around it by iterating over all possible ADC resolutions

Re: [riot-devel] ADC API resolution

2020-01-07 Thread Marian Buschsieweke
Hi, thanks for your reply. On Tue, 7 Jan 2020 09:00:54 +0100 Hauke Petersen wrote: > Hi, > > keep in mind that just because an enum value is not defined, it does not > prevent code like > ``` > adc_res_t res = 77; > adc_init(.., res); > ``` > Also, calling `adc_init(..., 1234)` is completely

[riot-devel] ADC API resolution

2019-12-26 Thread Marian Buschsieweke
Hi, I just noticed that most of the ADC implementations providing their own adc_res_t do not cover all values. The API documentation states that adc_sample() should return -1 on unsupported resolutions. This indicates that all possible resolutions have to be defined in any case, so that a user

[riot-devel] ADC, I2C and SPI

2016-08-07 Thread Alessandro Nicoli
Hi all, I'm working on the subjects above, as soon as possible i would like to create a quick start tutorial on the RIOT wiki. If someone is interested he could find it there. Best regards, Alessandro ___ devel mailing list devel@riot-os.org

Re: [riot-devel] ADC on SAMR21-xpro (Alessandro Nicoli)

2016-07-25 Thread Peter Kietzmann
Hi Alessandro, you're pretty much welcome! Even though I didn't do that much. Do you think you could open a PR with this ADC driver implementation? Best Peter Am 23.07.2016 um 11:50 schrieb ALESSANDRO NICOLI: Hi all, I've successfully put in work the ADC module on SAMR21-xpro. I'm

Re: [riot-devel] ADC on SAMR21-xpro (Alessandro Nicoli)

2016-07-23 Thread ALESSANDRO NICOLI
Hi all, I've successfully put in work the ADC module on SAMR21-xpro. I'm still trying to set up the offset and gain corrections, i tried to edit the "periph_conf.h" file, but when i compile and run it, it seems that nothing has changed... Anyway i want to say "thanks" to Peter that gave me a

Re: [riot-devel] ADC on SAMR21-xpro (Alessandro Nicoli)

2016-07-22 Thread ALESSANDRO NICOLI
> > > Today's Topics: > >1. Re: ADC on SAMR21-xpro (Peter Kietzmann) > > > -- > > Message: 1 > Date: Fri, 22 Jul 2016 11:59:46 +0200 > From: Peter Kietzmann <peter.kietzm...@haw-hamburg.de&

Re: [riot-devel] ADC on SAMR21-xpro

2016-07-22 Thread Peter Kietzmann
Hi Alessandro, what is your code base? If you have adapted this PR (as I proposed some time ago) https://github.com/RIOT-OS/RIOT/pull/4162/ it should be PA6, PA7, PA8, PA9, PB2, PB3 according to the ADC channel. Compare this configuration:

[riot-devel] ADC on SAMR21-xpro

2016-07-22 Thread ALESSANDRO NICOLI
Hi Rioters, I've some troubles about using the ADC on the SAMR21-XPRO board. At now, i've added the libraries and required features for it, it compiles and i can use the "periph_adc" test, but i'm not able to find which GPIO are used for the ADC. In less words, i need an help to start using the

Re: [riot-devel] ADC

2016-02-24 Thread Oleg Hahm
Hi Ilias! On Wed, Feb 24, 2016 at 04:32:48PM +0100, Ilias Seitanidis wrote: > 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" That's okay, but still strange. The error message pretty

Re: [riot-devel] ADC

2016-02-24 Thread Ilias Seitanidis
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"

[riot-devel] ADC

2016-02-24 Thread Ilias Seitanidis
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':