GNU Radio 3.3.0 C++ API
db_wbxng_adf4350.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 INCLUDED_ADF4350_H
00022 #define INCLUDED_ADF4350_H
00023 
00024 #include "db_wbxng_adf4350_regs.h"
00025 #include <usrp/db_base.h>
00026 #include <stdint.h>
00027 
00028 typedef uint64_t freq_t;
00029 class adf4350_regs;
00030 
00031 class adf4350
00032 {
00033 public:
00034     adf4350(usrp_basic_sptr _usrp, int _which, int _spi_enable);
00035     ~adf4350();
00036     void _update();
00037     bool _get_locked();
00038     void _enable(bool enable);
00039     void _write(uint8_t addr, uint32_t data);
00040     bool _set_freq(freq_t freq);
00041     freq_t _get_freq();
00042     freq_t _get_max_freq();
00043     freq_t _get_min_freq();
00044 
00045 protected:
00046     usrp_basic_sptr d_usrp;
00047     int d_which;
00048     int d_spi_enable;
00049     int d_spi_format;
00050     adf4350_regs *d_regs;
00051 };
00052 
00053 #endif /* INCLUDED_ADF4350_H */