Changeset 483


Ignore:
Timestamp:
Nov 2, 2009, 6:57:17 PM (10 years ago)
Author:
Merlin
Message:

Clean up

Location:
branches/merlin/csctapi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/merlin/csctapi/pps.c

    r451 r483  
    8686}
    8787
    88 int PPS_PreformPTS(PPS *pps)
     88int PPS_PerformPTS(PPS *pps)
    8989{
    9090    int ret;
     
    9696    unsigned len_request=4;
    9797   
    98    
    9998    atr = ICC_Async_GetAtr(pps->icc);
    10099    ATR_GetProtocolType(atr,0,&(pps->parameters.t));
    101100
    102101    req[0]=0xFF;
    103     req[1]=0x10 | pps->parameters.t;
    104     req[2]=atr->ib[0][ATR_INTERFACE_BYTE_TA].value;
    105     req[3]=PPS_GetPCK(req,len_request-1);
     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);
    106105   
    107106#ifdef DEBUG_PROTOCOL
     
    123122        return PPS_ICC_ERROR;
    124123    }
    125    
    126     len_confirm=len_request;
     124    len_confirm = len_request;
    127125   
    128126#ifdef DEBUG_PROTOCOL
     
    166164                pps->parameters.f = atr_f_table[(params[2] >> 4)];
    167165                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 value
    171                     pps->parameters.d=ATR_DEFAULT_D;
    172                     }
    173166#ifdef DEBUG_PROTOCOL
    174167                printf("PPS: pps->parameters.n %f\n",pps->parameters.n);
     
    203196        ATR_GetParameter(atr, ATR_PARAMETER_D, &(pps->parameters.d));
    204197        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 value
    208             pps->parameters.d=ATR_DEFAULT_D;
    209             }
    210198
    211199#ifdef DEBUG_PROTOCOL
  • branches/merlin/csctapi/pps.h

    r447 r483  
    6565extern PPS *PPS_New(ICC_Async * icc);
    6666
    67 /* perform PTS for tha card that supports it */
    68 extern int PPS_PreformPTS(PPS *pps);
     67/* Perform PTS for tha card that supports it */
     68extern int PPS_PerformPTS(PPS *pps);
    6969
    7070/* Perform protcol type selection and return confirm */
Note: See TracChangeset for help on using the changeset viewer.