2007-07-23 09:06:23 +02:00
|
|
|
/**@file
|
2007-06-29 17:14:00 +02:00
|
|
|
|
2007-07-23 09:06:23 +02:00
|
|
|
This is an example of how a driver might export data to the HII protocol to be
|
|
|
|
later utilized by the Setup Protocol
|
|
|
|
|
2007-06-29 17:14:00 +02:00
|
|
|
Copyright (c) 2006, Intel Corporation
|
|
|
|
All rights reserved. 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
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
2007-07-23 09:06:23 +02:00
|
|
|
**/
|
2007-06-29 17:14:00 +02:00
|
|
|
#ifndef _DRIVER_SAMPLE_H
|
|
|
|
#define _DRIVER_SAMPLE_H
|
|
|
|
|
|
|
|
|
2007-07-20 08:10:09 +02:00
|
|
|
|
2007-07-16 05:28:26 +02:00
|
|
|
#include <PiDxe.h>
|
2007-07-20 08:10:09 +02:00
|
|
|
|
2007-07-16 05:28:26 +02:00
|
|
|
#include <Protocol/FormCallbackFramework.h>
|
|
|
|
#include <Protocol/HiiFramework.h>
|
2007-07-20 08:10:09 +02:00
|
|
|
|
2007-07-16 05:28:26 +02:00
|
|
|
#include <Library/UefiBootServicesTableLib.h>
|
|
|
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
|
|
|
#include <Library/DebugLib.h>
|
|
|
|
#include <Library/UefiDriverEntryPoint.h>
|
|
|
|
#include <Library/BaseLib.h>
|
|
|
|
#include <Library/PrintLib.h>
|
|
|
|
#include <Library/IfrSupportLibFramework.h>
|
|
|
|
#include <Library/BaseMemoryLib.h>
|
|
|
|
#include <Library/MemoryAllocationLib.h>
|
|
|
|
#include <Library/HiiLibFramework.h>
|
2007-06-29 17:14:00 +02:00
|
|
|
|
|
|
|
#include "NVDataStruc.h"
|
|
|
|
|
|
|
|
//
|
|
|
|
// This is the generated header file which includes whatever needs to be exported (strings + IFR)
|
|
|
|
//
|
|
|
|
|
|
|
|
extern UINT8 VfrBin[];
|
|
|
|
//
|
|
|
|
// extern UINT8 VfrStringsStr[];
|
|
|
|
//
|
|
|
|
extern UINT8 InventoryBin[];
|
|
|
|
//
|
|
|
|
// extern UINT8 InventoryStringsStr[];
|
|
|
|
//
|
2007-07-16 05:28:26 +02:00
|
|
|
extern UINT8 DriverSampleDxeStrings[];
|
2007-06-29 17:14:00 +02:00
|
|
|
|
|
|
|
#define SAMPLE_STRING L"This is an error!"
|
|
|
|
|
|
|
|
#define EFI_CALLBACK_INFO_SIGNATURE EFI_SIGNATURE_32 ('C', 'l', 'b', 'k')
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
UINTN Signature;
|
|
|
|
EFI_HANDLE CallbackHandle;
|
|
|
|
EFI_FORM_CALLBACK_PROTOCOL DriverCallback;
|
|
|
|
UINT16 *KeyList;
|
|
|
|
VOID *FormBuffer;
|
|
|
|
EFI_HII_HANDLE RegisteredHandle;
|
|
|
|
EFI_HII_PROTOCOL *Hii;
|
|
|
|
} EFI_CALLBACK_INFO;
|
|
|
|
|
|
|
|
#define EFI_CALLBACK_INFO_FROM_THIS(a) CR (a, EFI_CALLBACK_INFO, DriverCallback, EFI_CALLBACK_INFO_SIGNATURE)
|
|
|
|
|
|
|
|
#endif
|