-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmodel.h
More file actions
122 lines (109 loc) · 3.66 KB
/
model.h
File metadata and controls
122 lines (109 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/**
* @file model.h
* @author Arella Matteo <br/>
* (mail: arella.1646983@studenti.uniroma1.it)
* @date 2018
* @brief Board model header file
*/
#ifndef _MODEL_H_
#define _MODEL_H_
#include <Arduino.h>
/**
* @page Model_page Board model
*
* VCU is based on an Atmel SAM3X8E board with an ARM Cortex-M3 microprocessor.
*
* IO signals managed from VCU are:
* - ANALOG
* 1. First APPS .................... [in]
* 2. Second APPS ................... [in]
* 3. Brake pedal position sensor ... [in]
* 4. SC voltage .................... [in]
* - DIGITAL
* 1. AIR+ .......................... [out]
* 2. AIR- .......................... [out]
* 3. Precharge ..................... [out]
* 4. RTDS buzzer ................... [out]
* 5. AIR button .................... [in]
* 6. RTD button .................... [in]
*
* In case of @ref CAN_servizi_page failure both APPS and brake pedal position
* sensor are acquired by analog signals for fault tolerance.
*/
/** @defgroup Board_model_group Board model
*
* @{
*/
/**
* @brief This function initializes hardware board.
*
* @author Arella Matteo <br/>
* (mail: arella.1646983@studenti.uniroma1.it)
*/
void model_init();
/**
* @brief This function returns the value of the first APPS in percentage,
* retrieved by CAN servizi network, if online, or by analog signal.
*
* @author Arella Matteo <br/>
* (mail: arella.1646983@studenti.uniroma1.it)
*
* @return First APPS percentage value
*/
volatile uint8_t get_tps1_percentage();
/**
* @brief This function returns the value of the second APPS in percentage,
* retrieved by CAN servizi network, if online, or by analog signal.
*
* @author Arella Matteo <br/>
* (mail: arella.1646983@studenti.uniroma1.it)
*
* @return Second APPS percentage value
*/
volatile uint8_t get_tps2_percentage();
/**
* @brief This function returns the value of the brake pedal position sensor
* in percentage, retrieved by CAN servizi network, if online, or
* by analog signal.
*
* @author Arella Matteo <br/>
* (mail: arella.1646983@studenti.uniroma1.it)
*
* @return Brake pedal position sensor percentage value
*/
volatile uint8_t get_brake_percentage();
/**
* @brief This function returns the value of APPS plausibility retrieved
* by CAN servizi network, if online, or by analog signal.
*
* @author Arella Matteo <br/>
* (mail: arella.1646983@studenti.uniroma1.it)
*
* @retval true APPS plausibility
* @retval false APPS implausibility
*/
volatile bool get_apps_plausibility();
/**
* @brief This function returns the value of brake plausibility retrieved
* by CAN servizi network, if online, or by analog signal.
*
* @author Arella Matteo <br/>
* (mail: arella.1646983@studenti.uniroma1.it)
*
* @retval true Brake plausibility
* @retval false Brake implausibility
*/
volatile bool get_brake_plausibility();
/**
* @brief This function returns the value of the SC.
*
* @author Arella Matteo <br/>
* (mail: arella.1646983@studenti.uniroma1.it)
*
* @return SC value
*/
volatile uint16_t get_SC_value();
/**
* @}
*/
#endif /* _MODEL_H_ */