Skip to content
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

Soapy method "writeRegisters" does not seem to be implemented #284

Open
KarlL2 opened this issue Nov 13, 2019 · 3 comments
Open

Soapy method "writeRegisters" does not seem to be implemented #284

KarlL2 opened this issue Nov 13, 2019 · 3 comments

Comments

@KarlL2
Copy link

KarlL2 commented Nov 13, 2019

SoapyLMS7 implements writeRegister but not writeRegisters:

void writeRegister(const std::string &name, const unsigned addr, const unsigned value);

void SoapyLMS7::writeRegister(const std::string &name, const unsigned addr, const unsigned value)

Is it not possible to write to several registers on the Lime with the Soapy API? Or am I missing something?

This is related to the post Frequency hopping transmit where I would like to write 2 registers in one call.

@KarlL2
Copy link
Author

KarlL2 commented Nov 18, 2019

Could someone confirm or refute my finding? Maybe @IgnasJarusevicius or @guruofquality ?

@IgnasJarusevicius
Copy link
Contributor

It is not implemented in SoapyLMS7.
I do not know about SoapySDR itself, maybe it has default implementation that just calls writeRegister() multiple times.

@KarlL2
Copy link
Author

KarlL2 commented Nov 19, 2019

Thanks for the confirmation @IgnasJarusevicius .
It seems SoapySDR doesn't do anything by default:

https://github.com/pothosware/SoapySDR/blob/67abec9fe7ba84b4d069951c6e7f8c45f11e8335/lib/Device.cpp#L693

Any reasons why writeRegisters is not implemented in SoapyLMS7? Is it because SPI_write_batch takes an array of addresses and an array of data, while Soapy's API is a single address and array of data?

int LMS7002M::SPI_write_batch(const uint16_t* spiAddr, const uint16_t* spiData, uint16_t cnt, bool toChip)

If that's the case then the implementation of writeRegisters could create the corresponding array of contiguous addresses and call SPI_write_batch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants