Embedded System Design 2 - Project
datatypes.h
Go to the documentation of this file.
1 /***************************************************************************//**
2  * @file datatypes.h
3  * @brief Definitions of the custom data-types used.
4  * @version 2.0
5  * @author Brecht Van Eeckhoudt
6  *
7  * ******************************************************************************
8  *
9  * @section Versions
10  *
11  * @li v1.0: Moved `mcu_states` enum definition from `main.c` to this file and added `MeasurementData_t` struct data type.
12  * @li v1.1: Added another `MCU_State_t` option.
13  * @li v1.2: Added another `MCU_State_t` option.
14  * @li v1.3: Changed data types in `MeasurementData_t` struct.
15  * @li v2.0: Updated version number.
16  *
17  * ******************************************************************************
18  *
19  * @section License
20  *
21  * **Copyright (C) 2019 - Brecht Van Eeckhoudt**
22  *
23  * This program is free software: you can redistribute it and/or modify
24  * it under the terms of the **GNU General Public License** as published by
25  * the Free Software Foundation, either **version 3** of the License, or
26  * (at your option) any later version.
27  *
28  * This program is distributed in the hope that it will be useful,
29  * but WITHOUT ANY WARRANTY; without even the implied warranty of
30  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31  * GNU General Public License for more details.
32  *
33  * *A copy of the GNU General Public License can be found in the `LICENSE`
34  * file along with this source code.*
35  *
36  * @n
37  *
38  * Some methods use code obtained from examples from [Silicon Labs' GitHub](https://github.com/SiliconLabs/peripheral_examples).
39  * These sections are licensed under the Silabs License Agreement. See the file
40  * "Silabs_License_Agreement.txt" for details. Before using this software for
41  * any purpose, you must agree to the terms of that agreement.
42  *
43  ******************************************************************************/
44 
45 
46 /* Include guards prevent multiple inclusions of the same header */
47 #ifndef _DATATYPES_H_
48 #define _DATATYPES_H_
49 
50 
51 /* Include necessary for this header file */
52 #include <stdint.h> /* (u)intXX_t */
53 
54 
55 /** Enum type for the state machine */
56 typedef enum mcu_states
57 {
65 } MCU_State_t;
66 
67 
68 /** Struct type to store the gathered data */
69 typedef struct
70 {
71  uint8_t index;
72  int32_t voltage[6];
73  int32_t intTemp[6];
74  int32_t extTemp[6];
76 
77 
78 #endif /* _DATATYPES_H_ */
Definition: datatypes.h:60
mcu_states
Definition: datatypes.h:56
enum mcu_states MCU_State_t
Definition: datatypes.h:58