Page 1 of 1

Where is the source code of module _onewire?

Posted: Wed Jan 31, 2018 5:56 pm
by liudr
I got a question from someone claiming 1-Wire communication can be done using micropython. I was not convinced that it was pure micropython but rather a collection of a few micropython wrapper functions of C code. I looked at github for some evidence but was stopped here:

https://github.com/micropython/micropyt ... onewire.py

The 1-wire module imports a _onewire module that I couldn't find source code for. Where can I view this module's source code? Is it in C++?

Thanks.

Re: Where is the source code of module _onewire?

Posted: Wed Jan 31, 2018 6:27 pm
by dhylands
You'll find it here: https://github.com/micropython/micropyt ... donewire.c
The _onewire comes from:
https://github.com/micropython/micropyt ... ort.h#L206
(i.e. The QSTR _onewire is mapped to the onewire module)