-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration from RPi.GPIO to gpiod #4
Comments
Hi Maks, Yes, add_event_detect() and remove_event_detect() can be implemented using gpiod. Best regards, |
Hi Chandra, I think porting your library to gpiod using pure python libraries is a much cleaner approach. The event detection with a callback can be implemented using asyncio library by adding a reader with your callback to an asyncio event loop loop.add_reader() and feeding it with a file description of the gpiod line class. The event FD can be retrieved by calling the line.event_get_fd() method. This way you'll have only two dependencies on gpiod and asyncio python libraries. Best regards, |
Ok maks, I am waiting for your version. This is what Rpi.GPIO is used in the library:
I think it will be useful for you to porting the LoRaRF-python library. |
Hi Chandara, I've implemented a proof-of-concept version of your library with gpiod library, please find it in the attachment. I've removed all the additional lines like the txen/rxen/wake as these are non-standard and are not present on the SX1262 chip. Also, all the LoRaRF methods shall be called from an asyncio task, so making it a generic library w/o asyncio dependency is not a straightforward task. But again, this was a quick fix just for my proof-of-concept LoRa integration for one of our products. Hope this helps. Cheers, |
Hi,
I'm looking for a python library for working with the SX1262 LoRa chip and I've found your library. It looks really good, but unfortunately, my product is based on the i.MX 6ULL processor and I can't use RPi.GPIO library in my project. I wonder how much effort would be required for me to migrate your library from RPi.GPIO to gpiod python library? I can see some dependencies on remove_event_detect() and add_event_detect() RPi.GPIO calls and I wonder how these calls can be implemented using gpiod calls? Or maybe you can recommend any other python libraries or wrappers that I could use for porting your library to a generic Yocto embedded linux build? Thanks.
Best regards,
Maks.
The text was updated successfully, but these errors were encountered: