Where to find source code for Pyboard classes?
Where to find source code for Pyboard classes?
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?
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
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?
Thanks, Dave. I read through adc.c more thoroughly overnight and saw the notations for interfacing to Python.