On 4 November 2015 at 07:06, Matthijs van Duin <[email protected]>
wrote:

> See TRM chapter 12 for usage (yes, "Touchscreen Controller", that's the
> one).


You can also peek at my header: http://gerbil.xs4all.nl/adc.h (the headers
it depends on can be found in https://github.com/dutchanddutch/jbang )

My code is in a bit eccentric style of C++14 though :P  but even if you
don't use it directly the comments in it may be useful.

Word of caution: if you do use it; since I don't make any config registers
volatile (it doesn't really work with bitfields anyway) you need an
occasional compiler barrier to avoid reordering, e.g. between setting the
configuration and enabling it. You can #include <util/device.h> and use
write_barrier(adc); (or write_barrier(*adc) if it's a pointer rather than a
reference)

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to