58 API Command Reference
Personal488 User's Manual For Windows95 and Windows NT
DigArm
AT488pnp and PCI488 only
Syntax
INT WINAPI DigArm(DevHandleT devHandle, BOOL bArm);
devHandle
refers to an interface handle.
bArm
refers to a value that arms or disarms event generation.
TRUE
= Arm,
FALSE
=
Disarm.
Returns
-1
if neither nibble is set for input, or other error
Mode
Any
Bus States
None
Example
DigArm(devHandle, TRUE);
Arms digital input event generation.
See Also
DigArmSetup, DigSetup, OnDigEvent, OnDigEventVDM
The
DigArm
command arms or disarms the event-generation due to a digital I/O port match condition.
The caller should configure the digital I/O port, the event-callback mechanism, and the match condition
prior to arming the event generation. The following code snippet illustrates this sequence:
DigSetup(devHandle, FALSE, FALSE); // Configure both nibbles for input.
OnDigEventVDM(devHandle, MyFunc, 0); // On event, call function MyFunc.
DigArmSetup(devHandle, 0x0A5); // Trigger when inputs equals 0xA5.
DigArm(devHandle, TRUE); // Enable event generation.
Event generation is automatically disarmed when an event is triggered. The event generation
configuration, however, remains intact, so event generation can be re-armed just by calling
DigArm
.
The other steps shown in the above code snippet do not need to be repeated unless the event
configuration is to be changed.
Event generation may be disarmed (
bArm = FALSE
) at any time.
Note:
This function does not configure the digital I/O port for input. The caller must use
DigSetup
to configure the port for input before performing arming event generation. If neither nibble is
configured for input the function returns
-1
and sets the error code to
IOT_BAD_VALUE2
.
Note:
Event generation may be re-armed from within the event handler to provide continuous
detection of match condition events. However, this is not guaranteed to catch every event if
the digital input values are rapidly changing.
Note:
Any digital I/O port bits configured for output are treated as “don’t care” bits for the purposes
of event generation. In other words, it is valid to arm an event when only one nibble of the
port is configured for input. In this case, the other nibble is ignored when detecting the match
condition.
Summary of Contents for OMB-PER-488/W95
Page 1: ......
Page 4: ...ii Personal488 User s Manual For Windows 95 and Windows NT Notes...
Page 38: ...32 Personal488 with GP488B Personal488 User s Manual For Windows95 and Windows NT Notes...
Page 52: ...46 Driver488 W95 Driver488 WNT Personal488 User s Manual For Windows95 and Windows NT Notes...
Page 136: ...130 Appendix Personal488 User s Manual For Windows95 and Windows NT Notes...
Page 139: ...Personal488 User s Manual For Windows 95 and Windows NT Index 133 Notes...
Page 142: ...136 Abbreviations Personal488 User s Manual For Windows95 and Windows NT Notes...