diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-11-08 08:41:46 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-11-08 08:41:46 -0800 |
commit | 9b852f5f243e5cf68662b7152b5fa331a83e55fb (patch) | |
tree | 159ffe0761f78dd87e2ecc97abea14494abab4ff /host/lib/usrp/common/adf4001_ctrl.cpp | |
parent | c66cb1bad0d881394f3519bd94f4693cceab4c64 (diff) | |
parent | 99c2730bc9db270560671f2d7d173768465ed51f (diff) | |
download | uhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.tar.gz uhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.tar.bz2 uhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.zip |
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp/common/adf4001_ctrl.cpp')
-rw-r--r-- | host/lib/usrp/common/adf4001_ctrl.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/host/lib/usrp/common/adf4001_ctrl.cpp b/host/lib/usrp/common/adf4001_ctrl.cpp index 001b68b7a..01a35dbec 100644 --- a/host/lib/usrp/common/adf4001_ctrl.cpp +++ b/host/lib/usrp/common/adf4001_ctrl.cpp @@ -47,47 +47,47 @@ adf4001_regs_t::adf4001_regs_t(void) { } -boost::uint32_t adf4001_regs_t::get_reg(boost::uint8_t addr) { - boost::uint32_t reg = 0; +uint32_t adf4001_regs_t::get_reg(uint8_t addr) { + uint32_t reg = 0; switch (addr) { case 0: - reg |= (boost::uint32_t(ref_counter) & 0x003FFF) << 2; - reg |= (boost::uint32_t(anti_backlash_width) & 0x000003) << 16; - reg |= (boost::uint32_t(lock_detect_precision) & 0x000001) << 20; + reg |= (uint32_t(ref_counter) & 0x003FFF) << 2; + reg |= (uint32_t(anti_backlash_width) & 0x000003) << 16; + reg |= (uint32_t(lock_detect_precision) & 0x000001) << 20; break; case 1: - reg |= (boost::uint32_t(n) & 0x001FFF) << 8; - reg |= (boost::uint32_t(charge_pump_gain) & 0x000001) << 21; + reg |= (uint32_t(n) & 0x001FFF) << 8; + reg |= (uint32_t(charge_pump_gain) & 0x000001) << 21; break; case 2: - reg |= (boost::uint32_t(counter_reset) & 0x000001) << 2; - reg |= (boost::uint32_t(power_down) & 0x000001) << 3; - reg |= (boost::uint32_t(muxout) & 0x000007) << 4; - reg |= (boost::uint32_t(phase_detector_polarity) & 0x000001) << 7; - reg |= (boost::uint32_t(charge_pump_mode) & 0x000001) << 8; - reg |= (boost::uint32_t(fastlock_mode) & 0x000003) << 9; - reg |= (boost::uint32_t(timer_counter_control) & 0x00000F) << 11; - reg |= (boost::uint32_t(charge_pump_current_1) & 0x000007) << 15; - reg |= (boost::uint32_t(charge_pump_current_2) & 0x000007) << 18; - reg |= (boost::uint32_t(power_down) & 0x000002) << 21; + reg |= (uint32_t(counter_reset) & 0x000001) << 2; + reg |= (uint32_t(power_down) & 0x000001) << 3; + reg |= (uint32_t(muxout) & 0x000007) << 4; + reg |= (uint32_t(phase_detector_polarity) & 0x000001) << 7; + reg |= (uint32_t(charge_pump_mode) & 0x000001) << 8; + reg |= (uint32_t(fastlock_mode) & 0x000003) << 9; + reg |= (uint32_t(timer_counter_control) & 0x00000F) << 11; + reg |= (uint32_t(charge_pump_current_1) & 0x000007) << 15; + reg |= (uint32_t(charge_pump_current_2) & 0x000007) << 18; + reg |= (uint32_t(power_down) & 0x000002) << 21; break; case 3: - reg |= (boost::uint32_t(counter_reset) & 0x000001) << 2; - reg |= (boost::uint32_t(power_down) & 0x000001) << 3; - reg |= (boost::uint32_t(muxout) & 0x000007) << 4; - reg |= (boost::uint32_t(phase_detector_polarity) & 0x000001) << 7; - reg |= (boost::uint32_t(charge_pump_mode) & 0x000001) << 8; - reg |= (boost::uint32_t(fastlock_mode) & 0x000003) << 9; - reg |= (boost::uint32_t(timer_counter_control) & 0x00000F) << 11; - reg |= (boost::uint32_t(charge_pump_current_1) & 0x000007) << 15; - reg |= (boost::uint32_t(charge_pump_current_2) & 0x000007) << 18; - reg |= (boost::uint32_t(power_down) & 0x000002) << 20; + reg |= (uint32_t(counter_reset) & 0x000001) << 2; + reg |= (uint32_t(power_down) & 0x000001) << 3; + reg |= (uint32_t(muxout) & 0x000007) << 4; + reg |= (uint32_t(phase_detector_polarity) & 0x000001) << 7; + reg |= (uint32_t(charge_pump_mode) & 0x000001) << 8; + reg |= (uint32_t(fastlock_mode) & 0x000003) << 9; + reg |= (uint32_t(timer_counter_control) & 0x00000F) << 11; + reg |= (uint32_t(charge_pump_current_1) & 0x000007) << 15; + reg |= (uint32_t(charge_pump_current_2) & 0x000007) << 18; + reg |= (uint32_t(power_down) & 0x000002) << 20; break; default: break; } - reg |= (boost::uint32_t(addr) & 0x03); + reg |= (uint32_t(addr) & 0x03); return reg; } @@ -140,8 +140,8 @@ void adf4001_ctrl::program_regs(void) { } -void adf4001_ctrl::write_reg(boost::uint8_t addr) { - boost::uint32_t reg = adf4001_regs.get_reg(addr); //load the reg data +void adf4001_ctrl::write_reg(uint8_t addr) { + uint32_t reg = adf4001_regs.get_reg(addr); //load the reg data spi_iface->transact_spi(slaveno, spi_config, |