Struct DSCUSERINT

Universal Driver Documentation
Structure containing configuration data for user interrupt operation.

Structure Definition

typedef struct {

    BYTE intsource;
    FLOAT rate;
    BYTE clksource;
    BYTE counter;
    DWORD int_type;
    DSCUserInterruptFunction func;

} DSCUSERINT;

Structure Members

NameDescription
intsourceThis field indicates the source of the interrupts. You may select USER_INT_SOURCE_INTERNAL to use an on-board counter/timer, or USER_INT_SOURCE_EXTERNAL to use an external clock. Refer to each board's user manual for details on the options for counter/timer and external clock.
rateRequired only when intsource = USER_INT_SOURCE_INTERNAL. If you select a non-zero value, the on-board counter/timer will be programmed to generate interrupts at this rate. If this value is set to 0 then the dscUserInt function will not program the board's counter/timer with a new value, and will assume that the counter has been preprogrammed. This is useful if you want to control the counter/timer rate yourself.
counterIf you choose intsource = USER_INT_SOURCE_INTERNAL, you must specify which on-board counter you will be using to generate the interrupts. Each board has different valid options for clksource.
clksourceSelects the source of the clock that drives the on-boardcounter-timer when intsource = USER_INT_SOURCE_INTERNAL. On Diamond-MM-32: 0 = internal 10MHz, 1 = internal 10kHz, 2 = external. On all other boards: 0 = internal, 1 = external.
int_typeReturns the interrupt type that the driver attached the interrupt handler to. This depends on which board you are using, but will generally be INT_TYPE_DIO or INT_TYPE_COUNTER.
funcThis is a reference pointer to the user interrupt function that was attached to the interrupt. This is usually passed in as a parameter to the dscUserInt() function.


This page was last modified 16:18, 12 Feb 2004.
Copyright (c) 2004 Diamond Systems. All Rights Reserved.