Hi,
I am having some issues controlling the GPIO on the x310. So far I have only
been able to control the output of pin 0. Here are some code snippets of
things I have tried:
I have these lines before trying to control pins:
usrp->set_gpio_attr("FP0", "CTRL", 0x000, 0xFFF);
usrp->set_gpio_attr("FP0", "DDR", 0xFFF, 0xFFF);
This block works - set pin 0 to high, and pins 1 and 2 to low:\
\
usrp->set_gpio_attr("FP0", "OUT", 1, 1);
usrp->set_gpio_attr("FP0", "OUT", 0, (1<<1));
usrp->set_gpio_attr("FP0", "OUT", 0, (1<<2));
This block does not work - trying to set pins 0 and 1 to high, but only pin 0
outputs high:
usrp->set_gpio_attr("FP0", "OUT", 1, 1);
usrp->set_gpio_attr("FP0", "OUT", 1, (1<<1));
usrp->set_gpio_attr("FP0", "OUT", 0, (1<<2));
I attempt to set all pins to high using this line, but again only pin 0 outputs
high:
usrp->set_gpio_attr("FP0", "OUT", 1, 0xFFF);
Am I doing something wrong in the cases where the GPIO doesn’t have my desired
outputs?
Thanks,
Will
_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]