aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/lib/mykonos/ad937x_device.hpp
diff options
context:
space:
mode:
authorMark Meserve <mark.meserve@ni.com>2017-04-10 19:25:50 -0500
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:03:45 -0800
commit5a3abf352cfa3f3c387d9ff8e98525811c478fb8 (patch)
tree20f912d5f3380debc34fd7c21a9b356cd04dbc1a /mpm/lib/mykonos/ad937x_device.hpp
parent58510168d5a033af1450f3ddf4d87ab8f8fa1a6a (diff)
downloaduhd-5a3abf352cfa3f3c387d9ff8e98525811c478fb8.tar.gz
uhd-5a3abf352cfa3f3c387d9ff8e98525811c478fb8.tar.bz2
uhd-5a3abf352cfa3f3c387d9ff8e98525811c478fb8.zip
ad9371: Added JESD init functionality
Diffstat (limited to 'mpm/lib/mykonos/ad937x_device.hpp')
-rw-r--r--mpm/lib/mykonos/ad937x_device.hpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/mpm/lib/mykonos/ad937x_device.hpp b/mpm/lib/mykonos/ad937x_device.hpp
index ccc696714..1b21a5a04 100644
--- a/mpm/lib/mykonos/ad937x_device.hpp
+++ b/mpm/lib/mykonos/ad937x_device.hpp
@@ -25,6 +25,7 @@
#include "mpm/ad937x/ad937x_ctrl_types.hpp"
#include "adi/t_mykonos.h"
#include "adi/t_mykonos_gpio.h"
+#include "adi/mykonos_debug/t_mykonos_dbgjesd.h"
#include <uhd/exception.hpp>
@@ -40,6 +41,20 @@ public:
ad937x_device(uhd::spi_iface::sptr iface, mpm::ad937x::gpio::gain_pins_t gain_pins);
+ void begin_initialization();
+ void finish_initialization();
+ void start_jesd_rx();
+ void start_jesd_tx();
+ uint8_t get_multichip_sync_status();
+ uint8_t get_framer_status();
+ uint8_t get_deframer_status();
+
+ // debug functions for JESD
+ // TODO: make these returns useful
+ uint8_t get_deframer_irq();
+ uint16_t get_ilas_config_match();
+ void enable_jesd_loopback(uint8_t enable);
+
uint8_t get_product_id();
uint8_t get_device_rev();
mpm::ad937x::device::api_version_t get_api_version();
@@ -77,16 +92,11 @@ private:
ad937x_config_t mykonos_config;
ad937x_gain_ctrl_config_t gain_ctrl;
- void _initialize();
- void _load_arm(std::vector<uint8_t> & binary);
- void _run_initialization_calibrations();
- void _start_jesd();
- void _enable_tracking_calibrations();
-
void _apply_gain_pins(uhd::direction_t direction, mpm::ad937x::device::chain_t chain);
void _call_api_function(std::function<mykonosErr_t()> func);
void _call_gpio_api_function(std::function<mykonosGpioErr_t()> func);
+ void _call_debug_api_function(std::function<mykonosDbgErr_t()> func);
static uint8_t _convert_rx_gain(double gain);
static uint16_t _convert_tx_gain(double gain);