| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: bscd_emvpriv.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/5 $ |
|---|
| 12 | * $brcm_Date: 7/20/04 2:12p $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: This file contains Broadcom smart card Porting |
|---|
| 15 | * Interface EMV private data structures, enums, |
|---|
| 16 | * definitions and functions prototypes. |
|---|
| 17 | * |
|---|
| 18 | * Revision History: |
|---|
| 19 | * |
|---|
| 20 | * $brcm_Log: /magnum/portinginterface/scd/7038/bscd_emvpriv.h $ |
|---|
| 21 | * |
|---|
| 22 | * Hydra_Software_Devel/5 7/20/04 2:12p btan |
|---|
| 23 | * PR 10898: Pass EMV 2000 tests with either event interrupt or WWT to |
|---|
| 24 | * detect CWT +4 |
|---|
| 25 | * |
|---|
| 26 | * Hydra_Software_Devel/4 12/31/03 3:37p btan |
|---|
| 27 | * PR 9168: Fixed compilation warnings. |
|---|
| 28 | * |
|---|
| 29 | * Hydra_Software_Devel/3 11/26/03 5:00p btan |
|---|
| 30 | * Fixes for EMV T=0 |
|---|
| 31 | * |
|---|
| 32 | * Hydra_Software_Devel/1 10/13/03 12:18p btan |
|---|
| 33 | * Initial Creation. |
|---|
| 34 | * |
|---|
| 35 | * Hydra_Software_Devel/4 7/21/03 6:28p btan |
|---|
| 36 | * Updated after 1st review. |
|---|
| 37 | * |
|---|
| 38 | * Hydra_Software_Devel/2 6/10/03 5:56p btan |
|---|
| 39 | * Fixed some comments. |
|---|
| 40 | * |
|---|
| 41 | * Hydra_Software_Devel/1 6/5/03 4:58p btan |
|---|
| 42 | * Initial creation for 7038 |
|---|
| 43 | * |
|---|
| 44 | ***************************************************************************/ |
|---|
| 45 | #ifndef BSCD_EMV_PRIV_H__ |
|---|
| 46 | #define BSCD_EMV_PRIV_H__ |
|---|
| 47 | |
|---|
| 48 | #include "berr_ids.h" |
|---|
| 49 | #include "bscd.h" |
|---|
| 50 | |
|---|
| 51 | #ifdef __cplusplus |
|---|
| 52 | extern "C" { |
|---|
| 53 | #endif |
|---|
| 54 | |
|---|
| 55 | |
|---|
| 56 | BERR_Code BSCD_Channel_P_EMVATRReadNextByte( |
|---|
| 57 | BSCD_ChannelHandle in_channelHandle, |
|---|
| 58 | unsigned char *outp_ucData, |
|---|
| 59 | unsigned long *outp_ulTotalAtrByteTimeInETU, |
|---|
| 60 | unsigned char *outp_ucParityErrorDetected |
|---|
| 61 | ); |
|---|
| 62 | |
|---|
| 63 | BERR_Code BSCD_Channel_P_EMVATRCheckForAdditionalATRBytes( |
|---|
| 64 | BSCD_ChannelHandle in_channelHandle |
|---|
| 65 | ); |
|---|
| 66 | |
|---|
| 67 | BERR_Code BSCD_Channel_P_EMVATRReceiveAndDecode( |
|---|
| 68 | BSCD_ChannelHandle in_channelHandle |
|---|
| 69 | ); |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | BERR_Code BSCD_Channel_P_EMVValidateTSByte( |
|---|
| 73 | unsigned char in_ucTSByte |
|---|
| 74 | ); |
|---|
| 75 | |
|---|
| 76 | BERR_Code BSCD_Channel_P_EMVValidateT0Byte( |
|---|
| 77 | unsigned char ucT0Byte, |
|---|
| 78 | unsigned int *unNumHistoricalBytes |
|---|
| 79 | ); |
|---|
| 80 | |
|---|
| 81 | BERR_Code BSCD_Channel_P_EMVValidateTA1Byte( |
|---|
| 82 | BSCD_ChannelHandle in_channelHandle, |
|---|
| 83 | unsigned char in_ucTA1Byte |
|---|
| 84 | ); |
|---|
| 85 | |
|---|
| 86 | BERR_Code BSCD_Channel_P_EMVValidateTB1Byte( |
|---|
| 87 | BSCD_ChannelHandle in_channelHandle, |
|---|
| 88 | unsigned char in_ucTB1Byte |
|---|
| 89 | ); |
|---|
| 90 | |
|---|
| 91 | BERR_Code BSCD_Channel_P_EMVValidateTC1Byte( |
|---|
| 92 | BSCD_ChannelHandle in_channelHandle, |
|---|
| 93 | unsigned char in_ucTC1Byte |
|---|
| 94 | ); |
|---|
| 95 | |
|---|
| 96 | BERR_Code BSCD_Channel_P_EMVValidateTD1Byte( |
|---|
| 97 | BSCD_ChannelHandle in_channelHandle, |
|---|
| 98 | unsigned char in_ucTD1Byte, |
|---|
| 99 | bool *outp_bTCKRequired |
|---|
| 100 | ); |
|---|
| 101 | |
|---|
| 102 | |
|---|
| 103 | BERR_Code BSCD_Channel_P_EMVValidateTA2Byte( |
|---|
| 104 | unsigned char in_ucTA2Byte |
|---|
| 105 | ); |
|---|
| 106 | |
|---|
| 107 | |
|---|
| 108 | BERR_Code BSCD_Channel_P_EMVValidateTB2Byte( |
|---|
| 109 | unsigned char in_ucTB2Byte |
|---|
| 110 | ); |
|---|
| 111 | |
|---|
| 112 | BERR_Code BSCD_Channel_P_EMVValidateTC2Byte( |
|---|
| 113 | BSCD_ChannelHandle in_channelHandle, |
|---|
| 114 | unsigned char in_ucTC2Byte |
|---|
| 115 | ); |
|---|
| 116 | |
|---|
| 117 | BERR_Code BSCD_Channel_P_EMVValidateTD2Byte( |
|---|
| 118 | BSCD_ChannelHandle in_channelHandle, |
|---|
| 119 | unsigned char in_ucTD2Byte, |
|---|
| 120 | unsigned char in_ucTD1Byte, |
|---|
| 121 | bool * outp_bTCKRequired |
|---|
| 122 | ); |
|---|
| 123 | |
|---|
| 124 | BERR_Code BSCD_Channel_P_EMVValidateTA3Byte( |
|---|
| 125 | BSCD_ChannelHandle in_channelHandle, |
|---|
| 126 | unsigned char in_ucTA3Byte |
|---|
| 127 | ); |
|---|
| 128 | |
|---|
| 129 | BERR_Code BSCD_Channel_P_EMVValidateTB3Byte( |
|---|
| 130 | BSCD_ChannelHandle in_channelHandle, |
|---|
| 131 | unsigned char in_ucTB3Byte, |
|---|
| 132 | unsigned char in_ucFFactor, |
|---|
| 133 | unsigned char in_ucDFactor |
|---|
| 134 | ); |
|---|
| 135 | |
|---|
| 136 | BERR_Code BSCD_Channel_P_EMVValidateTC3Byte( |
|---|
| 137 | unsigned char in_ucTC3Byte |
|---|
| 138 | ); |
|---|
| 139 | |
|---|
| 140 | BERR_Code BSCD_Channel_P_EMVValidateTCKByte( |
|---|
| 141 | BSCD_ChannelHandle in_channelHandle, |
|---|
| 142 | unsigned char *inp_ucATR, |
|---|
| 143 | unsigned int in_unATRLength |
|---|
| 144 | ); |
|---|
| 145 | |
|---|
| 146 | BERR_Code BSCD_Channel_P_EMVATRByteRead( |
|---|
| 147 | BSCD_ChannelHandle in_channelHandle, |
|---|
| 148 | unsigned char *inoutp_ucData, |
|---|
| 149 | unsigned long in_ulMaxAtrByteTimeInETU, |
|---|
| 150 | long in_lMaxTotalAtrByteTimeInETU, |
|---|
| 151 | unsigned long *inoutp_ultotalAtrByteTimeInETU |
|---|
| 152 | ); |
|---|
| 153 | |
|---|
| 154 | |
|---|
| 155 | |
|---|
| 156 | #ifdef __cplusplus |
|---|
| 157 | } |
|---|
| 158 | #endif |
|---|
| 159 | |
|---|
| 160 | #endif /* BSCD_PRIV_H__ */ |
|---|