versadac  1
versadac - Scalable Recorder Firmware
eio_di.h
1 /*******************************************************************************
2 FILE : eio_di.h
3 VERSION : $Id: eio_di.h 5305 2006-10-27 12:09:59Z martinto $
4 AUTHOR : David Cozens
5 SYSTEM : Diab C for PowerPC under vxWorks
6 DESCRIPTION : Types and prototypes for EIO DI API.
7 *******************************************************************************/
8 #ifndef __EIO_DI_H
9 #define __EIO_DI_H
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 /* digital input status */
15 typedef enum
16 {
17  EIO_DI_STATUS_GOOD,
18  EIO_DI_STATUS_HARDWARE_ERROR,
19  EIO_DI_STATUS_HARDWARE_CAPABILITIES_EXCEEDED,
20  EIO_DI_STATUS_RANGING
21 }EioDIStatus;
22 
23 /* digital input state */
24 typedef enum
25 {
26  EIO_DI_STATE_LOW,
27  EIO_DI_STATE_HIGH
28 }EioDIState;
29 
30 /* digial input change of state */
31 typedef enum
32 {
33  EIO_DI_STATE_UNCHANGED,
34  EIO_DI_STATE_CHANGED
35 }EioDIStateChanged;
36 
37 /* digital input runtime data */
38 typedef struct
39 {
40  EioUint32 count;
41  EioDIState state;
42  EioDIStateChanged changed;
43  EioDIStatus status;
44 }EioDIData;
45 
46 /* runtime and configuration prototypes */
47 EioDIData* eioDIGetDataPtr( EioSystem *ioSystem, EioUint8 moduleNumber, EioUint8 pointNumber);
48 void eioDIGetData( EioSystem *ioSystem, EioUint8 moduleNumber, EioUint8 pointNumber, EioDIData *dataPtr);
49 void eioDISetDebounceTimeuS( EioSystem *ioSystem, EioUint8 moduleNumber, EioUint8 pointNumber, EioUint32 debounceTimeuS);
50 void eioDISecondarySetData( EioSystem *ioSystem, EioUint8 moduleNumber, EioUint8 pointNumber, EioDIData *dataPtr);
51 
52 
53 /* CApability discovery prototypes */
54 EioBoolean eioDIIsPulseCountingSupported( EioSystem *ioSystem, EioModuleType moduleType, EioUint8 pointNumber);
55 EioBoolean eioDIIsDebounceSupported( EioSystem *ioSystem, EioModuleType moduleType, EioUint8 pointNumber);
56 EioUint32 eioDIGetActualDebounceTimeuS( EioSystem *ioSystem, EioModuleType moduleType, EioUint8 pointNumber, EioUint32 requestedDebounceTimeuS, EioUint8 cycleNumber);
57 
58 #ifdef __cplusplus
59 } /* extern "C" */
60 #endif
61 #endif /* __EIO_DI_H */
Definition: eio_syst.h:52
Definition: eio_di.h:38