diff options
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/usrp2/dboard_iface.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp2/dboard_iface.cpp b/host/lib/usrp/usrp2/dboard_iface.cpp index 591e958cb..e9acddee6 100644 --- a/host/lib/usrp/usrp2/dboard_iface.cpp +++ b/host/lib/usrp/usrp2/dboard_iface.cpp @@ -300,11 +300,10 @@ float usrp2_dboard_iface::read_aux_adc(unit_t unit, int which){ unit_to_spi_adc[unit], config, ad7922_regs.get_reg(), 16, false /*no rb*/ ); - boost::uint16_t reg = _iface->transact_spi( + ad7922_regs.set_reg(boost::uint16_t(_iface->transact_spi( unit_to_spi_adc[unit], config, ad7922_regs.get_reg(), 16, true /*rb*/ - ); - ad7922_regs.set_reg(reg); + ))); //convert to voltage and return return float(3.3*ad7922_regs.result/4095); |