Where is the source code of module _onewire?

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

Where is the source code of module _onewire?

Post by liudr » Wed Jan 31, 2018 5:56 pm

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.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Where is the source code of module _onewire?

Post by dhylands » Wed Jan 31, 2018 6:27 pm

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)

Post Reply