CCAux  2.7.2.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.7.2.0, 2014-08-25
8 *
9 * (c) maximatecc 2013
10 *
11 * File description:
12 * Read digital inputs
13 *
14 * Use the function GetDigIO() to get a handle to pass on to the other functions.
15 * Use the method DigIO_release(DIGIOHANDLE) to return the handle.
16 *
17 * Example Usage:
18 * @include digio_example.cpp
19 *
20 ************************************************/
21 #ifndef CC_DIGIO_H
22 #define CC_DIGIO_H
23 
24 #include "CCAuxErrors.h"
25 #include "CCPlatform.h"
26 
27 #ifdef __cplusplus
28 namespace CrossControl {
29 #endif
30 
31  typedef void* DIGIOHANDLE;
32 
36  const unsigned char DigitalIn_1 = (1 << 0);
37  const unsigned char DigitalIn_2 = (1 << 1);
38  const unsigned char DigitalIn_3 = (1 << 2);
39  const unsigned char DigitalIn_4 = (1 << 3);
40 
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