diff options
-rw-r--r-- | usrp2/firmware/apps/app_common_v2.c | 6 | ||||
-rw-r--r-- | usrp2/firmware/lib/db.h | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/usrp2/firmware/apps/app_common_v2.c b/usrp2/firmware/apps/app_common_v2.c index 2d131bda7..036d0bace 100644 --- a/usrp2/firmware/apps/app_common_v2.c +++ b/usrp2/firmware/apps/app_common_v2.c @@ -31,6 +31,7 @@ #include "clocks.h" #include "u2_init.h" #include <string.h> +#include "usrp2_i2c_addr.h" volatile bool link_is_up = false; // eth handler sets this int cpu_tx_buf_dest_port = PORT_ETH; @@ -308,7 +309,7 @@ read_time_cmd(const op_generic_t *p, static void fill_db_info(u2_db_info_t *p, const struct db_base *db) { - p->dbid = db->dbid; + //p->dbid = db->dbid; p->freq_min_hi = u2_fxpt_freq_hi(db->freq_min); p->freq_min_lo = u2_fxpt_freq_lo(db->freq_min); p->freq_max_hi = u2_fxpt_freq_hi(db->freq_max); @@ -334,6 +335,9 @@ dboard_info_cmd(const op_generic_t *p, fill_db_info(&r->tx_db_info, tx_dboard); fill_db_info(&r->rx_db_info, rx_dboard); + r->tx_db_info.dbid = read_dboard_eeprom(I2C_ADDR_TX_A); + r->rx_db_info.dbid = read_dboard_eeprom(I2C_ADDR_RX_A); + return r->len; } diff --git a/usrp2/firmware/lib/db.h b/usrp2/firmware/lib/db.h index cec960267..7feb1c889 100644 --- a/usrp2/firmware/lib/db.h +++ b/usrp2/firmware/lib/db.h @@ -100,5 +100,10 @@ db_set_duc_freq(u2_fxpt_freq_t dxc_freq, u2_fxpt_freq_t *actual_dxc_freq); bool db_set_gain(struct db_base *db, u2_fxpt_gain_t gain); +/*! + * \brief Read the eeprom value from the db, without defaulting to BasicRX/TX + */ +int +read_dboard_eeprom(int i2c_addr); #endif /* INCLUDED_DB_H */ |