aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Transceiver52M/device/lms/LMSDevice.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index 603b23d..0442e27 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -112,6 +112,12 @@ int LMSDevice::open(const std::string &args, int ref, bool swap_channels)
delete [] info_list;
+ LOG(INFO) << "Init LMS device";
+ if (LMS_Init(m_lms_dev) != 0) {
+ LOG(ERROR) << "LMS_Init() failed";
+ return -1;
+ }
+
LOG(DEBUG) << "Setting sample rate to " << GSMRATE*sps << " " << sps;
if (LMS_SetSampleRate(m_lms_dev, GSMRATE*sps, 32) < 0)
goto out_close;
@@ -139,10 +145,6 @@ int LMSDevice::open(const std::string &args, int ref, bool swap_channels)
goto out_close;
}
- LOG(INFO) << "Init LMS device";
- if (LMS_Init(m_lms_dev) < 0)
- goto out_close;
-
/* Perform Rx and Tx calibration */
for (i=0; i<chans; i++) {
LOG(INFO) << "Calibrating chan " << i;