diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-12-03 11:34:23 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-12-03 11:34:25 +0100 |
commit | b4ea7b5211cb3fcf515bd64be5c5c59691236ad1 (patch) | |
tree | 7333ce8432829a20a855136ba09d6fef0715da21 | |
parent | 69869bd58fb9df9f1da47b778a12500cd2fbd10e (diff) |
lms: Destroy streams on device stop
They are recreated during start(). Actually, if they are not stopped
here, during start() after stop(), LMS_SetupStream() will fail because
it will detect the streams are already opened.
Change-Id: I70d47c287aabdabc5dc1304a942d130aeb10bdc5
-rw-r--r-- | Transceiver52M/device/lms/LMSDevice.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index cb5e31d..2ceca0d 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -277,7 +277,11 @@ bool LMSDevice::stop() for (i=0; i<chans; i++) { LMS_StopStream(&m_lms_stream_tx[i]); LMS_StopStream(&m_lms_stream_rx[i]); + } + for (i=0; i<chans; i++) { + LMS_DestroyStream(m_lms_dev, &m_lms_stream_tx[i]); + LMS_DestroyStream(m_lms_dev, &m_lms_stream_rx[i]); LMS_EnableChannel(m_lms_dev, LMS_CH_RX, i, false); LMS_EnableChannel(m_lms_dev, LMS_CH_TX, i, false); } |