CCAux 2.19.0.0
CCAux API reference
Adc.h
Go to the documentation of this file.
1
2/*
3 * Copyright (C) 2010-2022 CrossControl AB - All rights reserved
4 *
5 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 *
7 * This source code is licensed under the proprietary CrossControl software
8 * license v 1.0.Please refer to the software license text for details or
9 * contact info@crosscontrol.com for more info.
10 *
11 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 */
13/*
14 * File description:
15 * Get current voltages from the built-in ADC
16 *
17 * Use the function GetAdc() to get a handle to pass on to the other functions.
18 * Use the method Adc_release(ADCHANDLE) to return the handle.
19 *
20 * Example Usage:
21 * @include adc_example.cpp
22 *
23 ************************************************/
24
25#ifndef CC_ADC_H_
26#define CC_ADC_H_
27
28#include "CCAuxErrors.h"
29#include "CCPlatform.h"
30#include "CCAuxTypes.h"
31
32#ifdef __cplusplus
33namespace CrossControl
34{
35#endif
36
37typedef void *ADCHANDLE;
38
59EXTERN_C
60CCAUXDLL_API
62CCAUXDLL_CALLING_CONV
63GetAdc(void);
64
75EXTERN_C
76CCAUXDLL_API
77void CCAUXDLL_CALLING_CONV Adc_release(ADCHANDLE);
78
92EXTERN_C
93CCAUXDLL_API
94eErr CCAUXDLL_CALLING_CONV Adc_getVoltage(ADCHANDLE, VoltageEnum selection, float64_t *value);
95
97#ifdef __cplusplus
98} /* namespace CrossControl */
99#endif
100
101#endif /* CC_ADC_H_ */
double float64_t
Definition: CCAuxTypes.h:16
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV Adc_release(ADCHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Adc_getVoltage(ADCHANDLE, VoltageEnum selection, float64_t *value)
EXTERN_C CCAUXDLL_API ADCHANDLE CCAUXDLL_CALLING_CONV GetAdc(void)
Definition: About.h:33
VoltageEnum
Definition: CCAuxTypes.h:87
void * ADCHANDLE
Definition: Adc.h:37
eErr
Definition: CCAuxTypes.h:162