-/*
- * Copyright 2009 Ettus Research LLC
- */
+//
+// Copyright 2009 Free Software Foundation, Inc.
+//
+// This file is part of GNU Radio
+//
+// GNU Radio is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either asversion 3, or (at your option)
+// any later version.
+//
+// GNU Radio is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with GNU Radio; see the file COPYING. If not, write to
+// the Free Software Foundation, Inc., 51 Franklin Street,
+// Boston, MA 02110-1301, USA.
#include "db_wbxng_adf4350_regs.h"
#include "db_wbxng_adf4350.h"
/* reg 5 */
const uint8_t adf4350_regs::s_ld_pin_mode = 1;
-adf4350_regs::adf4350_regs(adf4350* _adf4350){
- d_adf4350 = _adf4350;
+adf4350_regs::adf4350_regs(){
/* reg 0 */
d_int = uint16_t(100);
uint32_t
adf4350_regs::_reg_shift(uint32_t data, uint32_t shift){
return data << shift;
- }
+}
-void
-adf4350_regs::_load_register(uint8_t addr){
+uint32_t
+adf4350_regs::compute_register(uint8_t addr){
uint32_t data;
switch (addr){
case 0: data = (
_reg_shift(s_output_power, 3)); break;
case 5: data = (
_reg_shift(s_ld_pin_mode, 22)); break;
- default: return;
+ default: return data;
}
- /* write the data out to spi */
- d_adf4350->_write(addr, data);
+ /* return the data to write out to spi */
+ return data;
}
+