CCAux  2.8.3.0
CCAux API reference
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator
DigIO.h
Go to the documentation of this file.
1 /************************************************
2 *
3 * CROSSCONTROL AUX API
4 *
5 * DigIO.h
6 *
7 * Version 2.8.3.0, 2016-04-06
8 *
9 * (c) maximatecc 2013
10 *
11 
12  * File description:
13  * Read digital inputs
14  *
15  * Use the function GetDigIO() to get a handle to pass on to the other functions.
16  * Use the method DigIO_release(DIGIOHANDLE) to return the handle.
17  *
18  * Example Usage:
19  * @include digio_example.cpp
20  *
21  ************************************************/
22 #ifndef CC_DIGIO_H
23 #define CC_DIGIO_H
24 
25 #include "CCAuxErrors.h"
26 #include "CCPlatform.h"
27 
28 #ifdef __cplusplus
29 namespace CrossControl {
30 #endif
31 
32  typedef void* DIGIOHANDLE;
33 
37  const unsigned char DigitalIn_1 = (1 << 0);
38  const unsigned char DigitalIn_2 = (1 << 1);
39  const unsigned char DigitalIn_3 = (1 << 2);
40  const unsigned char DigitalIn_4 = (1 << 3);
41 
55  EXTERN_C
56  CCAUXDLL_API
58  CCAUXDLL_CALLING_CONV
59  GetDigIO(void);
60 
71  EXTERN_C
72  CCAUXDLL_API
73  void
74  CCAUXDLL_CALLING_CONV
76 
94  EXTERN_C
95  CCAUXDLL_API
96  eErr
97  CCAUXDLL_CALLING_CONV
98  DigIO_getDigIO (DIGIOHANDLE, unsigned char* status);
99 
117  EXTERN_C
118  CCAUXDLL_API
119  eErr
120  CCAUXDLL_CALLING_CONV
121  DigIO_setDigIO (DIGIOHANDLE, unsigned char state);
122 
123 #ifdef __cplusplus
124 } /* namespace CrossControl */
125 #endif
126 
127 #endif /* CC_DIGIO_H */
128