CCAux 3.0.0.0
CCAux API reference
Adc.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 * Get current voltages from the built-in ADC
13 *
14 * Use the function GetAdc() to get a handle to pass on to the other functions.
15 * Use the method Adc_release(ADCHANDLE) to return the handle.
16 *
17 * Example Usage:
18 * @include adc_example.cpp
19 *
20 ************************************************/
21
22#ifndef CC_ADC_H_
23#define CC_ADC_H_
24
25#include "CCAuxErrors.h"
26#include "CCPlatform.h"
27#include "CCAuxTypes.h"
28
29#ifdef __cplusplus
30namespace CrossControl
31{
32#endif
33
34typedef void *ADCHANDLE;
35
56EXTERN_C
57CCAUXDLL_API
59CCAUXDLL_CALLING_CONV
60GetAdc(void);
61
72EXTERN_C
73CCAUXDLL_API
74void CCAUXDLL_CALLING_CONV Adc_release(ADCHANDLE);
75
89EXTERN_C
90CCAUXDLL_API
91eErr CCAUXDLL_CALLING_CONV Adc_getVoltage(ADCHANDLE, VoltageEnum selection, float64_t *value);
92
94#ifdef __cplusplus
95} /* namespace CrossControl */
96#endif
97
98#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:30
VoltageEnum
Definition: CCAuxTypes.h:87
void * ADCHANDLE
Definition: Adc.h:34
eErr
Definition: CCAuxTypes.h:162