DSCOPTOSTATE

Universal Driver Documentation
Structure containing information on the current optoinput state of the board. For use with the dscOptoGetState and dscOptoSetState functions.

Structure Definition

 #define DSCUD_MAX_OPTO 8

typedef struct {

    BYTE edge_polarity[DSCUD_MAX_OPTO];		
    BYTE edge_detect_enab[DSCUD_MAX_OPTO];	
    BYTE edge_status[DSCUD_MAX_OPTO];		
    BYTE oint_state[DSCUD_MAX_OPTO];		
    BYTE dmm48at_oint_state;

} DSCOPTOSTATE;

Structure Members

NameDescription
edge_polarityPolarity state of each optoinput
edge_detect_enabEdge detect enable state of each optoinput 0 = disabled, 1 = enabled
edge_statusEdge detect status for each optoinput. 0 = no edge detected since last check 1 = edge detected since last check
oint_stateOptoinput state (depends on polarity for boards which support this feature.)
dmm48at_oint_stateWhen using opto edges to drive interrupts on the Diamond-MM-48-AT, the edge registers must be read (and subsequently reset) by the kernel interrupt handler before the user has a chance to read them back. The kernel interrupt handler will save the opto state register in this location so that the user can see which edge triggered the interrupt inside of the user interrupt function.


This page was last modified 01:04, 30 Jan 2004.
Copyright (c) 2004 Diamond Systems. All Rights Reserved.