aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/lib/mykonos/ad937x_ctrl.cpp
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_ctrl.cpp
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_ctrl.cpp')
-rw-r--r--mpm/lib/mykonos/ad937x_ctrl.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/mpm/lib/mykonos/ad937x_ctrl.cpp b/mpm/lib/mykonos/ad937x_ctrl.cpp
index cef729686..dc4682598 100644
--- a/mpm/lib/mykonos/ad937x_ctrl.cpp
+++ b/mpm/lib/mykonos/ad937x_ctrl.cpp
@@ -128,6 +128,71 @@ public:
}
+ virtual void begin_initialization()
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ device.begin_initialization();
+ }
+
+ virtual void finish_initialization()
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ device.finish_initialization();
+ }
+
+ virtual void start_jesd_rx()
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ device.start_jesd_rx();
+ }
+
+ virtual void start_jesd_tx()
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ device.start_jesd_tx();
+ }
+
+ // TODO: interpret the status byte
+ // or provide means to do so
+ virtual uint8_t get_multichip_sync_status()
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ return device.get_multichip_sync_status();
+ }
+
+ // TODO: interpret the status byte
+ // or provide means to do so
+ virtual uint8_t get_framer_status()
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ return device.get_framer_status();
+ }
+
+ // TODO: interpret the status byte
+ // or provide means to do so
+ virtual uint8_t get_deframer_status()
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ return device.get_deframer_status();
+ }
+
+ virtual uint8_t get_deframer_irq()
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ return device.get_deframer_irq();
+ }
+
+ virtual uint16_t get_ilas_config_match()
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ return device.get_ilas_config_match();
+ }
+ virtual void enable_jesd_loopback(uint8_t enable)
+ {
+ std::lock_guard<std::mutex> lock(*spi_mutex);
+ device.enable_jesd_loopback(enable);
+ }
+
virtual uint8_t get_product_id()
{
std::lock_guard<std::mutex> lock(*spi_mutex);