TianoCore EDK2 master
Loading...
Searching...
No Matches
DriverSample.h
Go to the documentation of this file.
1
18#ifndef _DRIVER_SAMPLE_H_
19#define _DRIVER_SAMPLE_H_
20
21#include <Uefi.h>
22
27#include <Protocol/HiiString.h>
30#include <Protocol/HiiPopup.h>
31
32#include <Guid/MdeModuleHii.h>
33#include <Library/DebugLib.h>
34#include <Library/BaseLib.h>
40#include <Library/HiiLib.h>
42#include <Library/PrintLib.h>
43#include <Library/UefiLib.h>
44
45#include "NVDataStruc.h"
46
47//
48// This is the generated IFR binary data for each formset defined in VFR.
49// This data array is ready to be used as input of HiiAddPackages() to
50// create a packagelist (which contains Form packages, String packages, etc).
51//
52extern UINT8 VfrBin[];
53extern UINT8 InventoryBin[];
54
55//
56// This is the generated String package data for all .UNI files.
57// This data array is ready to be used as input of HiiAddPackages() to
58// create a packagelist (which contains Form packages, String packages, etc).
59//
60extern UINT8 DriverSampleStrings[];
61
62#define DYNAMIC_ONE_OF_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOneof)
63#define DYNAMIC_ORDERED_LIST_VAR_OFFSET OFFSET_OF (DRIVER_SAMPLE_CONFIGURATION, DynamicOrderedList)
64
65#define DEFAULT_CLASS_MANUFACTURING_VALUE 0xFF
66#define DEFAULT_CLASS_STANDARD_VALUE 0x0
67
68//
69// Number of name in Name/Value storage
70//
71#define NAME_VALUE_NAME_NUMBER 3
72
73#define DRIVER_SAMPLE_PRIVATE_SIGNATURE SIGNATURE_32 ('D', 'S', 'p', 's')
74
75typedef struct {
76 UINTN Signature;
77
78 EFI_HANDLE DriverHandle[2];
79 EFI_HII_HANDLE HiiHandle[2];
80 DRIVER_SAMPLE_CONFIGURATION Configuration;
81 MY_EFI_VARSTORE_DATA VarStoreConfig;
82 MY_EFI_BITS_VARSTORE_DATA BitsVarStoreConfig;
83 MY_EFI_UNION_DATA UnionConfig;
84
85 //
86 // Name/Value storage Name list
87 //
88 EFI_STRING_ID NameStringId[NAME_VALUE_NAME_NUMBER];
89 EFI_STRING NameValueName[NAME_VALUE_NAME_NUMBER];
90
91 //
92 // Consumed protocol
93 //
94 EFI_HII_DATABASE_PROTOCOL *HiiDatabase;
95 EFI_HII_STRING_PROTOCOL *HiiString;
96 EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;
97 EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *HiiKeywordHandler;
98 EFI_HII_POPUP_PROTOCOL *HiiPopup;
99
100 EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2;
101
102 //
103 // Produced protocol
104 //
107
108#define DRIVER_SAMPLE_PRIVATE_FROM_THIS(a) CR (a, DRIVER_SAMPLE_PRIVATE_DATA, ConfigAccess, DRIVER_SAMPLE_PRIVATE_SIGNATURE)
109
110#pragma pack(1)
111
115typedef struct {
116 VENDOR_DEVICE_PATH VendorDevicePath;
119
120#pragma pack()
121
122#endif
UINT64 UINTN
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
VOID * EFI_HII_HANDLE