summaryrefslogtreecommitdiff
path: root/Protocol/CardService/CardService.h
blob: 5428a557488ac4a7e1454e63194fdcc78ee388e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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