pulkin / micropython

MicroPython implementation on Ai-Thinker GPRS module A9 (RDA8955)
https://micropython.org
MIT License
102 stars 30 forks source link

1-Wire/Open Drain support #20

Open arlucio opened 4 years ago

arlucio commented 4 years ago

I'm trying to enable 1-Wire support on A9. For that it's necessary to implement Open-Drain GPIO Output somehow by software using SDK GPIO lib, doing something like this: https://embeddedartistry.com/blog/2018/06/11/simulating-open-drain-gpio-in-software/

From what I see, would be necessary to create a way to define a Pin in machine_pin as OpenDrain, to be able to call pin.init(pin.OPEN_DRAIN, pin.PULL_UP) on drivers/onewire/onewire.py. I've stumbled in how to do that, will try further but any help would be appreciated.

ESP8266/ESP32/STM32 are some ports that already support 1-Wire/OpenDrain.

huangguangw commented 4 years ago

请问onewire在A9G上实现了吗?

arlucio commented 4 years ago

No, for this is still necessary to implement software Open-Drain.

ahmadmicro commented 3 years ago

any progress on this?