diag_struc_t

The diag_struc_t structure defines the complete data structure returned in the handle for the pdiag_open() call. This structure holds all the needed information for all the other PDIAGEX function calls.

typedef struct handl {
                   struct intr        intr;
                   struct              handl *next;
                   int                 (*intr_func)();
                   uchar               *intr_data;>
                   struct xmem         udata_dp;
                   diagex_dds_t        dds;
                   struct timestruc_t  itime;
                   struct timestruc_t  ntime;
                   dma_info_t          *dma_info;
                   aioo_struct_t       aioo;
                   char                *scratch_pad;
                   uint                sleep_flag;
                   uint                sleep_word;
                   uint                flag_word;
                   struct watchdog wdt;
                   struct d_handle * dhandle;
                   dma_dio            * dio_st;
                   uint                   timeout;
                } diag_struc_t;
Parameter Description
intr Interrupt handler structure as defined in <sys/intr.h>. Needs to be first parameter in diag_struc_t.
(*intr_func)() Pointer to user's interrupt handler.
*intr_data Pointer to interrupt data.
udata_dp Address of cross-memory descriptor for interrupt data.
dds Structure that contains the device driver structure (dds) information for PDIAGEX. See the diagex_dds structure defined above.
itime Time elapsed for interrupts. Updated at interrupts.
ntime Time elapsed for read or write operations. Updated at reads or writes.
*dma_info Pointer to dma_info_t structure which allows multiple DMA operations. See the dma_info_t structure defined above.
aioo Set of flags for Allocations, Initializations, and Outstanding Operations.
scratch_pad PIO scratch pad for large transfers.
sleep_flag pdiag_dd_watch_for_interrupt() sets this flag to TRUE if it is sleeping and waiting for the application's interrupt handler to call pdiag_dd_interrupt_notify(). This flag is initialized to FALSE and will be set to FALSE after pdiag_dd_watch_for_interrupt() wakes up.

>The application's interrupt handler should use this word to determine whether to 'wakeup' pdiag_dd_watch_for_interrupt(). This flag should not be modified by the application's interrupt handler.

sleep_word pdiag_dd_watch_for_interrupt() sleeps on this word until the application's interrupt handler calls pdiag_dd_interrupt_notify() using this word.

This word should not be modified by the application's interrupt handler.

flag_word This flag is defined by the application and should be set by the application's interrupt handler to specify certain interrupt conditions. The application may call pdiag_dd_watch_for_interrupt(), specifying a flag_mask which will be bitwise ANDed with this flag_word. When this AND operation produces a nonzero result and pdiag_dd_watch_for_interrupt() is awake, pdiag_dd_watch_for_interrupt() will return.
wdt This is the watchdog timer used by the timeout function.
dhandle Structure returned by D_MAP_INIT macro which is called in the pdiag_open() function. This handle is used to issue DMA operations to rspc type systems.
dio_st Pointer to a DIO structure used in DMA operations.
timeout True if watchdog timer expired.