diff options
| author | root <root@usrp-embedded.(none)> | 2010-09-30 18:25:24 +0000 | 
|---|---|---|
| committer | Philip Balister <philip@opensdr.com> | 2010-09-30 14:32:21 -0400 | 
| commit | 7f8d7b0e2fef1b2d5bb9c8047380dcf958c0c49c (patch) | |
| tree | 8de6bac957939fec11322e05287bb0649ea32ce2 | |
| parent | 20c364cb6e2d175525c1885c8ac122187853dc95 (diff) | |
| download | uhd-7f8d7b0e2fef1b2d5bb9c8047380dcf958c0c49c.tar.gz uhd-7f8d7b0e2fef1b2d5bb9c8047380dcf958c0c49c.tar.bz2 uhd-7f8d7b0e2fef1b2d5bb9c8047380dcf958c0c49c.zip  | |
Ignore direction for GPIO 114 since it is always an input.
| -rw-r--r-- | host/apps/omap_debug/fpga-downloader.cc | 20 | 
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;  | 
