This repository has been archived by the owner on Dec 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
finalHeader.h
132 lines (113 loc) · 3.18 KB
/
finalHeader.h
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
123
124
125
126
127
128
129
130
131
132
/****************************************************************************************
finalHeader.h
by group 2: Raul Rojas, Christa McDaniel, Alex Fotso
Objective:
This file contains all defined constants as well as all function prototypes for all
files associated with the main program of the Master Controller.
****************************************************************************************/
#ifndef FinalHeader_H
#define FinalHeader_H
//Define constants
#define FAN 22
#define COOL 13
#define HEAT 26
#define LCD_D4 104
#define LCD_D5 105
#define LCD_D6 106
#define LCD_D7 107
#define LCD_RS 102
#define LCD_E 103
#define pwrLED 6
#define syncLED 23
#define entSwitch 16
#define dwnSwitch 25
#define upSwitch 24
#define syncSwitch 17
#define rstSwitch 5
#define pwrSwitch 27
#define rows 128
#define columns 128
#define arrHr 0
#define arrMin 1
#define arrSec 2
#define arrAP 3
#define thermTimer 0
#define miscTimer 1
#define retCurrTemp 0
#define retSetTemp 1
#define retHum 2
//3-dimensional array z axis index reference constants
#define sendingAF 0 //sending AirFlow
#define receivingAF 1 //receiving AirFlow
//temps[][]: [Current temp | Set temp | Current Humidity | temp difference | start difference]
#define currTemp 0
#define setTemp 1
#define tempDiff 3
#define startDiff 4
#define hvacOut 3
//Define Prototypes
//menuFunctions.c prototypes
void lcdinitialization(void);
void lcdBoot(void);
void updateDisplay(void);
void mainDisplay(void);
void settings(int line);
void settingConfig(int line);
void errorPage1(int line);
void errorPage2(void);
void warningPage(void);
void display(int, int, int);
//void SuccessMessage(int line);
void syncMenu(int line);
void manageDeviceMenu(int line);
void addDeviceMenu(int line);
void removeDeviceMenu(int line);
void SuccessMessage(int line, int page);
void setTimeDisplay(int);
void page0(void);
void page1(void);
void page2(void);
void page3(void);
void page4(void);
void page5and6(void);
void page7(void);
void page8(void);
void page9(void);
void page10(void);
void page11(void);
void page12(void);
void page13(void);
void dispTime(void);
void remDevWarn(void);
void toRoomMenu(void);
//syncing.c prototypes
void initArray(void);
void populateArrays(void);
int addTherm(void);
int addReg(int addToRoom);
void dispMatrix(void);
void rmDevAddr(unsigned char address);
void retrieveTemps(void);
void setReg(void);
void initRegFlow(void);
void initTempsArr(void);
int countErrors(void);
void calcDiff(void);
void hvacControl(void);
void initRocArray(void);
void adjustReg(int i, int flowIndex);
void initFailedCon(void);
//time.c prototypes
int getSec(void);
void initTimeArr(void);
void updateTime(void);
void parseTime(void);
void rtTimerStart(int timerNum, int timerType);
int rtTimerEnd(int timerNum, int timerType);
//misc
int smartDelay(int i);
void setups(void);
void bootSequence(void);
void shutDownSequence(void);
void updateStatus(void);
#endif