After some time I maybe realized how this thing works, but I don't know jow to call correctly methods from dboard_iface:
def get_pin_ctrl(self, *args, **kwargs): """get_pin_ctrl(self, unit_t unit) -> boost::uint16_t""" return _uhd_swig.dboard_iface_get_pin_ctrl(self, *args, **kwargs) ef get_gpio_ddr(self, *args, **kwargs): """get_gpio_ddr(self, unit_t unit) -> boost::uint16_t""" return _uhd_swig.dboard_iface_get_gpio_ddr(self, *args, **kwargs) or any of these methods that have *arg and **kwargs. When I call like this: iface = usrp1_src.get_dboard_iface() print iface.get_pin_ctrl(uhd.dboard_iface.UNIT_RX, 0) I get following error: Traceback (most recent call last): File "lftx_io.py", line 31, in <module> print iface.get_pin_ctrl(uhd.dboard_iface.UNIT_RX, 0) File "/usr/local/lib64/python2.6/site-packages/gnuradio/uhd/uhd_swig.py", line 1691, in get_pin_ctrl return _uhd_swig.dboard_iface_sptr_get_pin_ctrl(self, *args, **kwargs) TypeError: dboard_iface_sptr_get_pin_ctrl() takes at most 2 arguments (3 given) On Wed, Jul 24, 2013 at 4:58 PM, Nemanja Savic <vlasi...@gmail.com> wrote: > Hi guys again, > > I have designed small RF frontend using TI's cc1000 transciever. Since the > transciever need to be configured using external pins, I need to be able to > toggle gpio pins on my LFRX. I have found that I should use dboard_iface > which is available in python via swig. However I have several questions: > How should I address my board, since there are 4 possible slots, and onlt > 2 values of type unit, UNIT_RX and UNIT_TX. > As far as i can see, every uhd source has method get_iface, does this > anyhow concerns me? > > Thanks again, > Nemanja > > -- > Nemanja Savić > -- Nemanja Savić
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio