Page 1 of 1
Where to find source code for Pyboard classes?
Posted: Mon Aug 08, 2016 12:07 am
by BillG
I'd like to read the source code for the Pyboard class ADC library. Where do I find this? I've fished around in github but don't see it. I found "stmhal" in micropython-master and it contains adc.c, but there must be a Python layer above that.
Re: Where to find source code for Pyboard classes?
Posted: Mon Aug 08, 2016 3:48 am
by dhylands
That adc.c file that you found is the interface. It's C code which implements the python interface.
You can find the documentation for the python interface here:
http://docs.micropython.org/en/latest/p ... b.ADC.html
For example, the read method:
http://docs.micropython.org/en/latest/p ... b.ADC.read is implemented here:
https://github.com/micropython/micropyt ... #L252-L259
Re: Where to find source code for Pyboard classes?
Posted: Mon Aug 08, 2016 2:36 pm
by BillG
Thanks, Dave. I read through adc.c more thoroughly overnight and saw the notations for interfacing to Python.