CCAux  2.20.0.0
CCAux API reference
CfgIn.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  * Configurable inputs
13  *
14  * Use the function GetCfgIn() to get a handle to pass on to the other functions.
15  * Use the method CfgIn_release(CFGINHANDLE) to release the handle.
16  *
17  * Example Usage:
18  * @include cfgin_example.cpp
19  *
20  ************************************************/
21 #ifndef CC_CFGIN_H
22 #define CC_CFGIN_H
23 
24 #include "CCAuxErrors.h"
25 #include "CCPlatform.h"
26 
27 #ifdef __cplusplus
28 namespace CrossControl
29 {
30 #endif
31 
32 typedef void *CFGINHANDLE;
33 
53 EXTERN_C
54 CCAUXDLL_API
56 CCAUXDLL_CALLING_CONV
57 GetCfgIn(void);
58 
69 EXTERN_C
70 CCAUXDLL_API
71 void CCAUXDLL_CALLING_CONV CfgIn_release(CFGINHANDLE);
72 
102 EXTERN_C
103 CCAUXDLL_API
104 eErr CCAUXDLL_CALLING_CONV CfgIn_setCfgInMode(CFGINHANDLE, uint8_t channel, CfgInModeEnum set_mode);
105 
119 EXTERN_C
120 CCAUXDLL_API
121 eErr CCAUXDLL_CALLING_CONV CfgIn_getCfgInMode(CFGINHANDLE, uint8_t channel, CfgInModeEnum *get_mode);
122 
145 EXTERN_C
146 CCAUXDLL_API
147 eErr CCAUXDLL_CALLING_CONV CfgIn_getValue(CFGINHANDLE, uint8_t channel, uint16_t *sample_value);
148 
171 EXTERN_C
172 CCAUXDLL_API
173 eErr CCAUXDLL_CALLING_CONV CfgIn_getPwmValue(CFGINHANDLE, uint8_t channel, float32_t *frequency, uint16_t *duty_cycle);
174 
187 EXTERN_C
188 CCAUXDLL_API
189 eErr CCAUXDLL_CALLING_CONV CfgIn_getFrequencyValue(CFGINHANDLE, uint8_t channel, float32_t *frequency);
190 
208 EXTERN_C
209 CCAUXDLL_API
210 eErr CCAUXDLL_CALLING_CONV CfgIn_getMinFrequencyThreshold(CFGINHANDLE, uint8_t channel, float32_t *frequency);
211 
229 EXTERN_C
230 CCAUXDLL_API
231 eErr CCAUXDLL_CALLING_CONV CfgIn_setMinFrequencyThreshold(CFGINHANDLE, uint8_t channel, float32_t frequency);
232 
247 EXTERN_C
248 CCAUXDLL_API
250 
263 EXTERN_C
264 CCAUXDLL_API
265 eErr CCAUXDLL_CALLING_CONV CfgIn_getActiveIomcu(CFGINHANDLE, uint8_t *ioindex);
266 
279 EXTERN_C
280 CCAUXDLL_API
281 eErr CCAUXDLL_CALLING_CONV CfgIn_setActiveIomcu(CFGINHANDLE, uint8_t ioindex);
283 #ifdef __cplusplus
284 } /* namespace CrossControl */
285 #endif
286 
287 #endif /* CC_CFGIN_H */
unsigned short uint16_t
Definition: CCAuxTypes.h:38
float float32_t
Definition: CCAuxTypes.h:15
unsigned char uint8_t
Definition: CCAuxTypes.h:37
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CfgIn_setActiveIomcu(CFGINHANDLE, uint8_t ioindex)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CfgIn_getValue(CFGINHANDLE, uint8_t channel, uint16_t *sample_value)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CfgIn_getMinFrequencyThreshold(CFGINHANDLE, uint8_t channel, float32_t *frequency)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CfgIn_getFrequencyValue(CFGINHANDLE, uint8_t channel, float32_t *frequency)
EXTERN_C CCAUXDLL_API CFGINHANDLE CCAUXDLL_CALLING_CONV GetCfgIn(void)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CfgIn_setCfgInMode(CFGINHANDLE, uint8_t channel, CfgInModeEnum set_mode)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CfgIn_setMinFrequencyThreshold(CFGINHANDLE, uint8_t channel, float32_t frequency)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CfgIn_setFrequencyFilterLevel(CFGINHANDLE, uint8_t level)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CfgIn_getPwmValue(CFGINHANDLE, uint8_t channel, float32_t *frequency, uint16_t *duty_cycle)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CfgIn_getCfgInMode(CFGINHANDLE, uint8_t channel, CfgInModeEnum *get_mode)
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV CfgIn_release(CFGINHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CfgIn_getActiveIomcu(CFGINHANDLE, uint8_t *ioindex)
Definition: About.h:30
CfgInModeEnum
Definition: CCAuxTypes.h:591
void * CFGINHANDLE
Definition: CfgIn.h:32
eErr
Definition: CCAuxTypes.h:162