Rename Protocol/FrameworkHii.h to Protocol/HiiFramework.h to follow the naming conven...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / DriverSampleDxe / Vfr.vfr
CommitLineData
35fec2c4 1// *++\r
103b6520 2//\r
35fec2c4 3// Copyright (c) 2006, Intel Corporation\r
4// All rights reserved. This program and the accompanying materials\r
5// are licensed and made available under the terms and conditions of the BSD License\r
6// which accompanies this distribution. The full text of the license may be found at\r
7// http://opensource.org/licenses/bsd-license.php\r
103b6520 8//\r
35fec2c4 9// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
103b6520 11//\r
103b6520 12// Module Name:\r
13//\r
35fec2c4 14// Vfr.vfr\r
15//\r
103b6520 16// Abstract:\r
35fec2c4 17//\r
103b6520 18// Sample Setup formset\r
35fec2c4 19//\r
20// Revision History:\r
21//\r
103b6520 22// --*/\r
23\r
24\r
35fec2c4 25\r
103b6520 26#include "NVDataStruc.h"\r
27\r
28\r
29typedef struct {\r
30 UINT8 Field8;\r
31 UINT16 Field16;\r
32 UINT8 OrderedList[3];\r
33} MyIfrNVData2;\r
34\r
35typedef struct {\r
36 UINT8 Field8;\r
37 UINT16 Field16;\r
38 UINT8 OrderedList[3];\r
39} MyIfrNVData3;\r
40\r
35fec2c4 41#define MY_TEXT_KEY 0x100\r
103b6520 42\r
43#define LABEL_1_VALUE 0x01\r
44#define LABEL_2_VALUE 0x1000\r
45#define LABEL_UPDATE_BBS 0x2222\r
46#define LABEL_END_UPDATE_BBS 0x2223\r
47\r
35fec2c4 48formset\r
103b6520 49 guid = FORMSET_GUID,\r
35fec2c4 50 title = STRING_TOKEN(STR_FORM_SET_TITLE),\r
51 help = STRING_TOKEN(STR_FORM_SET_TITLE_HELP),\r
52 class = 0x10,\r
103b6520 53 subclass = 0,\r
54\r
55 varstore MyIfrNVData2, key = 0x1234, name = MY_DATA2, guid = FORMSET_GUID;\r
56\r
35fec2c4 57 varstore MyIfrNVData, key = 0x1324, name = MY_DATA1, guid = FORMSET_GUID;\r
103b6520 58\r
59 varstore MyIfrNVData3, key = 0x4321, name = MY_DATA3, guid = FORMSET_GUID;\r
60\r
61 form formid = 1,\r
62 title = STRING_TOKEN(STR_FORM1_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code\r
35fec2c4 63\r
103b6520 64 subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT);\r
65\r
66 subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2);\r
67\r
35fec2c4 68 banner\r
103b6520 69 title = STRING_TOKEN(STR_BANNER_TITLE),\r
70 line 1,\r
71 align center;\r
35fec2c4 72\r
73 banner\r
103b6520 74 title = STRING_TOKEN(STR_BANNER_TITLE),\r
75 line 2,\r
76 align left;\r
77\r
35fec2c4 78 banner\r
103b6520 79 title = STRING_TOKEN(STR_BANNER_TITLE),\r
80 line 2,\r
81 align right;\r
82\r
35fec2c4 83 text\r
84 help = STRING_TOKEN(STR_TEXT_HELP),\r
103b6520 85 text = STRING_TOKEN(STR_CPU_STRING),\r
86 text = STRING_TOKEN(STR_CPU_STRING2),\r
87 flags = 0,\r
88 key = 0;\r
89\r
35fec2c4 90 text\r
91 help = STRING_TOKEN(STR_EXIT_TEXT),\r
92 text = STRING_TOKEN(STR_EXIT_TEXT),\r
103b6520 93 text = STRING_TOKEN(STR_EXIT_TEXT),\r
94 flags = INTERACTIVE,\r
95 key = 0x1237;\r
96\r
97 oneof varid = MyIfrNVData.SuppressGrayOutSomething,\r
98 prompt = STRING_TOKEN(STR_ONE_OF_PROMPT),\r
35fec2c4 99 help = STRING_TOKEN(STR_ONE_OF_HELP),\r
100 option text = STRING_TOKEN(STR_ONE_OF_TEXT4), value = 0x0, flags = 0;\r
103b6520 101 option text = STRING_TOKEN(STR_ONE_OF_TEXT5), value = 0x1, flags = 0;\r
102 option text = STRING_TOKEN(STR_ONE_OF_TEXT6), value = 0x2, flags = DEFAULT;\r
103 endoneof;\r
104\r
105 oneof varid = MyIfrNVData.BootOrderLarge,\r
106 prompt = STRING_TOKEN(STR_ONE_OF_PROMPT),\r
35fec2c4 107 help = STRING_TOKEN(STR_ONE_OF_HELP),\r
108 option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0x0, flags = INTERACTIVE, key = 1;\r
103b6520 109 option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 0x1, flags = INTERACTIVE | DEFAULT, key = 2;\r
110 endoneof;\r
111\r
112 grayoutif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x1;\r
113 suppressif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x0;\r
114 label 0;\r
115 checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry,\r
116 prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),\r
35fec2c4 117 help = STRING_TOKEN(STR_CHECK_BOX_HELP),\r
103b6520 118 flags = 1, // Flags behavior for checkbox is overloaded so that it equals a DEFAULT value. 1 = ON, 0 = off\r
119 key = 0,\r
120 endcheckbox;\r
121 endif;\r
122\r
123\r
124 //\r
35fec2c4 125 // Ordered list:\r
103b6520 126 // sizeof(MyIfrNVData) storage must be UINT8 array, and\r
127 // size written for the variable must be size of the entire\r
128 // variable.\r
129 //\r
130 //\r
131 suppressif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x0;\r
132 label LABEL_UPDATE_BBS;\r
133 orderedlist\r
134 varid = MyIfrNVData.BootOrder,\r
135 prompt = STRING_TOKEN(STR_BOOT_OPTIONS),\r
136 help = STRING_TOKEN(STR_NULL_STRING),\r
137 option text = STRING_TOKEN(STR_BOOT_OPTION2), value = 2, flags = RESET_REQUIRED;\r
138 option text = STRING_TOKEN(STR_BOOT_OPTION1), value = 1, flags = RESET_REQUIRED;\r
139 option text = STRING_TOKEN(STR_BOOT_OPTION3), value = 3, flags = RESET_REQUIRED;\r
140 option text = STRING_TOKEN(STR_BOOT_OPTION4), value = 4, flags = RESET_REQUIRED;\r
35fec2c4 141 endlist;\r
103b6520 142 label LABEL_END_UPDATE_BBS;\r
143 endif;\r
35fec2c4 144\r
103b6520 145 suppressif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x2;\r
35fec2c4 146 orderedlist\r
103b6520 147 varid = MyIfrNVData.OrderedList,\r
148 prompt = STRING_TOKEN(STR_TEST_OPCODE),\r
35fec2c4 149 help = STRING_TOKEN(STR_TEXT_HELP),\r
103b6520 150 option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 4, flags = RESET_REQUIRED;\r
151 option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 3, flags = RESET_REQUIRED;\r
152 option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 2, flags = RESET_REQUIRED;\r
153 option text = STRING_TOKEN(STR_TEXT_HELP), value = 1, flags = RESET_REQUIRED;\r
154 endlist;\r
155 endif;\r
35fec2c4 156\r
103b6520 157 label 100;\r
158\r
35fec2c4 159 goto 0x1234,\r
160 prompt = STRING_TOKEN(STR_GOTO_DYNAMIC),\r
103b6520 161 help = STRING_TOKEN(STR_GOTO_HELP),\r
35fec2c4 162 flags = INTERACTIVE,\r
103b6520 163 key = 0x1234;\r
164\r
35fec2c4 165 goto 0x1234,\r
166 prompt = STRING_TOKEN(STR_GOTO_DYNAMIC2),\r
103b6520 167 help = STRING_TOKEN(STR_GOTO_HELP),\r
35fec2c4 168 flags = INTERACTIVE,\r
103b6520 169 key = 0x1235;\r
35fec2c4 170\r
103b6520 171 //\r
172 // VARSTORE tests\r
173 //\r
174 // Till now, been using variable NvData (must be reserved)\r
175 // now we do a varselect for variable NvData3\r
176 inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),\r
177 ideqid MyIfrNVData3.Field16 == MyIfrNVData3.Field16\r
178 endif;\r
179 // now we do a varselect_pair for variable NvData2 and NvData3\r
180 inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),\r
181 ideqid MyIfrNVData2.Field16 == MyIfrNVData3.Field16\r
182 endif;\r
183\r
184\r
185 // now we do a varselect_pair for variable NvData and NvData2\r
186// inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),\r
187// ideqid MyIfrNVData2.Field16 == MyIfrNVData.TestLateCheck\r
188// endif;\r
189\r
190 inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),\r
191 ideqid MyIfrNVData.TestLateCheck == MyIfrNVData.TestLateCheck2\r
192 endif;\r
193\r
194 oneof varid = MyIfrNVData.TestLateCheck,\r
195 prompt = STRING_TOKEN(STR_TEST_OPCODE),\r
35fec2c4 196 help = STRING_TOKEN(STR_ONE_OF_HELP),\r
103b6520 197 option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = LATE_CHECK | RESET_REQUIRED;\r
198 option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = LATE_CHECK | DEFAULT | RESET_REQUIRED;\r
199 endoneof;\r
200\r
201 oneof varid = MyIfrNVData.TestLateCheck2,\r
202 prompt = STRING_TOKEN(STR_TEST_OPCODE2),\r
35fec2c4 203 help = STRING_TOKEN(STR_ONE_OF_HELP),\r
103b6520 204 option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = LATE_CHECK | DEFAULT | RESET_REQUIRED;\r
205 option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = LATE_CHECK | RESET_REQUIRED;\r
206\r
207 endoneof;\r
208\r
209 oneof varid = MyIfrNVData.QuestionAboutTreeHugging,\r
210 prompt = STRING_TOKEN(STR_ONE_OF_PROMPT),\r
35fec2c4 211 help = STRING_TOKEN(STR_ONE_OF_HELP),\r
103b6520 212 option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = RESET_REQUIRED;\r
213 option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = DEFAULT | RESET_REQUIRED;\r
214 option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 0x03, flags = RESET_REQUIRED;\r
215\r
216 endoneof;\r
217\r
218 string varid = MyIfrNVData.MyStringData,\r
219 prompt = STRING_TOKEN(STR_MY_STRING_PROMPT2),\r
220 help = STRING_TOKEN(STR_MY_STRING_HELP2),\r
221 flags = INTERACTIVE,\r
222 key = 0x1234,\r
223 minsize = 6,\r
224 maxsize = 0x14,\r
35fec2c4 225 endstring;\r
103b6520 226\r
35fec2c4 227 text\r
228 help = STRING_TOKEN(STR_GRAYOUT_TEST),\r
103b6520 229 text = STRING_TOKEN(STR_GRAYOUT_TEST),\r
230 text = STRING_TOKEN(STR_GRAYOUT_TEST),\r
231 flags = INTERACTIVE,\r
232 key = 0x1555;\r
233\r
35fec2c4 234 text\r
235 help = STRING_TOKEN(STR_SUPPRESS_TEST),\r
103b6520 236 text = STRING_TOKEN(STR_SUPPRESS_TEST),\r
237 text = STRING_TOKEN(STR_SUPPRESS_TEST),\r
238 flags = INTERACTIVE,\r
239 key = 0x1556;\r
240\r
35fec2c4 241 text\r
242 help = STRING_TOKEN(STR_CLEAR_TEST),\r
103b6520 243 text = STRING_TOKEN(STR_CLEAR_TEST),\r
244 text = STRING_TOKEN(STR_CLEAR_TEST),\r
245 flags = INTERACTIVE,\r
246 key = 0x1557;\r
247\r
248 grayoutif vareqval var(VAR_EQ_TEST_NAME) == 0x1;\r
35fec2c4 249 suppressif vareqval var(VAR_EQ_TEST_NAME) == 0x1000;\r
103b6520 250 label 30;\r
251 checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry,\r
252 prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),\r
35fec2c4 253 help = STRING_TOKEN(STR_CHECK_BOX_HELP),\r
103b6520 254 flags = 1,\r
255 key = 0,\r
256 endcheckbox;\r
257 endif;\r
258\r
259\r
35fec2c4 260 numeric varid = MyIfrNVData.HowOldAreYouInYearsManual,\r
103b6520 261 prompt = STRING_TOKEN(STR_NUMERIC_MANUAL_PROMPT),\r
262 help = STRING_TOKEN(STR_NUMERIC_HELP0),\r
263 minimum = 0,\r
264 maximum = 0xf0, // 0xf0 = 240 in decimal\r
265 step = 0, // Stepping of 0 equates to a manual entering\r
266 // of a value, otherwise it will auto-increment\r
267 // with a left/right arrow\r
35fec2c4 268 default = 21,\r
103b6520 269\r
270 endnumeric;\r
271\r
35fec2c4 272 numeric varid = MyIfrNVData.HowTallAreYouManual,\r
103b6520 273 prompt = STRING_TOKEN(STR_TALL_MANUAL_PROMPT),\r
274 help = STRING_TOKEN(STR_NUMERIC_HELP1),\r
275 minimum = 0,\r
276 maximum = 300,\r
277 step = 0, // Stepping of 0 equates to a manual entering\r
278 // of a value, otherwise it will auto-increment\r
279 // with a left/right arrow\r
35fec2c4 280 default = 175,\r
103b6520 281\r
282 endnumeric;\r
283\r
284 inventory\r
285 help = STRING_TOKEN(STR_INVENTORY_HELP),\r
286 text = STRING_TOKEN(STR_INVENTORY_TEXT1),\r
287 text = STRING_TOKEN(STR_INVENTORY_TEXT2);\r
288\r
35fec2c4 289\r
103b6520 290 restore defaults,\r
291 formid = 4,\r
292 prompt = STRING_TOKEN(STR_RESTORE_DEFAULTS_PROMPT),\r
293 help = STRING_TOKEN(STR_RESTORE_DEFAULTS_HELP),\r
294 flags = 0,\r
295 key = 0;\r
296\r
297 save defaults,\r
298 formid = 4,\r
299 prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT),\r
300 help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP),\r
301 flags = 0,\r
302 key = 0;\r
303\r
35fec2c4 304 //\r
103b6520 305 // Case with no flags or key\r
306 //\r
307 save defaults,\r
308 formid = 4,\r
309 prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT),\r
310 help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP);\r
311 //\r
312 // Case with no key\r
313 //\r
314 save defaults,\r
315 formid = 4,\r
316 prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT),\r
317 help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP),\r
318 flags = 0;\r
319 //\r
320 // Case with no flags\r
321 //\r
322 save defaults,\r
323 formid = 4,\r
324 prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT),\r
325 help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP),\r
326 key = 0;\r
327\r
328 label LABEL_2_VALUE;\r
329\r
330 grayoutif ideqval MyIfrNVData.HowOldAreYouInYearsManual == 23 AND ideqval MyIfrNVData.SuppressGrayOutSomething == 0x1;\r
35fec2c4 331 numeric varid = MyIfrNVData.HowOldAreYouInYears,\r
103b6520 332 prompt = STRING_TOKEN(STR_NUMERIC_PROMPT),\r
333 help = STRING_TOKEN(STR_NUMERIC_HELP2),\r
334 minimum = 0,\r
335 maximum = 243,\r
336 step = 3,\r
337 default = 18,\r
338\r
339 endnumeric;\r
340\r
341 label LABEL_1_VALUE;\r
342\r
343 //\r
344 // Numeric with no step or default specified\r
345 //\r
35fec2c4 346 numeric varid = MyIfrNVData.HowTallAreYou,\r
103b6520 347 prompt = STRING_TOKEN(STR_NUMERIC_PROMPT1),\r
348 help = STRING_TOKEN(STR_NUMERIC_HELP3),\r
349 minimum = 0,\r
350 maximum = 190,\r
351 // step = 1, // Stepping of 1 if not specified\r
352 // default = minimum; // if not specified\r
353 endnumeric;\r
354 endif;\r
355\r
356 string varid = MyIfrNVData.MyStringData,\r
357 prompt = STRING_TOKEN(STR_MY_STRING_PROMPT),\r
358 help = STRING_TOKEN(STR_MY_STRING_HELP),\r
359 minsize = 6,\r
360 maxsize = 0x14,\r
35fec2c4 361 endstring;\r
362\r
103b6520 363 password varid = MyIfrNVData.WhatIsThePassword,\r
364 prompt = STRING_TOKEN(STR_PASSWORD_PROMPT),\r
365 help = STRING_TOKEN(STR_PASSWORD_HELP),\r
366 minsize = 6,\r
35fec2c4 367 maxsize = 20, // new opcode\r
103b6520 368 encoding = 1,\r
35fec2c4 369 endpassword;\r
103b6520 370 password varid = MyIfrNVData.WhatIsThePassword2,\r
371 prompt = STRING_TOKEN(STR_PASSWORD_PROMPT),\r
372 help = STRING_TOKEN(STR_PASSWORD_HELP),\r
373 minsize = 6,\r
35fec2c4 374 maxsize = 20, // new opcode\r
103b6520 375 encoding = 1,\r
35fec2c4 376 endpassword;\r
103b6520 377 //\r
378 // Test with flags and key fields\r
379 //\r
380 password varid = MyIfrNVData.WhatIsThePassword,\r
381 prompt = STRING_TOKEN(STR_PASSWORD_PROMPT),\r
382 help = STRING_TOKEN(STR_PASSWORD_HELP),\r
383 flags = INTERACTIVE,\r
384 key = 0x2000,\r
385 minsize = 6,\r
35fec2c4 386 maxsize = 20, // new opcode\r
103b6520 387 encoding = 1,\r
388 endpassword;\r
389\r
35fec2c4 390 goto 2,\r
103b6520 391 prompt = STRING_TOKEN(STR_GOTO_FORM2), //SecondSetupPage // this too has no end-op and basically it's a jump to a form ONLY\r
392 help = STRING_TOKEN(STR_GOTO_HELP);\r
393\r
35fec2c4 394 goto 3,\r
103b6520 395 prompt = STRING_TOKEN(STR_GOTO_FORM3), //ThirdSetupPage // this too has no end-op and basically it's a jump to a form ONLY\r
396 help = STRING_TOKEN(STR_GOTO_HELP);\r
397\r
398 endform;\r
399\r
35fec2c4 400 form formid = 2, // SecondSetupPage,\r
103b6520 401 title = STRING_TOKEN(STR_FORM2_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code\r
402\r
403\r
404 date year varid = Date.Year, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
405 prompt = STRING_TOKEN(STR_DATE_PROMPT),\r
406 help = STRING_TOKEN(STR_DATE_YEAR_HELP),\r
407 minimum = 1998,\r
408 maximum = 2099,\r
409 step = 1,\r
410 default = 2004,\r
411\r
412 month varid = Date.Month, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
413 prompt = STRING_TOKEN(STR_DATE_PROMPT),\r
414 help = STRING_TOKEN(STR_DATE_MONTH_HELP),\r
415 minimum = 1,\r
416 maximum = 12,\r
417 step = 1,\r
418 default = 1,\r
419\r
420 day varid = Date.Day, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
421 prompt = STRING_TOKEN(STR_DATE_PROMPT),\r
422 help = STRING_TOKEN(STR_DATE_DAY_HELP),\r
423 minimum = 1,\r
424 maximum = 31,\r
425 step = 0x1,\r
426 default = 1,\r
427\r
428 enddate;\r
429\r
430 time hour varid = Time.Hours, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
431 prompt = STRING_TOKEN(STR_TIME_PROMPT),\r
432 help = STRING_TOKEN(STR_TIME_HOUR_HELP),\r
433 minimum = 0,\r
434 maximum = 23,\r
435 step = 1,\r
436 default = 0,\r
437\r
438 minute varid = Time.Minutes, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
439 prompt = STRING_TOKEN(STR_TIME_PROMPT),\r
440 help = STRING_TOKEN(STR_TIME_MINUTE_HELP),\r
441 minimum = 0,\r
442 maximum = 59,\r
443 step = 1,\r
444 default = 0,\r
445\r
446 second varid = Time.Seconds, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
447 prompt = STRING_TOKEN(STR_TIME_PROMPT),\r
448 help = STRING_TOKEN(STR_TIME_SECOND_HELP),\r
449 minimum = 0,\r
450 maximum = 59,\r
451 step = 1,\r
452 default = 0,\r
453\r
454 endtime;\r
455\r
456 date year varid = Date.Year, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
457 prompt = STRING_TOKEN(STR_DATE_PROMPT),\r
458 help = STRING_TOKEN(STR_DATE_YEAR_HELP),\r
459 minimum = 1939,\r
460 maximum = 2101,\r
461 step = 1,\r
462 default = 1964,\r
463\r
464 month varid = Date.Month, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
465 prompt = STRING_TOKEN(STR_DATE_PROMPT),\r
466 help = STRING_TOKEN(STR_DATE_MONTH_HELP),\r
467 minimum = 1,\r
468 maximum = 12,\r
469 step = 1,\r
470 default = 1,\r
471\r
472 day varid = Date.Day, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
473 prompt = STRING_TOKEN(STR_DATE_PROMPT),\r
474 help = STRING_TOKEN(STR_DATE_DAY_HELP),\r
475 minimum = 1,\r
476 maximum = 31,\r
477 step = 0x1,\r
478 default = 1,\r
479\r
480 enddate;\r
481\r
482 time hour varid = Time.Hours, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
483 prompt = STRING_TOKEN(STR_TIME_PROMPT),\r
484 help = STRING_TOKEN(STR_TIME_HOUR_HELP),\r
485 minimum = 0,\r
486 maximum = 23,\r
487 step = 1,\r
488 default = 0,\r
489\r
490 minute varid = Time.Minutes, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
491 prompt = STRING_TOKEN(STR_TIME_PROMPT),\r
492 help = STRING_TOKEN(STR_TIME_MINUTE_HELP),\r
493 minimum = 0,\r
494 maximum = 59,\r
495 step = 1,\r
496 default = 0,\r
497\r
498 second varid = Time.Seconds, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from\r
499 prompt = STRING_TOKEN(STR_TIME_PROMPT),\r
500 help = STRING_TOKEN(STR_TIME_SECOND_HELP),\r
501 minimum = 0,\r
502 maximum = 59,\r
503 step = 1,\r
504 default = 0,\r
505\r
506 endtime;\r
507\r
35fec2c4 508 grayoutif\r
103b6520 509 ideqval Date.Day == 21\r
510 AND\r
511 ideqval Date.Month == 8;\r
35fec2c4 512\r
103b6520 513 hidden value = 32, key = 0x7777;\r
514\r
515 endif; // grayoutif\r
516\r
517 suppressif\r
518 ideqval Date.Day == 8\r
519 AND\r
35fec2c4 520 ideqval Date.Month == 21;\r
521\r
103b6520 522 hidden value = 32, key = 0x7777;\r
523\r
524 endif; // suppressif\r
525\r
526\r
527 hidden value = 32, key = 0x1234;\r
528\r
529 inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),\r
530 ideqval MyIfrNVData.HowOldAreYouInYearsManual == 4\r
531 endif;\r
35fec2c4 532\r
103b6520 533 inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),\r
534 ideqvallist MyIfrNVData.HowOldAreYouInYearsManual == 1 2 3 4\r
535 endif;\r
536\r
537 inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),\r
538 ideqid MyIfrNVData.HowOldAreYouInYearsManual == MyIfrNVData.MyFavoriteNumber\r
539 endif;\r
540\r
35fec2c4 541// grayoutif\r
103b6520 542//\r
543// If the day is 31 AND months is any of the following 2, 4, 6, 9, 11\r
544//\r
545 inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),\r
35fec2c4 546 ideqval Date.Day == 31\r
103b6520 547 AND\r
548 ideqvallist Date.Month == 2 4 6 9 11\r
549 endif;\r
550\r
551//\r
552// If the day is 30 AND month is 2\r
553//\r
554 inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),\r
555 ideqval Date.Day == 30\r
556 AND\r
557 ideqval Date.Month == 2\r
558 endif;\r
559\r
560//\r
561// If the day is 29 AND month is 2 AND it year is NOT a leapyear\r
562//\r
563 inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),\r
564 ideqval Date.Day == 0x1D\r
565 AND\r
35fec2c4 566 ideqval Date.Month == 2\r
103b6520 567 AND\r
568 NOT\r
569 ideqvallist Date.Year == 2004 2008 20012 20016 2020 2024 2028 2032 2036\r
570 endif;\r
571\r
572 checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry,\r
573 prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),\r
35fec2c4 574 help = STRING_TOKEN(STR_CHECK_BOX_HELP),\r
103b6520 575 flags = 1,\r
576 key = 0,\r
577 endcheckbox;\r
578\r
35fec2c4 579 text\r
580 help = STRING_TOKEN(STR_TEXT_HELP),\r
103b6520 581 text = STRING_TOKEN(STR_TEXT_TEXT_1);\r
35fec2c4 582\r
583 text\r
584 help = STRING_TOKEN(STR_TEXT_HELP),\r
103b6520 585 text = STRING_TOKEN(STR_TEXT_TEXT_1),\r
586 text = STRING_TOKEN(STR_TEXT_TEXT_2),\r
587 flags = 0,\r
588 key = MY_TEXT_KEY;\r
35fec2c4 589\r
590 goto 1,\r
103b6520 591 prompt = STRING_TOKEN(STR_GOTO_FORM1), //MainSetupPage // this too has no end-op and basically it's a jump to a form ONLY\r
592 help = STRING_TOKEN(STR_GOTO_HELP);\r
593\r
594 endform;\r
595\r
596 form formid = 3, title = STRING_TOKEN(STR_FORM3_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code\r
597\r
598 grayoutif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x1;\r
35fec2c4 599 text\r
600 help = STRING_TOKEN(STR_TEXT_HELP),\r
103b6520 601 text = STRING_TOKEN(STR_TEXT_TEXT_1);\r
35fec2c4 602\r
103b6520 603 endif; //end grayoutif\r
35fec2c4 604\r
605 text\r
606 help = STRING_TOKEN(STR_TEXT_HELP),\r
103b6520 607 text = STRING_TOKEN(STR_TEXT_TEXT_1);\r
35fec2c4 608\r
103b6520 609 endform;\r
35fec2c4 610\r
103b6520 611 form formid = 4, title = STRING_TOKEN(STR_FORM3_TITLE);\r
612\r
613 endform;\r
614\r
35fec2c4 615 form formid = 0x1234, // Dynamically created page,\r
103b6520 616 title = STRING_TOKEN(STR_DYNAMIC_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code\r
617\r
618 label 0x1234;\r
619\r
620 endform;\r
621\r
622endformset;\r