Operation | Typical ioctl() Call |
---|---|
Set pulse width to N microseconds. | ioctl(eifd, EIIOCSETOPW, N) |
Return current output pulse width. | ioctl(eifd,EIIOCGETOPW,&var) |
Send a pulse on some lines M.[1] | ioctl(eifd, EIIOCSTROBE, M) |
Set a high (active, asserted) level on lines M. | ioctl(eifd, EIIOCSETHI, M) |
Set a low (inactive, deasserted) level on lines M. | ioctl(eifd, EIIOCSETLO, M) |
In the Challenge and Onyx series, the level on an outgoing external interrupt line is set directly from a CPU. The device driver generates a pulse (function EIIOCSTROBE) by asserting the line, then spinning in a disabled loop until the specified pulse time has elapsed, and finally deasserting the line. Clearly, if the pulse width is set to much more than the default of 5 microseconds, pulse generation could interfere with the handling of other interrupts.
The calls to assert and deassert the outgoing lines (functions EIIOCSETHI and EIIOCSETLO) do not tie up the kernel. However, direct assertion of the outgoing signal should be used only when the desired signal frequency and pulse duration are measured in milliseconds or seconds. No user-level program can hope to generate pulse durations measured in microseconds by calling these functions. For one thing, the minimum guaranteed interrupt service time is 200 microseconds. An interrupt occurring between the call to assert the signal and the call to deassert it will stretch the intended pulse width by at least 200 microseconds.