diff options
author | Josh Blum <josh@joshknows.com> | 2010-03-15 17:00:04 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-03-15 17:00:04 +0000 |
commit | 1bfb556262d12740c71e68a2a071e6e67ed2b3e7 (patch) | |
tree | a081bfd3a61ccb42372a627be7b57ce19a3baa0d /host/lib/usrp/usrp1e | |
parent | 1b965831ae7588c7879d84de4e5fbd78ca614761 (diff) | |
parent | fc40ff2f1327d01c72c4d7dbc07a14e473251981 (diff) | |
download | uhd-1bfb556262d12740c71e68a2a071e6e67ed2b3e7.tar.gz uhd-1bfb556262d12740c71e68a2a071e6e67ed2b3e7.tar.bz2 uhd-1bfb556262d12740c71e68a2a071e6e67ed2b3e7.zip |
Merge branch 'master' of git@ettus.sourcerepo.com:ettus/uhd into u1e_uhd
Conflicts:
host/apps/CMakeLists.txt
host/lib/usrp/usrp2/usrp2_impl.cpp
Diffstat (limited to 'host/lib/usrp/usrp1e')
-rw-r--r-- | host/lib/usrp/usrp1e/usrp1e_impl.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp1e/usrp1e_impl.cpp b/host/lib/usrp/usrp1e/usrp1e_impl.cpp index 93265ab17..441f6d060 100644 --- a/host/lib/usrp/usrp1e/usrp1e_impl.cpp +++ b/host/lib/usrp/usrp1e/usrp1e_impl.cpp @@ -15,18 +15,23 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // -#include <unistd.h> +#include <uhd/utils.hpp> #include <boost/format.hpp> +#include <boost/filesystem.hpp> #include "usrp1e_impl.hpp" using namespace uhd; using namespace uhd::usrp; +STATIC_BLOCK(register_usrp1e_device){ + device::register_device(&usrp1e::discover, &usrp1e::make); +} + /*********************************************************************** * Helper Functions **********************************************************************/ static bool file_exists(const std::string &file_path){ - return access(file_path.c_str(), F_OK) == 0; + return boost::filesystem::exists(file_path); } /*********************************************************************** @@ -40,7 +45,6 @@ device_addrs_t usrp1e::discover(const device_addr_t &device_addr){ if (not file_exists(device_addr["node"])) return usrp1e_addrs; device_addr_t new_addr; new_addr["name"] = "USRP1E"; - new_addr["type"] = "usrp1e"; new_addr["node"] = device_addr["node"]; usrp1e_addrs.push_back(new_addr); } @@ -52,7 +56,6 @@ device_addrs_t usrp1e::discover(const device_addr_t &device_addr){ if (not file_exists(node)) continue; device_addr_t new_addr; new_addr["name"] = "USRP1E"; - new_addr["type"] = "usrp1e"; new_addr["node"] = node; usrp1e_addrs.push_back(new_addr); } |