diff options
author | michael-west <michael.west@ettus.com> | 2016-12-09 16:15:40 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-12-09 17:22:16 -0800 |
commit | 548e14cfd6ee03ebb66bcad13648529d4a17f4e4 (patch) | |
tree | 269e92bce56a6d9f53468f4c485421c31d4c942d | |
parent | 5efe1c0f124d1068bbc9bd882db5530ca2ca0377 (diff) | |
download | uhd-548e14cfd6ee03ebb66bcad13648529d4a17f4e4.tar.gz uhd-548e14cfd6ee03ebb66bcad13648529d4a17f4e4.tar.bz2 uhd-548e14cfd6ee03ebb66bcad13648529d4a17f4e4.zip |
GPIO: Set CTRL register before OUT register in GPIO example.
-rw-r--r-- | host/examples/gpio.cpp | 6 |
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); |