aboutsummaryrefslogtreecommitdiffstats
path: root/host/apps/omap_debug
diff options
context:
space:
mode:
authorroot <root@usrp-embedded.(none)>2010-09-30 18:25:24 +0000
committerroot <root@usrp-embedded.(none)>2010-09-30 18:25:24 +0000
commitdd9f9c340a8def560235d737df446454ea75dadc (patch)
tree729c9b78dccc8f98af3253c03610f3d13c854a4e /host/apps/omap_debug
parent77cdb4a9695e71e64e1d87cfad2cb4d8717f971e (diff)
downloaduhd-dd9f9c340a8def560235d737df446454ea75dadc.tar.gz
uhd-dd9f9c340a8def560235d737df446454ea75dadc.tar.bz2
uhd-dd9f9c340a8def560235d737df446454ea75dadc.zip
Ignore direction for GPIO 114 since it is always an input.
Diffstat (limited to 'host/apps/omap_debug')
-rw-r--r--host/apps/omap_debug/fpga-downloader.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/host/apps/omap_debug/fpga-downloader.cc b/host/apps/omap_debug/fpga-downloader.cc
index fb96b64a3..4e475b5c1 100644
--- a/host/apps/omap_debug/fpga-downloader.cc
+++ b/host/apps/omap_debug/fpga-downloader.cc
@@ -97,15 +97,17 @@ gpio::gpio(unsigned int gpio_num, gpio_direction pin_direction)
std::fstream direction_file;
std::string direction_file_name;
- direction_file_name = base_path.str() + "/direction";
-
- direction_file.open(direction_file_name.c_str());
- if (!direction_file.is_open())
- std::cout << "Failed to open direction file." << std::endl;
- if (pin_direction == OUT)
- direction_file << "out" << std::endl;
- else
- direction_file << "in" << std::endl;
+ if (gpio_num != 114) {
+ direction_file_name = base_path.str() + "/direction";
+
+ direction_file.open(direction_file_name.c_str());
+ if (!direction_file.is_open())
+ std::cout << "Failed to open direction file." << std::endl;
+ if (pin_direction == OUT)
+ direction_file << "out" << std::endl;
+ else
+ direction_file << "in" << std::endl;
+ }
std::string value_file_name;