Take a look at the block controller for the UHD example "gain" block found here <https://github.com/EttusResearch/uhd/blob/master/host/examples/rfnoc-example/lib/gain_block_control.cpp>. Note how this block doesn't even bother with creating a property. Instead there is simply a set and get function which pokes or peeks an FPGA register. But, I don't know how to configure gnuradio so that it can call this custom function.
On Wed, Dec 13, 2023 at 11:12 AM <[email protected]> wrote: > Hi Rob, > > Do you mean instead of doing it across the register_property as the > set_int_property does, directly call the peek function? > > Now I have this in the controller: > > register_property(&_test_reg, [this]() { > > int test_reg = this->regs().peek32(REG_TEST_ADDR); > > this->_test_reg.set(test_reg); > > }); > > Do you suggest changing it to something like this? (taken from > uhd/host/lib/rfnoc/ddc_block_control.cpp) > > > double get_freq(const size_t chan) const > > { > > return _freq.at(chan).get(); > > } > > > “_freq” seems to be also a property_t class as “_test_reg” is. What’s the > difference of doing it that way? > _______________________________________________ > USRP-users mailing list -- [email protected] > To unsubscribe send an email to [email protected] >
_______________________________________________ USRP-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
