diff options
author | Dandan Bi <dandan.bi@intel.com> | 2016-02-23 11:04:20 +0800 |
---|---|---|
committer | Feng Tian <feng.tian@intel.com> | 2016-02-25 14:42:25 +0800 |
commit | 003f3c00d819e3a072133e0dbb7ca896cc87871b (patch) | |
tree | 30eed8e1ced113788b2e12a3dd2af852af0e9c70 /MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c | |
parent | 3cb44c207cdc21a9d4b0f06d689e00eba43ed361 (diff) | |
download | edk2-003f3c00d819e3a072133e0dbb7ca896cc87871b.tar.gz edk2-003f3c00d819e3a072133e0dbb7ca896cc87871b.tar.bz2 edk2-003f3c00d819e3a072133e0dbb7ca896cc87871b.zip |
MdeModulePkg: Add submitted callback test case in DriverSample
Now we add new HII action type EFI_BROWSER_ACTION_SUBMITTED in
EFI HII Configuration Access Protocol, so add the test case in
DriverSample to show how to use it and whether it works.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c')
-rw-r--r-- | MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index 8ec1d4e6e8..efb78bf6be 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -2,7 +2,7 @@ This is an example of how a driver might export data to the HII protocol to be
later utilized by the Setup Protocol
-Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1834,6 +1834,28 @@ DriverCallback ( }
break;
+ case EFI_BROWSER_ACTION_SUBMITTED:
+ {
+ if (QuestionId == 0x1250) {
+ //
+ // Sample CallBack for EFI_BROWSER_ACTION_SUBMITTED action:
+ // Show up a pop-up to show SUBMITTED callback has been triggered.
+ //
+ do {
+ CreatePopUp (
+ EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
+ &Key,
+ L"",
+ L"EfiVarstore value has been submitted!",
+ L"Press ESC or ENTER to continue ...",
+ L"",
+ NULL
+ );
+ } while ((Key.ScanCode != SCAN_ESC) && (Key.UnicodeChar != CHAR_CARRIAGE_RETURN));
+ }
+ }
+ break;
+
default:
Status = EFI_UNSUPPORTED;
break;
|