root / host / lib / usrp / usrp1 / clock_ctrl.hpp @ c9569736
History | View | Annotate | Download (1.4 kB)
| 1 |
//
|
|---|---|
| 2 |
// Copyright 2010 Ettus Research LLC
|
| 3 |
//
|
| 4 |
// This program is free software: you can redistribute it and/or modify
|
| 5 |
// it under the terms of the GNU General Public License as published by
|
| 6 |
// the Free Software Foundation, either version 3 of the License, or
|
| 7 |
// (at your option) any later version.
|
| 8 |
//
|
| 9 |
// This program is distributed in the hope that it will be useful,
|
| 10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 12 |
// GNU General Public License for more details.
|
| 13 |
//
|
| 14 |
// You should have received a copy of the GNU General Public License
|
| 15 |
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 16 |
//
|
| 17 |
|
| 18 |
#ifndef INCLUDED_USRP1_CLOCK_CTRL_HPP
|
| 19 |
#define INCLUDED_USRP1_CLOCK_CTRL_HPP
|
| 20 |
|
| 21 |
#include "usrp1_iface.hpp" |
| 22 |
#include <boost/shared_ptr.hpp> |
| 23 |
#include <boost/utility.hpp> |
| 24 |
#include <vector> |
| 25 |
|
| 26 |
/*!
|
| 27 |
* The usrp1 clock control:
|
| 28 |
* - Setup system clocks.
|
| 29 |
* - Disable/enable clock lines.
|
| 30 |
*/
|
| 31 |
class usrp1_clock_ctrl : boost::noncopyable{ |
| 32 |
public:
|
| 33 |
typedef boost::shared_ptr<usrp1_clock_ctrl> sptr;
|
| 34 |
|
| 35 |
/*!
|
| 36 |
* Make a new clock control object.
|
| 37 |
* \param iface the usrp1 iface object
|
| 38 |
* \return the clock control object
|
| 39 |
*/
|
| 40 |
static sptr make(usrp1_iface::sptr iface);
|
| 41 |
|
| 42 |
/*!
|
| 43 |
* Get the rate of the fpga clock line.
|
| 44 |
* \return the fpga clock rate in Hz
|
| 45 |
*/
|
| 46 |
virtual double get_master_clock_freq(void) = 0; |
| 47 |
|
| 48 |
}; |
| 49 |
|
| 50 |
#endif /* INCLUDED_USRP1_CLOCK_CTRL_HPP */ |