Skip to content

Commit fe04d3b

Browse files
committed
Restart DMA on channel enable/disable
1 parent d4ad7b7 commit fe04d3b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

source/TS.NET/Drivers/Libtslitex/Thunderscope.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,10 @@ private void SetChannelEnable(int channelIndex, bool enabled, bool updateFronten
648648
{
649649
CheckOpen();
650650

651+
var restart = running;
652+
if (restart)
653+
Stop();
654+
651655
var tsChannel = new Interop.tsChannelParam_t();
652656
var retVal = Interop.GetChannelConfig(tsHandle, (uint)channelIndex, out tsChannel);
653657

@@ -667,6 +671,9 @@ private void SetChannelEnable(int channelIndex, bool enabled, bool updateFronten
667671
if (updateFrontends)
668672
UpdateFrontends();
669673

674+
if (restart)
675+
Start();
676+
670677
GetAcquisitionConfig(); // Update cachedAdcChannelMode
671678
}
672679

0 commit comments

Comments
 (0)