aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/examples/gpio.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/examples/gpio.cpp b/host/examples/gpio.cpp
index 1a1b2982f..02c73e96b 100644
--- a/host/examples/gpio.cpp
+++ b/host/examples/gpio.cpp
@@ -228,6 +228,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[])
//set data direction register (DDR)
usrp->set_gpio_attr(gpio, "DDR", ddr, mask);
+ //set control register
+ usrp->set_gpio_attr(gpio, "CTRL", ctrl, mask);
+
//set output values (OUT)
usrp->set_gpio_attr(gpio, "OUT", out, mask);
@@ -237,9 +240,6 @@ int UHD_SAFE_MAIN(int argc, char *argv[])
usrp->set_gpio_attr(gpio, "ATR_TX", atr_tx, mask);
usrp->set_gpio_attr(gpio, "ATR_XX", atr_duplex, mask);
- //set control register
- usrp->set_gpio_attr(gpio, "CTRL", ctrl, mask);
-
//print out initial state of FP GPIO
std::cout << "\nConfigured GPIO values:" << std::endl;
output_reg_values(gpio, usrp, num_bits);