Interrupt Transferring

The digital input functions with interrupt transferring make it possible to monitor the status of the digital input line. When the state changes from low to high or/and from high to low, the driver will be alerted through a hardware interrupt. It is not necessary to periodically check the digital input line.

The DRV_EnableEvent function enables and starts digital input with interrupt transferring. The DRV_CheckEvent function gets the interrupt event type when the state changes. It also makes it possible to set a time-out interval. Please refer to the event functions for details.

Pattern Matched/Status Change/Counter/Filter

The digital input functions with pattern match/status change/counter/filter allow you to monitor the status of the digital input lines. When one of the conditions is matched, it will acknowledge the driver through a hardware interrupt. It is not necessary to periodically poll the digital input line.

The DRV_DioEnableEventAndSpecifyDiPorts function enables and starts the monitoring of the pattern match/status change/filter/counter operation. The DRV_CheckEvent function may be used to check the background status. The interrupt event type will be returned when one of the conditions is matched. Use the DRV_DioGetLatestEventDiPortsState function to retrieve the value of the input lines. Finally, use the DRV_DioDisableEvent function to disable and stop the operation.