12#ifndef __SMART_CARD_READER_H__
13#define __SMART_CARD_READER_H__
15#define EFI_SMART_CARD_READER_PROTOCOL_GUID \
17 0x2a4d1adf, 0x21dc, 0x4b81, {0xa4, 0x2f, 0x8b, 0x8e, 0xe2, 0x38, 0x00, 0x60} \
25#define SCARD_AM_READER 0x0001
26#define SCARD_AM_CARD 0x0002
30#define SCARD_CA_NORESET 0x0000
31#define SCARD_CA_COLDRESET 0x0001
32#define SCARD_CA_WARMRESET 0x0002
33#define SCARD_CA_UNPOWER 0x0003
34#define SCARD_CA_EJECT 0x0004
38#define SCARD_PROTOCOL_UNDEFINED 0x0000
39#define SCARD_PROTOCOL_T0 0x0001
40#define SCARD_PROTOCOL_T1 0x0002
41#define SCARD_PROTOCOL_RAW 0x0004
45#define SCARD_UNKNOWN 0x0000
46#define SCARD_ABSENT 0x0001
47#define SCARD_INACTIVE 0x0002
48#define SCARD_ACTIVE 0x0003
52#define SCARD_CTL_CODE(code) (0x42000000 + (code))
53#define CM_IOCTL_GET_FEATURE_REQUEST SCARD_CTL_CODE(3400)
94 IN UINT32 PreferredProtocols,
95 OUT UINT32 *ActiveProtocol
257 IN UINT32 ControlCode,
299 OUT UINT8 *OutBuffer,
316extern EFI_GUID gEfiSmartCardReaderProtocolGuid;
EFI_STATUS(EFIAPI * EFI_SMART_CARD_READER_DISCONNECT)(IN EFI_SMART_CARD_READER_PROTOCOL *This, IN UINT32 CardAction)
EFI_STATUS(EFIAPI * EFI_SMART_CARD_READER_STATUS)(IN EFI_SMART_CARD_READER_PROTOCOL *This, OUT CHAR16 *ReaderName OPTIONAL, IN OUT UINTN *ReaderNameLength OPTIONAL, OUT UINT32 *State OPTIONAL, OUT UINT32 *CardProtocol OPTIONAL, OUT UINT8 *Atr OPTIONAL, IN OUT UINTN *AtrLength OPTIONAL)
EFI_STATUS(EFIAPI * EFI_SMART_CARD_READER_GET_ATTRIB)(IN EFI_SMART_CARD_READER_PROTOCOL *This, IN UINT32 Attrib, OUT UINT8 *OutBuffer, IN OUT UINTN *OutBufferLength)
EFI_STATUS(EFIAPI * EFI_SMART_CARD_READER_TRANSMIT)(IN EFI_SMART_CARD_READER_PROTOCOL *This, IN UINT8 *CAPDU, IN UINTN CAPDULength, OUT UINT8 *RAPDU, IN OUT UINTN *RAPDULength)
EFI_STATUS(EFIAPI * EFI_SMART_CARD_READER_CONNECT)(IN EFI_SMART_CARD_READER_PROTOCOL *This, IN UINT32 AccessMode, IN UINT32 CardAction, IN UINT32 PreferredProtocols, OUT UINT32 *ActiveProtocol)
EFI_STATUS(EFIAPI * EFI_SMART_CARD_READER_CONTROL)(IN EFI_SMART_CARD_READER_PROTOCOL *This, IN UINT32 ControlCode, IN UINT8 *InBuffer OPTIONAL, IN UINTN InBufferLength OPTIONAL, OUT UINT8 *OutBuffer OPTIONAL, IN OUT UINTN *OutBufferLength OPTIONAL)