diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2015-01-13 12:50:43 -0800 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2015-01-13 12:50:43 -0800 |
commit | 0dfcc1227c4278e2fb53cda5e5bc2e51068fa0ea (patch) | |
tree | 675b2254d41397fa7a69603a962ffa2f0c40933b | |
parent | 8b60d5f0c1f2a477fc0a13f7a5f39ee8c1a40502 (diff) | |
parent | dd3b1fbd7632bbbe7f5df16d8080534d45e105e7 (diff) | |
download | uhd-0dfcc1227c4278e2fb53cda5e5bc2e51068fa0ea.tar.gz uhd-0dfcc1227c4278e2fb53cda5e5bc2e51068fa0ea.tar.bz2 uhd-0dfcc1227c4278e2fb53cda5e5bc2e51068fa0ea.zip |
Merge pull request #670 from EttusResearch/vkakade/list_NI_b200
b2xx_fx3_utils corrections.
-rw-r--r-- | host/utils/b2xx_fx3_utils.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/host/utils/b2xx_fx3_utils.cpp b/host/utils/b2xx_fx3_utils.cpp index 78449a8a4..081141048 100644 --- a/host/utils/b2xx_fx3_utils.cpp +++ b/host/utils/b2xx_fx3_utils.cpp @@ -51,7 +51,9 @@ struct vid_pid_t { const static vid_pid_t known_vid_pids[] = { {FX3_VID, FX3_DEFAULT_PID}, {FX3_VID, FX3_REENUM_PID}, - {B200_VENDOR_ID, B200_PRODUCT_ID} + {B200_VENDOR_ID, B200_PRODUCT_ID}, + {B200_VENDOR_NI_ID, B200_PRODUCT_NI_ID}, + {B200_VENDOR_NI_ID, B210_PRODUCT_NI_ID} }; const static std::vector<vid_pid_t> known_vid_pid_vector(known_vid_pids, known_vid_pids + (sizeof(known_vid_pids) / sizeof(known_vid_pids[0]))); @@ -59,14 +61,14 @@ static const size_t EEPROM_INIT_VALUE_VECTOR_SIZE = 8; static uhd::byte_vector_t construct_eeprom_init_value_vector(boost::uint16_t vid, boost::uint16_t pid) { uhd::byte_vector_t init_values(EEPROM_INIT_VALUE_VECTOR_SIZE); - init_values.push_back(0x43); - init_values.push_back(0x59); - init_values.push_back(0x14); - init_values.push_back(0xB2); - init_values.push_back(static_cast<boost::uint8_t>(pid & 0xff)); - init_values.push_back(static_cast<boost::uint8_t>(pid >> 8)); - init_values.push_back(static_cast<boost::uint8_t>(vid & 0xff)); - init_values.push_back(static_cast<boost::uint8_t>(vid >> 8)); + init_values.at(0) = 0x43; + init_values.at(1) = 0x59; + init_values.at(2) = 0x14; + init_values.at(3) = 0xB2; + init_values.at(4) = static_cast<boost::uint8_t>(pid & 0xff); + init_values.at(5) = static_cast<boost::uint8_t>(pid >> 8); + init_values.at(6) = static_cast<boost::uint8_t>(vid & 0xff); + init_values.at(7) = static_cast<boost::uint8_t>(vid >> 8); return init_values; } @@ -232,7 +234,7 @@ int read_eeprom(b200_iface::sptr& b200, uhd::byte_vector_t& data) int write_eeprom(b200_iface::sptr& b200, const uhd::byte_vector_t& data) { try { - b200->write_eeprom(0x0, 0x0, data); + b200->write_eeprom(0x0, 0x0, data); } catch (std::exception &e) { std::cerr << "Exception while writing EEPROM: " << e.what() << std::endl; return -1; |