diff options
author | Josh Blum <josh@joshknows.com> | 2011-03-11 17:02:11 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-03-11 17:02:11 +0000 |
commit | 6fc9a384a7d9aef9457e7f7015431880f6bf91d8 (patch) | |
tree | efc48dabcc2c15ced30c8f9189bf4dc9c0b7c542 /host/lib/usrp/usrp_e100/usrp_e100_impl.cpp | |
parent | 585b0455e8176d8e1abc2722f2a0e56eb89e1c58 (diff) | |
download | uhd-6fc9a384a7d9aef9457e7f7015431880f6bf91d8.tar.gz uhd-6fc9a384a7d9aef9457e7f7015431880f6bf91d8.tar.bz2 uhd-6fc9a384a7d9aef9457e7f7015431880f6bf91d8.zip |
usrp-e100: added module compat num check, made fpga compat constant more obvious
Diffstat (limited to 'host/lib/usrp/usrp_e100/usrp_e100_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp_e100/usrp_e100_impl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp b/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp index a120c3303..a8fbe5d69 100644 --- a/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp +++ b/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp @@ -120,10 +120,10 @@ static device::sptr usrp_e100_make(const device_addr_t &device_addr){ try{std::ifstream(hash_file_path) >> loaded_hash;}catch(...){} //if not loaded: load the fpga image and write the hash-file - if (fpga_compat_num != USRP_E_COMPAT_NUM or loaded_hash != fpga_hash){ + if (fpga_compat_num != USRP_E_FPGA_COMPAT_NUM or loaded_hash != fpga_hash){ iface.reset(); usrp_e100_load_fpga(usrp_e100_fpga_image); - sleep(1); ///\todo do this better one day. + sleep(1); ///\todo do this better one day. std::cout << boost::format("re-Opening USRP-E on %s") % node << std::endl; iface = usrp_e100_iface::make(node); try{std::ofstream(hash_file_path) << fpga_hash;}catch(...){} @@ -131,11 +131,11 @@ static device::sptr usrp_e100_make(const device_addr_t &device_addr){ //check that the compatibility is correct fpga_compat_num = iface->peek16(UE_REG_MISC_COMPAT); - if (fpga_compat_num != USRP_E_COMPAT_NUM){ + if (fpga_compat_num != USRP_E_FPGA_COMPAT_NUM){ throw uhd::runtime_error(str(boost::format( "Expected fpga compatibility number 0x%x, but got 0x%x:\n" "The fpga build is not compatible with the host code build." - ) % USRP_E_COMPAT_NUM % fpga_compat_num)); + ) % USRP_E_FPGA_COMPAT_NUM % fpga_compat_num)); } return device::sptr(new usrp_e100_impl(iface)); |