IoT-MBBR (masterthesis)
Masterthesis upgrading a Moving Bed BioReactor with extra sensors and cloud connectivity.
adc.h
Go to the documentation of this file.
1
/***************************************************************************/
/**
2
* @file adc.h
3
* @brief ADC functionality for reading the (battery) voltage and internal temperature.
4
* @version 3.0
5
* @author Brecht Van Eeckhoudt
6
*
7
* ******************************************************************************
8
*
9
* @section License
10
*
11
* **Copyright (C) 2020 - Brecht Van Eeckhoudt**
12
*
13
* This program is free software: you can redistribute it and/or modify
14
* it under the terms of the **GNU General Public License** as published by
15
* the Free Software Foundation, either **version 3** of the License, or
16
* (at your option) any later version.
17
*
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
22
*
23
* *A copy of the GNU General Public License can be found in the `LICENSE`
24
* file along with this source code.*
25
*
26
* @n
27
*
28
* Some methods use code obtained from examples from [Silicon Labs' GitHub](https://github.com/SiliconLabs/peripheral_examples).
29
* These sections are licensed under the Silabs License Agreement. See the file
30
* "Silabs_License_Agreement.txt" for details. Before using this software for
31
* any purpose, you must agree to the terms of that agreement.
32
*
33
******************************************************************************/
34
35
36
/* Include guards prevent multiple inclusions of the same header */
37
#ifndef _ADC_H_
38
#define _ADC_H_
39
40
41
/* Includes necessary for this header file */
42
#include <stdint.h>
/* (u)intXX_t */
43
44
45
/** Enum type for the ADC */
46
typedef
enum
adc_measurements
47
{
48
BATTERY_VOLTAGE
,
49
INTERNAL_TEMPERATURE
,
50
CH1
,
51
CH2
,
52
CH3
,
53
CH4
54
}
ADC_Measurement_t
;
55
56
57
/* Public prototypes */
58
void
initADC
(
ADC_Measurement_t
peripheral);
59
int32_t
readADC
(
ADC_Measurement_t
peripheral);
60
61
62
#endif
/* _ADC_H_ */
initADC
void initADC(ADC_Measurement_t peripheral)
Method to initialize the ADC to later check the battery voltage or internal temperature.
Definition:
adc.c:87
CH4
Definition:
adc.h:53
CH1
Definition:
adc.h:50
adc_measurements
adc_measurements
Definition:
adc.h:46
int32_t
int int32_t
Typedef defining 32 bit int type. The developer should modify this to suit the platform being deploye...
Definition:
vl53l1_types.h:83
BATTERY_VOLTAGE
Definition:
adc.h:48
INTERNAL_TEMPERATURE
Definition:
adc.h:49
readADC
int32_t readADC(ADC_Measurement_t peripheral)
Method to read the battery voltage or internal temperature.
Definition:
adc.c:189
CH2
Definition:
adc.h:51
CH3
Definition:
adc.h:52
ADC_Measurement_t
enum adc_measurements ADC_Measurement_t
firmware
EFM32HG222F64_iot-mbbr
inc
adc.h
Generated on Thu Sep 3 2020 04:44:25 for IoT-MBBR (masterthesis) by
1.8.13