CCAux 2.20.0.0
CCAux API reference
DigIO.h
Go to the documentation of this file.
1
2/*
3 * Copyright (C) 2023 CrossControl AB
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; with
8 * version 2.1 of the License.
9 */
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
28namespace CrossControl
29{
30#endif
31
32typedef void *DIGIOHANDLE;
33
34const uint8_t DigitalIn_1 = (1 << 0);
35const uint8_t DigitalIn_2 = (1 << 1);
36const uint8_t DigitalIn_3 = (1 << 2);
37const uint8_t DigitalIn_4 = (1 << 3);
58EXTERN_C
59CCAUXDLL_API
61CCAUXDLL_CALLING_CONV
63
74EXTERN_C
75CCAUXDLL_API
76void CCAUXDLL_CALLING_CONV DigIO_release(DIGIOHANDLE);
77
95EXTERN_C
96CCAUXDLL_API
97eErr CCAUXDLL_CALLING_CONV DigIO_getDigIO(DIGIOHANDLE, uint8_t *status);
98
116EXTERN_C
117CCAUXDLL_API
118eErr CCAUXDLL_CALLING_CONV DigIO_setDigIO(DIGIOHANDLE, uint8_t state);
119
146EXTERN_C
147CCAUXDLL_API
148eErr CCAUXDLL_CALLING_CONV DigIO_getDigPowerOutput(DIGIOHANDLE, PowerOutput output, CCStatus *enabled, uint8_t *status);
149
166EXTERN_C
167CCAUXDLL_API
168eErr CCAUXDLL_CALLING_CONV DigIO_setDigPowerOutput(DIGIOHANDLE, PowerOutput output, CCStatus enabled);
169
171#ifdef __cplusplus
172} /* namespace CrossControl */
173#endif
174
175#endif /* CC_DIGIO_H */
unsigned char uint8_t
Definition: CCAuxTypes.h:37
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV DigIO_getDigIO(DIGIOHANDLE, uint8_t *status)
EXTERN_C CCAUXDLL_API DIGIOHANDLE CCAUXDLL_CALLING_CONV GetDigIO(void)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV DigIO_setDigIO(DIGIOHANDLE, uint8_t state)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV DigIO_setDigPowerOutput(DIGIOHANDLE, PowerOutput output, CCStatus enabled)
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV DigIO_release(DIGIOHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV DigIO_getDigPowerOutput(DIGIOHANDLE, PowerOutput output, CCStatus *enabled, uint8_t *status)
Definition: About.h:30
PowerOutput
Definition: CCAuxTypes.h:687
const uint8_t DigitalIn_2
Definition: DigIO.h:35
void * DIGIOHANDLE
Definition: DigIO.h:32
CCStatus
Definition: CCAuxTypes.h:153
const uint8_t DigitalIn_4
Definition: DigIO.h:37
const uint8_t DigitalIn_3
Definition: DigIO.h:36
eErr
Definition: CCAuxTypes.h:162
const uint8_t DigitalIn_1
Definition: DigIO.h:34