GNU Radio 3.3.0 C++ API
db_wbxng_adf4350_regs.h
Go to the documentation of this file.
00001 //
00002 // Copyright 2009 Free Software Foundation, Inc.
00003 //
00004 // This file is part of GNU Radio
00005 //
00006 // GNU Radio is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU General Public License as published by
00008 // the Free Software Foundation; either asversion 3, or (at your option)
00009 // any later version.
00010 //
00011 // GNU Radio is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU General Public License
00017 // along with GNU Radio; see the file COPYING.  If not, write to
00018 // the Free Software Foundation, Inc., 51 Franklin Street,
00019 // Boston, MA 02110-1301, USA.
00020 
00021 #ifndef ADF4350_REGS_H
00022 #define ADF4350_REGS_H
00023 
00024 #include <usrp/db_base.h>
00025 #include <stdint.h>
00026 
00027 class adf4350;
00028 
00029 class adf4350_regs
00030 {
00031 public:
00032     adf4350_regs(adf4350* _adf4350);
00033     ~adf4350_regs();
00034 
00035     adf4350* d_adf4350;
00036 
00037     uint32_t _reg_shift(uint32_t data, uint32_t shift);
00038     void _load_register(uint8_t addr);
00039 
00040     /* reg 0 */
00041     uint16_t d_int;
00042     uint16_t d_frac;
00043     /* reg 1 */
00044     uint8_t d_prescaler;
00045     static const uint16_t s_phase;
00046     uint16_t d_mod;
00047     /* reg 2 */
00048     static const uint8_t s_low_noise_and_low_spur_modes;
00049     static const uint8_t s_muxout;
00050     static const uint8_t s_reference_doubler;
00051     static const uint8_t s_rdiv2;
00052     uint16_t d_10_bit_r_counter;
00053     static const uint8_t s_double_buff;
00054     static const uint8_t s_charge_pump_setting;
00055     static const uint8_t s_ldf;
00056     static const uint8_t s_ldp;
00057     static const uint8_t s_pd_polarity;
00058     static const uint8_t s_power_down;
00059     static const uint8_t s_cp_three_state;
00060     static const uint8_t s_counter_reset;
00061     /* reg 3 */
00062     static const uint8_t s_csr;
00063     static const uint8_t s_clk_div_mode;
00064     static const uint16_t s_12_bit_clock_divider_value;
00065     /* reg 4 */
00066     static const uint8_t s_feedback_select;
00067     uint8_t d_divider_select;
00068     uint8_t d_8_bit_band_select_clock_divider_value;
00069     static const uint8_t s_vco_power_down;
00070     static const uint8_t s_mtld;
00071     static const uint8_t s_aux_output_select;
00072     static const uint8_t s_aux_output_enable;
00073     static const uint8_t s_aux_output_power;
00074     static const uint8_t s_rf_output_enable;
00075     static const uint8_t s_output_power;
00076     /* reg 5 */
00077     static const uint8_t s_ld_pin_mode;
00078 };
00079 
00080 #endif /* ADF4350_REGS_H */