ADC Control

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
User avatar
AlSith
Posts: 20
Joined: Thu Oct 01, 2015 10:41 am

ADC Control

Post by AlSith »

Hi everybody.

I red that ADC gives back a signaling when it fills in half buffer, and another one when it fills in complete buffer ..is not so ..??

where can i get control of these flags ..??
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: ADC Control

Post by Giovanni »

There is an ADC callback, that is called after filling an half buffer, see the examples.

Giovanni
User avatar
AlSith
Posts: 20
Joined: Thu Oct 01, 2015 10:41 am

Re: ADC Control

Post by AlSith »

yeah..the callbacks..sorry :oops: :oops: :cry: :cry:
User avatar
AlSith
Posts: 20
Joined: Thu Oct 01, 2015 10:41 am

Re: ADC Control

Post by AlSith »

Since the callback is called twice, when buffer is half-full and full, to work on first half samples and then on the second one, what control i have to do..??

Exactly, the code

Code: Select all

if(buffer==samples)


how does it works?
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: ADC Control

Post by Giovanni »

buffer is the pointer to the filled semi buffer.

Giovanni
User avatar
AlSith
Posts: 20
Joined: Thu Oct 01, 2015 10:41 am

Re: ADC Control

Post by AlSith »

thanks a lot..as I supposed.. :D :D

AlSith
Post Reply