EttusResearch / uhd

The USRP™ Hardware Driver Repository
http://uhd.ettus.com
Other
941 stars 644 forks source link

SPI API for Python #722

Open berk-acikgoz opened 5 months ago

berk-acikgoz commented 5 months ago

We are developing a program to utilize the front-panel GPIO pins of USRP X410 for SPI applications. The examples written in C++ proved useful for most purposes. However, we would like to carry the SPI functionality over to Python, for better integration with our existing code base.

The UHD development manual points to the C++ documentation for equivalent Python APIs. However, the spi_getter_iface class does not exist in Python, neither does a module with equivalent functionality (like the gpio_power class in Python equivalent to the gpio_power_iface class in C++). None of the methods of the uhd.libpyuhd.rfnoc.mb_controller (which was how I got the gpio_power object) seem to have anything to do with SPI. Is SPI functionality already implemented in Python? If so, how can it be utilized to write user applications for front panel GPIO? If not, what are the current plans on releasing it on later versions of UHD? We are using UHD version 4.6.0.

Thanks in advance!

manderseck commented 4 months ago

@berk-acikgoz Sorry for the late reply. The spi_getter_iface class is indeed not yet implemented in Python. It is in our backlog, it just wasn't prioritized yet. I'll add a note to the backlog item helping us to prioritize it but I cannot promise any specific release for this feature yet.