diff options
author | Derek Kozel <derek.kozel@ettus.com> | 2017-04-18 16:04:27 +0100 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:45 -0800 |
commit | f2f1204ea47865cf16e2a27fb3e004baedbb82f8 (patch) | |
tree | 6c3e52681efb86f22f09b66e0b5b1e299d837804 /host/lib/usrp/common/lmk04828.hpp | |
parent | 5a3abf352cfa3f3c387d9ff8e98525811c478fb8 (diff) | |
download | uhd-f2f1204ea47865cf16e2a27fb3e004baedbb82f8.tar.gz uhd-f2f1204ea47865cf16e2a27fb3e004baedbb82f8.tar.bz2 uhd-f2f1204ea47865cf16e2a27fb3e004baedbb82f8.zip |
lmk: Update LMK04828 driver with values for Magnesium
Diffstat (limited to 'host/lib/usrp/common/lmk04828.hpp')
-rw-r--r-- | host/lib/usrp/common/lmk04828.hpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/host/lib/usrp/common/lmk04828.hpp b/host/lib/usrp/common/lmk04828.hpp index ff063379c..80a7a8917 100644 --- a/host/lib/usrp/common/lmk04828.hpp +++ b/host/lib/usrp/common/lmk04828.hpp @@ -1,5 +1,5 @@ // -// Copyright 2015 Ettus Research LLC +// Copyright 2017 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -23,6 +23,11 @@ #include <vector> #include <stdint.h> +static const uint32_t LMK04828_ID_DEVICE_TYPE = 6; +static const uint32_t LMK04828_ID_PROD_LSB = 91; +static const uint32_t LMK04828_ID_PROD_MSB = 208; +static const uint32_t LMK04828_ID_MASKREV = 32; + class lmk04828_iface { public: @@ -30,16 +35,24 @@ public: typedef boost::function<void(std::vector<uint32_t>)> write_fn_t; typedef boost::function<uint8_t(uint32_t)> read_fn_t; - static sptr make(write_fn_t write_fn, read_fn_t read_fn); + //static sptr (write_fn_t write_fn, read_fn_t read_fn); + lmk04828_iface(write_fn_t, read_fn_t); + + ~lmk04828_iface() {} - virtual ~lmk04828_iface() {} + void verify_chip_id(); - virtual void verify_chip_id() = 0; + uint8_t get_chip_id(); - virtual uint8_t get_chip_id() = 0; + void init(); - virtual void init() = 0; + void send_sysref_pulse(); - virtual void send_sysref_pulse() = 0; +private: + // use IC Reg Map once values stabilize +// lmk04828_regs_t _regs; + + write_fn_t _write_fn; + read_fn_t _read_fn; }; #endif |