Skip to content

Commit

Permalink
lms: Destroy streams on device stop
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pespin committed Dec 3, 2018
1 parent 69869bd commit b4ea7b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Transceiver52M/device/lms/LMSDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b4ea7b5

Please sign in to comment.