diff options
author | Moritz Fischer <moritz.fischer@ettus.com> | 2015-01-12 16:10:28 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-01-15 21:20:41 +0100 |
commit | b02fadef4af427cc06286a50cb0528a1f2aa2676 (patch) | |
tree | e2d8ee3e386f1565d13930b6a77cdb2423793535 /host/lib/usrp | |
parent | f9d5075724e833401edd8065fc05a5c0edcaef75 (diff) | |
download | uhd-b02fadef4af427cc06286a50cb0528a1f2aa2676.tar.gz uhd-b02fadef4af427cc06286a50cb0528a1f2aa2676.tar.bz2 uhd-b02fadef4af427cc06286a50cb0528a1f2aa2676.zip |
e300: Removed duplicate FPGA loading function
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/e300/e300_impl.cpp | 29 | ||||
-rw-r--r-- | host/lib/usrp/e300/e300_impl.hpp | 2 |
2 files changed, 0 insertions, 31 deletions
diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp index 59788fbea..d04794947 100644 --- a/host/lib/usrp/e300/e300_impl.cpp +++ b/host/lib/usrp/e300/e300_impl.cpp @@ -681,35 +681,6 @@ double e300_impl::_set_tick_rate(const double rate) return _tick_rate; } -void e300_impl::_load_fpga_image(const std::string &path) -{ - if (not fs::exists("/dev/xdevcfg")) - { - ::system("mknod /dev/xdevcfg c 259 0"); - //throw uhd::runtime_error("no xdevcfg, please run: mknod /dev/xdevcfg c 259 0"); - } - - UHD_MSG(status) << "Loading FPGA image: " << path << "..." << std::flush; - - std::ifstream fpga_file(path.c_str(), std::ios_base::binary); - UHD_ASSERT_THROW(fpga_file.good()); - - std::FILE *wfile; - wfile = std::fopen("/dev/xdevcfg", "wb"); - UHD_ASSERT_THROW(!(wfile == NULL)); - - char buff[16384]; // devcfg driver can't handle huge writes - do { - fpga_file.read(buff, sizeof(buff)); - std::fwrite(buff, 1, fpga_file.gcount(), wfile); - } while (fpga_file); - - fpga_file.close(); - std::fclose(wfile); - - UHD_MSG(status) << " done" << std::endl; -} - void e300_impl::_register_loopback_self_test(wb_iface::sptr iface) { bool test_fail = false; diff --git a/host/lib/usrp/e300/e300_impl.hpp b/host/lib/usrp/e300/e300_impl.hpp index 9cfd80afd..a4170ee42 100644 --- a/host/lib/usrp/e300/e300_impl.hpp +++ b/host/lib/usrp/e300/e300_impl.hpp @@ -194,8 +194,6 @@ private: // types }; private: // methods - void _load_fpga_image(const std::string &path); - void _register_loopback_self_test(uhd::wb_iface::sptr iface); boost::uint32_t _get_version(compat_t which); |