aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp_e100/usrp_e100_impl.hpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-06-06 10:21:45 +0100
committerJosh Blum <josh@joshknows.com>2011-06-06 10:21:45 +0100
commit8da2d8426e2a668b9fde31773a9e313a4ce1c2bb (patch)
tree4f047a32a431d24928992425c3f2d08bc06d001e /host/lib/usrp/usrp_e100/usrp_e100_impl.hpp
parentf239b8517b238923aacc161664857a7d7b830ab0 (diff)
downloaduhd-8da2d8426e2a668b9fde31773a9e313a4ce1c2bb.tar.gz
uhd-8da2d8426e2a668b9fde31773a9e313a4ce1c2bb.tar.bz2
uhd-8da2d8426e2a668b9fde31773a9e313a4ce1c2bb.zip
usrp-e100: bring up the clock as the first thing
We init the clock as the app wants it as the first thing we do. This greatly simplifies logic, no need to conditionally init. Clock config: perform soft reset, and removed ignore sync work Added open/close to iface so we can open and close w/o re-making. Other misc tweaks involving prints, etc...
Diffstat (limited to 'host/lib/usrp/usrp_e100/usrp_e100_impl.hpp')
-rw-r--r--host/lib/usrp/usrp_e100/usrp_e100_impl.hpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/host/lib/usrp/usrp_e100/usrp_e100_impl.hpp b/host/lib/usrp/usrp_e100/usrp_e100_impl.hpp
index 84703f828..820fcab6a 100644
--- a/host/lib/usrp/usrp_e100/usrp_e100_impl.hpp
+++ b/host/lib/usrp/usrp_e100/usrp_e100_impl.hpp
@@ -33,7 +33,9 @@
uhd::transport::zero_copy_if::sptr usrp_e100_make_mmap_zero_copy(usrp_e100_iface::sptr iface);
+static const std::string USRP_E_FPGA_FILE_NAME = "usrp_e100_fpga5.bin";
static const boost::uint16_t USRP_E_FPGA_COMPAT_NUM = 0x05;
+static const double USRP_E_DEFAULT_CLOCK_RATE = 64e6;
//! load an fpga image from a bin file into the usrp-e fpga
extern void usrp_e100_load_fpga(const std::string &bin_file);
@@ -82,7 +84,11 @@ private:
class usrp_e100_impl : public uhd::device{
public:
//structors
- usrp_e100_impl(usrp_e100_iface::sptr, const uhd::device_addr_t &);
+ usrp_e100_impl(
+ const uhd::device_addr_t &,
+ usrp_e100_iface::sptr,
+ usrp_e100_clock_ctrl::sptr
+ );
~usrp_e100_impl(void);
//the io interface
@@ -96,6 +102,12 @@ private:
//interface to ioctls and file descriptor
usrp_e100_iface::sptr _iface;
+ //ad9522 clock control
+ usrp_e100_clock_ctrl::sptr _clock_ctrl;
+
+ //ad9862 codec control
+ usrp_e100_codec_ctrl::sptr _codec_ctrl;
+
//handle io stuff
uhd::transport::zero_copy_if::sptr _data_xport;
UHD_PIMPL_DECL(io_impl) _io_impl;
@@ -108,12 +120,6 @@ private:
//configuration shadows
uhd::clock_config_t _clock_config;
- //ad9522 clock control
- usrp_e100_clock_ctrl::sptr _clock_ctrl;
-
- //ad9862 codec control
- usrp_e100_codec_ctrl::sptr _codec_ctrl;
-
//device functions and settings
void get(const wax::obj &, wax::obj &);
void set(const wax::obj &, const wax::obj &);