I did this a few months ago for a personal project: https://github.com/AsensioL/smbus2/blob ... /smbus2.py
I only recently got a chance to upload it.
Check the last 2 commits. In the most recent one I add some support for the existing machine.i2c functions.
Maybe it can help.
Good luck
Edit: All credits to https://github.com/kplindegaard/smbus2 for their original implementation in pure Python that I was able to adapt.
Also, note that I haven't thoroughly tested my changes, but they worked just fine (as far as I could tell) for my pet project.
I only recently got a chance to upload it.
Check the last 2 commits. In the most recent one I add some support for the existing machine.i2c functions.
Maybe it can help.
Good luck
Edit: All credits to https://github.com/kplindegaard/smbus2 for their original implementation in pure Python that I was able to adapt.
Also, note that I haven't thoroughly tested my changes, but they worked just fine (as far as I could tell) for my pet project.
Statistics: Posted by Asensio12 — Thu Mar 07, 2024 11:06 am