aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp_e100
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/usrp_e100')
-rw-r--r--host/lib/usrp/usrp_e100/dboard_impl.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/host/lib/usrp/usrp_e100/dboard_impl.cpp b/host/lib/usrp/usrp_e100/dboard_impl.cpp
index 9f2bfb8ae..b533c2657 100644
--- a/host/lib/usrp/usrp_e100/dboard_impl.cpp
+++ b/host/lib/usrp/usrp_e100/dboard_impl.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010 Ettus Research LLC
+// Copyright 2010-2011 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -31,8 +31,8 @@ using namespace uhd::usrp;
* Dboard Initialization
**********************************************************************/
void usrp_e100_impl::dboard_init(void){
- _rx_db_eeprom = dboard_eeprom_t(_iface->read_eeprom(I2C_ADDR_RX_DB, 0, dboard_eeprom_t::num_bytes()));
- _tx_db_eeprom = dboard_eeprom_t(_iface->read_eeprom(I2C_ADDR_TX_DB, 0, dboard_eeprom_t::num_bytes()));
+ _rx_db_eeprom.load(*_iface, I2C_ADDR_RX_DB);
+ _tx_db_eeprom.load(*_iface, I2C_ADDR_TX_DB);
//create a new dboard interface and manager
_dboard_iface = make_usrp_e100_dboard_iface(
@@ -73,8 +73,8 @@ void usrp_e100_impl::rx_dboard_get(const wax::obj &key_, wax::obj &val){
val = _dboard_manager->get_rx_subdev_names();
return;
- case DBOARD_PROP_DBOARD_ID:
- val = _rx_db_eeprom.id;
+ case DBOARD_PROP_DBOARD_EEPROM:
+ val = _rx_db_eeprom;
return;
case DBOARD_PROP_DBOARD_IFACE:
@@ -103,9 +103,9 @@ void usrp_e100_impl::rx_dboard_get(const wax::obj &key_, wax::obj &val){
**********************************************************************/
void usrp_e100_impl::rx_dboard_set(const wax::obj &key, const wax::obj &val){
switch(key.as<dboard_prop_t>()){
- case DBOARD_PROP_DBOARD_ID:
- _rx_db_eeprom.id = val.as<dboard_id_t>();
- _iface->write_eeprom(I2C_ADDR_RX_DB, 0, _rx_db_eeprom.get_eeprom_bytes());
+ case DBOARD_PROP_DBOARD_EEPROM:
+ _rx_db_eeprom = val.as<dboard_eeprom_t>();
+ _rx_db_eeprom.store(*_iface, I2C_ADDR_RX_DB);
return;
default: UHD_THROW_PROP_SET_ERROR();
@@ -132,8 +132,8 @@ void usrp_e100_impl::tx_dboard_get(const wax::obj &key_, wax::obj &val){
val = _dboard_manager->get_tx_subdev_names();
return;
- case DBOARD_PROP_DBOARD_ID:
- val = _tx_db_eeprom.id;
+ case DBOARD_PROP_DBOARD_EEPROM:
+ val = _tx_db_eeprom;
return;
case DBOARD_PROP_DBOARD_IFACE:
@@ -162,9 +162,9 @@ void usrp_e100_impl::tx_dboard_get(const wax::obj &key_, wax::obj &val){
**********************************************************************/
void usrp_e100_impl::tx_dboard_set(const wax::obj &key, const wax::obj &val){
switch(key.as<dboard_prop_t>()){
- case DBOARD_PROP_DBOARD_ID:
- _tx_db_eeprom.id = val.as<dboard_id_t>();
- _iface->write_eeprom(I2C_ADDR_TX_DB, 0, _tx_db_eeprom.get_eeprom_bytes());
+ case DBOARD_PROP_DBOARD_EEPROM:
+ _tx_db_eeprom = val.as<dboard_eeprom_t>();
+ _tx_db_eeprom.store(*_iface, I2C_ADDR_TX_DB);
return;
default: UHD_THROW_PROP_SET_ERROR();