]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
MdeModulePkg/UsbBusDxe: Add UsbControlTransfer() error check
[mirror_edk2.git] / MdeModulePkg / Universal / DriverSampleDxe / NVDataStruc.h
1 /** @file
2
3 Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 NVDataStruc.h
15
16 Abstract:
17
18 NVData structure used by the sample driver
19
20 Revision History:
21
22
23 **/
24
25 #ifndef _NVDATASTRUC_H_
26 #define _NVDATASTRUC_H_
27
28 #include <Guid/HiiPlatformSetupFormset.h>
29 #include <Guid/HiiFormMapMethodGuid.h>
30 #include <Guid/DriverSampleHii.h>
31 #include <Guid/ZeroGuid.h>
32
33 #define CONFIGURATION_VARSTORE_ID 0x1234
34 #define BITS_VARSTORE_ID 0x2345
35
36 #pragma pack(1)
37
38 typedef struct {
39 UINT16 NestByteField;
40 UINT8 : 1; // unamed field can be used for padding
41 UINT8 NestBitCheckbox : 1;
42 UINT8 NestBitOneof : 2;
43 UINT8 : 0; // Special width 0 can be used to force alignment at the next word boundary
44 UINT8 NestBitNumeric : 4;
45 } MY_BITS_DATA;
46
47 typedef union {
48 UINT16 BitField : 10;
49 UINT8 ByteField;
50 } MY_EFI_UNION_DATA;
51
52 typedef struct {
53 UINT16 MyStringData[40];
54 UINT16 SomethingHiddenForHtml;
55 UINT8 HowOldAreYouInYearsManual;
56 UINT16 HowTallAreYouManual;
57 UINT8 HowOldAreYouInYears;
58 UINT16 HowTallAreYou;
59 UINT8 MyFavoriteNumber;
60 UINT8 TestLateCheck;
61 UINT8 TestLateCheck2;
62 UINT8 QuestionAboutTreeHugging;
63 UINT8 ChooseToActivateNuclearWeaponry;
64 UINT8 SuppressGrayOutSomething;
65 UINT8 OrderedList[8];
66 UINT16 BootOrder[8];
67 UINT8 BootOrderLarge;
68 UINT8 DynamicRefresh;
69 UINT8 DynamicOneof;
70 UINT8 DynamicOrderedList[5];
71 UINT8 Reserved;
72 EFI_HII_REF RefData;
73 UINT8 NameValueVar0;
74 UINT16 NameValueVar1;
75 UINT16 NameValueVar2[20];
76 UINT8 SerialPortNo;
77 UINT8 SerialPortStatus;
78 UINT16 SerialPortIo;
79 UINT8 SerialPortIrq;
80 UINT8 GetDefaultValueFromCallBack;
81 UINT8 GetDefaultValueFromAccess;
82 EFI_HII_TIME Time;
83 UINT8 RefreshGuidCount;
84 UINT8 Match2;
85 UINT8 GetDefaultValueFromCallBackForOrderedList[3];
86 UINT8 BitCheckbox : 1;
87 UINT16 BitOneof : 6;
88 UINT16 BitNumeric : 12;
89 MY_BITS_DATA MyBitData;
90 MY_EFI_UNION_DATA MyUnionData;
91 } DRIVER_SAMPLE_CONFIGURATION;
92
93 //
94 // 2nd NV data structure definition
95 //
96 typedef struct {
97 UINT8 Field8;
98 UINT16 Field16;
99 UINT8 OrderedList[3];
100 UINT16 SubmittedCallback;
101 } MY_EFI_VARSTORE_DATA;
102
103 //
104 // 3rd NV data structure definition
105 //
106 typedef struct {
107 MY_BITS_DATA BitsData;
108 UINT32 EfiBitGrayoutTest : 5;
109 UINT32 EfiBitNumeric : 4;
110 UINT32 EfiBitOneof : 10;
111 UINT32 EfiBitCheckbox : 1;
112 } MY_EFI_BITS_VARSTORE_DATA;
113
114 //
115 // Labels definition
116 //
117 #define LABEL_UPDATE1 0x1234
118 #define LABEL_UPDATE2 0x2234
119 #define LABEL_UPDATE3 0x3234
120 #define LABEL_END 0x2223
121
122 #pragma pack()
123
124 #endif