Changeset 483
- Timestamp:
- 11/02/09 18:57:17 (14 years ago)
- Location:
- branches/merlin/csctapi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/merlin/csctapi/pps.c
r451 r483 86 86 } 87 87 88 int PPS_P reformPTS(PPS *pps)88 int PPS_PerformPTS(PPS *pps) 89 89 { 90 90 int ret; … … 96 96 unsigned len_request=4; 97 97 98 99 98 atr = ICC_Async_GetAtr(pps->icc); 100 99 ATR_GetProtocolType(atr,0,&(pps->parameters.t)); 101 100 102 101 req[0]=0xFF; 103 104 105 102 req[1]=0x10 | pps->parameters.t; 103 req[2]=atr->ib[0][ATR_INTERFACE_BYTE_TA].value; 104 req[3]=PPS_GetPCK(req,len_request-1); 106 105 107 106 #ifdef DEBUG_PROTOCOL … … 123 122 return PPS_ICC_ERROR; 124 123 } 125 126 len_confirm=len_request; 124 len_confirm = len_request; 127 125 128 126 #ifdef DEBUG_PROTOCOL … … 166 164 pps->parameters.f = atr_f_table[(params[2] >> 4)]; 167 165 pps->parameters.d = atr_d_table[(params[2] & 0x0F)]; 168 if(pps->parameters.d==0)169 {170 // set pps->parameters.d to 1 as 0 is not a valid value171 pps->parameters.d=ATR_DEFAULT_D;172 }173 166 #ifdef DEBUG_PROTOCOL 174 167 printf("PPS: pps->parameters.n %f\n",pps->parameters.n); … … 203 196 ATR_GetParameter(atr, ATR_PARAMETER_D, &(pps->parameters.d)); 204 197 ATR_GetParameter(atr, ATR_PARAMETER_F, &(pps->parameters.f)); 205 if(pps->parameters.d==0)206 {207 // set pps->parameters.d to 1 as 0 is not a valid value208 pps->parameters.d=ATR_DEFAULT_D;209 }210 198 211 199 #ifdef DEBUG_PROTOCOL -
branches/merlin/csctapi/pps.h
r447 r483 65 65 extern PPS *PPS_New(ICC_Async * icc); 66 66 67 /* perform PTS for tha card that supports it */68 extern int PPS_P reformPTS(PPS *pps);67 /* Perform PTS for tha card that supports it */ 68 extern int PPS_PerformPTS(PPS *pps); 69 69 70 70 /* Perform protcol type selection and return confirm */
Note:
See TracChangeset
for help on using the changeset viewer.