private static void SetFilter(IDigitalSource input, int channelIndex) { if (input != null) { if (input.IsAnalogTrigger) { throw new InvalidOperationException("Analog Triggers not supported for DigitalGlitchFilters"); } Hal.DIOLowLevel.SetFilterSelect(input.PortHandleForRouting, channelIndex); int selected = DIOLowLevel.GetFilterSelect(input.PortHandleForRouting); if (selected != channelIndex) { throw new InvalidOperationException($"SetFilterSelect {channelIndex} failed -> {selected}"); } } }
public void SetPeriodCycles(long fpgaCycles) { Console.WriteLine(fpgaCycles); DIOLowLevel.SetFilterPeriod(m_channelIndex, fpgaCycles); }