diff options
author | raywu <raywu0301@gmail.com> | 2018-06-15 00:00:50 +0800 |
---|---|---|
committer | raywu <raywu0301@gmail.com> | 2018-06-15 00:00:50 +0800 |
commit | b7c51c9cf4864df6aabb99a1ae843becd577237c (patch) | |
tree | eebe9b0d0ca03062955223097e57da84dd618b9a /Protocol/CardService | |
download | zprj-master.tar.xz |
Diffstat (limited to 'Protocol/CardService')
-rw-r--r-- | Protocol/CardService/CardService.c | 37 | ||||
-rw-r--r-- | Protocol/CardService/CardService.h | 108 |
2 files changed, 145 insertions, 0 deletions
diff --git a/Protocol/CardService/CardService.c b/Protocol/CardService/CardService.c new file mode 100644 index 0000000..c68f38b --- /dev/null +++ b/Protocol/CardService/CardService.c @@ -0,0 +1,37 @@ +/*++ + This file contains 'Framework Code' and is licensed as such + under the terms of your license agreement with Intel or your + vendor. This file may not be modified, except as allowed by + additional terms of your license agreement. +--*/ +/*++ + +Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved +This software and associated documentation (if any) is furnished +under a license and may only be used or copied in accordance +with the terms of the license. Except as permitted by such +license, no part of this software or documentation may be +reproduced, stored in a retrieval system, or transmitted in any +form or by any means without the express written consent of +Intel Corporation. + + +Module Name: + + CardService.c + +Abstract: + + EFI PC Card Card Service Protocol + +Revision History + +--*/ + +#include "Tiano.h" + +#include EFI_PROTOCOL_DEFINITION (CardService) + +EFI_GUID gEfiPcCardCsProtocolGuid = EFI_PCCARD_CS_PROTOCOL_GUID; + +EFI_GUID_STRING(&gEfiPcCardCsProtocolGuid, "Card Service Protocol", "EFI 1.1 Card Service Protocol"); diff --git a/Protocol/CardService/CardService.h b/Protocol/CardService/CardService.h new file mode 100644 index 0000000..5428a55 --- /dev/null +++ b/Protocol/CardService/CardService.h @@ -0,0 +1,108 @@ +// +// This file contains 'Framework Code' and is licensed as such +// under the terms of your license agreement with Intel or your +// vendor. This file may not be modified, except as allowed by +// additional terms of your license agreement. +// +/*++ + +Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved +This software and associated documentation (if any) is furnished +under a license and may only be used or copied in accordance +with the terms of the license. Except as permitted by such +license, no part of this software or documentation may be +reproduced, stored in a retrieval system, or transmitted in any +form or by any means without the express written consent of +Intel Corporation. + + +Module Name: + + CardService.h + +Abstract: + + EFI PC Card Card Service Protocol + +Revision History + +--*/ + +#ifndef _EFI_PCCARD_CS_H +#define _EFI_PCCARD_CS_H + +// +// Global GUID for PC Card Card Service Protocol +// +#define EFI_PCCARD_CS_PROTOCOL_GUID \ + { \ + 0xca54f443, 0x1ef2, 0x4dab, 0x9e, 0x7e, 0x6d, 0xb7, 0xb7, 0x20, 0xb5, 0x87 \ + } + +EFI_FORWARD_DECLARATION (EFI_PCCARD_CS_PROTOCOL); + +// +// Prototypes for PC Card Card Service Protocol +// +typedef +EFI_STATUS +(EFIAPI *EFI_PCCARD_CS_GET_TUPLE) ( + IN EFI_PCCARD_CS_PROTOCOL * This, + IN UINT8 TupleCode, + IN OUT UINTN *BufferSize, + OUT UINT8 *Buffer, + IN OUT VOID **Key + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_PCCARD_CS_REGISTER_EVENT) ( + IN EFI_PCCARD_CS_PROTOCOL * This, + IN BOOLEAN Enable OPTIONAL, + IN EFI_EVENT Event + ); + +// +// EFI PC Card Event bits +// +#define EFI_PCCARD_CS_EVENT_READY 0x00000001 +#define EFI_PCCARD_CS_EVENT_BATTERY 0x00000002 +// +// #define EFI_PCCARD_CS_EVENT_BATTERY_DEAD 0x00000004 +// +#define EFI_PCCARD_CS_EVENT_WRITE_PROTECT 0x00000008 +#define EFI_PCCARD_CS_EVENT_GWAKE 0x00000010 + +typedef +EFI_STATUS +(EFIAPI *EFI_PCCARD_CS_GET_EVENT) ( + IN EFI_PCCARD_CS_PROTOCOL * This, + OUT UINT32 *Event + ); + +// +// EFI PC Card State bits +// +#define EFI_PCCARD_CS_STATE_READY 0x00000001 +#define EFI_PCCARD_CS_STATE_BATTERY_WARNING 0x00000002 +#define EFI_PCCARD_CS_STATE_BATTERY_DEAD 0x00000004 +#define EFI_PCCARD_CS_STATE_WRITE_PROTECT 0x00000008 +#define EFI_PCCARD_CS_STATE_GWAKE 0x00000010 + +typedef +EFI_STATUS +(EFIAPI *EFI_PCCARD_CS_GET_STATE) ( + IN EFI_PCCARD_CS_PROTOCOL * This, + OUT UINT32 *State + ); + +typedef struct _EFI_PCCARD_CS_PROTOCOL { + EFI_PCCARD_CS_GET_TUPLE GetTuple; + EFI_PCCARD_CS_REGISTER_EVENT RegisterHandler; + EFI_PCCARD_CS_GET_EVENT GetEvent; + EFI_PCCARD_CS_GET_STATE GetState; +} EFI_PCCARD_CS_PROTOCOL; + +extern EFI_GUID gEfiPcCardCsProtocolGuid; + +#endif |