HomeAut
options.h
1 /*
2  * options.h
3  *
4  * Created on: 2016.09.28
5  * Author: Vizi Gábor
6  * E-mail: vizi.gabor90@gmail.com
7  * Function: compiler options for project
8  * Target: STM32Fx
9  * Version: v4
10  * Last modified: 2016.09.28
11  */
12 
13 #ifndef OPTIONS_H_
14 #define OPTIONS_H_
15 
16 
18 
19 
20 // !!IMPORTANT!! TODO: Check this!
21 //#define HSE_VALUE (uint32_t)8000000
22 // not need, its included
23 
24 
28 //#define CONFIG_USE_TERMINAL_HYPERTERMINAL
29 #define CONFIG_USE_TERMINAL_ZOC
30 //#define CONFIG_USE_TERMINAL_PUTTY
31 
32 
35 
36 // For wait password
37 //#define MONITOR_GET_PASSWORD_ENABLE
38 
39 
40 // comment out, if you dont need escape sequence (cursors, history, cls, ...)
41 #define MONITOR_ESCAPE_SEQUENCE_ENABLE
42 
43 #ifdef MONITOR_ESCAPE_SEQUENCE_ENABLE
44  // If you want use monitor program's history
45  // Turn off, if has small memory, now it need 1.5k RAM
46  #define USE_MONITOR_HISTORY
47 #endif
48 
49 
50 // ESP8266
51 //#define USE_ESP8266_TEST_FASTENHOME
52 //#define USE_ESP8266_MODE_CLIENT
53 
54 
55 
57 // Select your panel
59 
60 // XXX: Select your panel
61 // NOTE: Recommend define at project settings:
62 //#define CONFIG_USE_PANEL_NUCLEOF401RE
63 //#define CONFIG_USE_PANEL_CENTERPANEL
64 //#define CONFIG_USE_PANEL_DISCOVERY
65 
66 
67 #if !defined(CONFIG_USE_PANEL_NUCLEOF401RE) \
68  && !defined(CONFIG_USE_PANEL_CENTERPANEL) \
69  && !defined(CONFIG_USE_PANEL_DISCOVERY)
70 #error "Miss config define! Use CONFIG_USE_PANEL_..."
71 #endif
72 
73 
74 // Enabled modules
75 
76 
77 #ifdef CONFIG_USE_PANEL_CENTERPANEL
78 
79  #define CONFIG_MICROCONTROLLER_STM32F4xx
80 
81  #define CONFIG_MODULE_ESP8266_ENABLE
82 
83  #define CONFIG_MODULE_DEBUGUSART_ENABLE
84  //#define CONFIG_USE_FREERTOS
85 
86  #define CONFIG_MODULE_ESP8266_ENABLE
87  #define CONFIG_MODULE_DEBUGUSART_ENABLE
88  #define CONFIG_USE_FREERTOS
89  #define CONFIG_MODULE_FLASH_ENABLE
90  #define CONFIG_MODULE_TEMPERATURE_ENABLE
91  #define CONFIG_MODULE_ADC_ENABLE
92 
93 #endif
94 
95 
96 
97 #ifdef CONFIG_USE_PANEL_NUCLEOF401RE
98  // STM32 Nucleo F401RE
99 
100  #define CONFIG_MICROCONTROLLER_STM32F4xx
101 
102  #define CONFIG_MODULE_DEBUGUSART_ENABLE
103 
104  #define CONFIG_MODULE_MONITOR_ENABLE
105 
106  //#define CONFIG_USE_FREERTOS
107 
108  #define CONFIG_MODULE_LED_ENABLE
109 
110  #define CONFIG_MODULE_BUTTON_ENABLE
111 
112  //#define CONFIG_MODULE_IO_ENABLE
113 
114  //#define CONFIG_MODULE_HOMEAUTMESSAGE_ENABLE
115 
116  //#define CONFIG_MODULE_RASPBERRYPI_ENABLE
117 
118  //#define CONFIG_MODULE_ESP8266_ENABLE
119 
120  //#define CONFIG_MODULE_FLASH_ENABLE
121 
122  //#define CONFIG_MODULE_TEMPERATURE_ENABLE
123 
124  //#define CONFIG_MODULE_ADC_ENABLE
125 
126  //#define CONFIG_MODULE_SYSMANAGER_ENABLE
127 
128  //#define CONFIG_MODULE_COMMON_DAC_ENABLE
129  // Because, there is no DAC in NUCLEOF401RE
130 
131  #define CONFIG_MODULE_COMMON_IO_ENABLE
132 
133  #define CONFIG_MODULE_COMMON_ADC_ENABLE
134 
135 #endif
136 
137 
138 
139 #ifdef CONFIG_USE_PANEL_DISCOVERY
140  // STM32F4 Discovery
141 
142  #define CONFIG_MICROCONTROLLER_STM32F4xx
143 
144  #define CONFIG_MODULE_DEBUGUSART_ENABLE
145 
146  #define CONFIG_MODULE_MONITOR_ENABLE
147 
148  //#define CONFIG_USE_FREERTOS
149 
150  #define CONFIG_MODULE_LED_ENABLE
151 
152  #define CONFIG_MODULE_BUTTON_ENABLE
153 
154  //#define CONFIG_MODULE_IO_ENABLE
155 
156  //#define CONFIG_MODULE_HOMEAUTMESSAGE_ENABLE
157 
158  //#define CONFIG_MODULE_RASPBERRYPI_ENABLE
159 
160  //#define CONFIG_MODULE_ESP8266_ENABLE
161 
162  //#define CONFIG_MODULE_FLASH_ENABLE
163 
164  //#define CONFIG_MODULE_TEMPERATURE_ENABLE
165 
166  //#define CONFIG_MODULE_ADC_ENABLE
167 
168  //#define CONFIG_MODULE_SYSMANAGER_ENABLE
169 
170  #define CONFIG_MODULE_COMMON_DAC_ENABLE
171 
172  #define CONFIG_MODULE_COMMON_IO_ENABLE
173 
174  #define CONFIG_MODULE_COMMON_ADC_ENABLE
175 
176 #endif
177 
178 
179 
180 #ifdef CONFIG_USE_FREERTOS
181 
182 // FreeRTOS task defines
183 
184 #define MONITOR_TASK_STACK_SIZE configMINIMAL_STACK_SIZE * 10
185 #define MONITOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
186 
187 #define ESP8266_TASK_STACK_SIZE configMINIMAL_STACK_SIZE * 3
188 #define ESP8266_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
189 
190 #define SYSMANAGER_TASK_STACK_SIZE configMINIMAL_STACK_SIZE * 2
191 #define SYSMANAGER_TASK_PRIORITY ( tskIDLE_PRIORITY + 3UL )
192 
193 #endif
194 
195 
196 
198 #define CONFIG_DEBUG_MODE
199 #define CONFIG_SWO_ENABLE
200 
201 
202 
204 #define MODULE_STRING_UNIT_TEST_ENABLE
205 
206 
207 
208 #endif /* OPTIONS_H_ */