Changeset 1219


Ignore:
Timestamp:
01/14/10 11:10:32 (12 years ago)
Author:
dingo35
Message:

Remove unused NO_PAR_SWITCH and Begin/EndTransmission stuff

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/csctapi/icc_async.c

    r1208 r1219  
    142142    icc->ifd = ifd;
    143143   
    144 #ifdef NO_PAR_SWITCH
    145144    if (icc->convention == ATR_CONVENTION_INVERSE)
    146145    {
     
    162161#endif
    163162    IO_Serial_Flush(ifd->io);
    164 #endif
    165163    return ICC_ASYNC_OK;
    166164#else
     
    248246}
    249247
    250 int ICC_Async_BeginTransmission (ICC_Async * icc)
    251 {
    252     /* Setup parity for this ICC */
    253 #ifndef NO_PAR_SWITCH
    254     if (icc->convention == ATR_CONVENTION_INVERSE)
    255     {
    256         if (IFD_Towitoko_SetParity (icc->ifd, IFD_TOWITOKO_PARITY_ODD) != IFD_TOWITOKO_OK)
    257             return ICC_ASYNC_IFD_ERROR;
    258     }
    259     else if(icc->protocol_type == ATR_PROTOCOL_TYPE_T14)
    260     {
    261         if (IFD_Towitoko_SetParity (icc->ifd, IFD_TOWITOKO_PARITY_NONE) != IFD_TOWITOKO_OK)
    262             return ICC_ASYNC_IFD_ERROR;     
    263     }
    264     else
    265     {
    266         if (IFD_Towitoko_SetParity (icc->ifd, IFD_TOWITOKO_PARITY_EVEN) != IFD_TOWITOKO_OK)
    267             return ICC_ASYNC_IFD_ERROR;     
    268     }
    269    
    270     /* Setup baudrate for  this ICC */
    271 /*  if (IFD_Towitoko_SetBaudrate (icc->ifd, icc->baudrate)!= IFD_TOWITOKO_OK)
    272         return ICC_ASYNC_IFD_ERROR;
    273 */ 
    274 #endif
    275     return ICC_ASYNC_OK;
    276 }
    277 
    278248int ICC_Async_Transmit (ICC_Async * icc, unsigned size, BYTE * data)
    279249{
     
    332302    if (icc->convention == ATR_CONVENTION_INVERSE && icc->ifd->io->reader_type!=R_INTERNAL)
    333303        ICC_Async_InvertBuffer (size, data);
    334    
    335     return ICC_ASYNC_OK;
    336 }
    337 
    338 int ICC_Async_EndTransmission (ICC_Async * icc)
    339 {
    340 #ifndef NO_PAR_SWITCH
    341     /* Restore parity */
    342     if (IFD_Towitoko_SetParity (icc->ifd, IFD_TOWITOKO_PARITY_NONE) != IFD_TOWITOKO_OK)
    343         return ICC_ASYNC_IFD_ERROR;     
    344 #endif
    345304   
    346305    return ICC_ASYNC_OK;
  • trunk/csctapi/icc_async.h

    r1168 r1219  
    8585
    8686/* Operations */
    87 extern int ICC_Async_BeginTransmission (ICC_Async * icc);
    8887extern int ICC_Async_Transmit (ICC_Async * icc, unsigned size, BYTE * buffer);
    8988extern int ICC_Async_Receive (ICC_Async * icc, unsigned size, BYTE * buffer);
    90 extern int ICC_Async_EndTransmission (ICC_Async * icc);
    9189
    9290#endif /* _ICC_ASYNC_ */
  • trunk/csctapi/ifd_towitoko.c

    r1208 r1219  
    613613   
    614614        IO_Serial_Flush(ifd->io);
    615 #ifndef NO_PAR_SWITCH
    616         IFD_Towitoko_SetParity (ifd, IFD_TOWITOKO_PARITY_NONE);
    617 #endif
    618615
    619616/*
  • trunk/csctapi/protocol_t0.c

    r1208 r1219  
    827827        return PROTOCOL_T0_ERROR;
    828828   
    829     /* Initialise transmission */
    830     if (ICC_Async_BeginTransmission (t0->icc) != ICC_ASYNC_OK)
    831     {
    832         (*rsp) = NULL;
    833         return PROTOCOL_T0_ICC_ERROR;
    834     }
    835    
    836829    /* Send header bytes */
    837830    if (ICC_Async_Transmit (t0->icc, 5, APDU_Cmd_Header (cmd)) != ICC_ASYNC_OK)
    838831    {
    839         ICC_Async_EndTransmission (t0->icc);
    840        
    841832        (*rsp) = NULL;
    842833        return PROTOCOL_T0_ICC_ERROR;
     
    985976        (*rsp) = NULL;
    986977   
    987     /* End of transmission */
    988     if (ICC_Async_EndTransmission (t0->icc) != ICC_ASYNC_OK)
    989         return PROTOCOL_T0_ICC_ERROR;
    990    
    991978    return (ret);
    992979}
     
    10141001        return PROTOCOL_T14_ERROR;
    10151002   
    1016     /* Initialise transmission */
    1017     if (ICC_Async_BeginTransmission (t14->icc) != ICC_ASYNC_OK)
    1018     {
    1019         (*rsp) = NULL;
    1020         return PROTOCOL_T14_ICC_ERROR;
    1021     }
    1022    
    10231003    if(t14->icc->ifd->io->reader_type!=R_INTERNAL)
    10241004    {
     
    10261006        if (ICC_Async_Transmit (t14->icc, 1, &b1) != ICC_ASYNC_OK)
    10271007        {
    1028             ICC_Async_EndTransmission (t14->icc);
    1029            
    10301008            (*rsp) = NULL;
    10311009            return PROTOCOL_T14_ICC_ERROR;
     
    10351013        if (ICC_Async_Transmit (t14->icc, cmd_len, cmd_raw) != ICC_ASYNC_OK)
    10361014        {
    1037             ICC_Async_EndTransmission (t14->icc);
    1038            
    10391015            (*rsp) = NULL;
    10401016            return PROTOCOL_T14_ICC_ERROR;
     
    10441020        if (ICC_Async_Transmit (t14->icc, 1, &ixor) != ICC_ASYNC_OK)
    10451021        {
    1046             ICC_Async_EndTransmission (t14->icc);
    1047            
    10481022            (*rsp) = NULL;
    10491023            return PROTOCOL_T14_ICC_ERROR;
     
    10591033        if (ICC_Async_Transmit (t14->icc, cmd_len+2, buffer) != ICC_ASYNC_OK)
    10601034        {
    1061             ICC_Async_EndTransmission (t14->icc);
    1062            
    10631035            (*rsp) = NULL;
    10641036            return PROTOCOL_T14_ICC_ERROR;
     
    11471119    }
    11481120   
    1149     /* End of transmission */
    1150     if (ICC_Async_EndTransmission (t14->icc) != ICC_ASYNC_OK)
    1151         return PROTOCOL_T14_ICC_ERROR;
    1152    
    11531121    return (ret);
    11541122}
  • trunk/csctapi/protocol_t1.c

    r1168 r1219  
    418418  int length, ret;
    419419
    420   /* Setup transmission */
    421   if (ICC_Async_BeginTransmission (t1->icc) != ICC_ASYNC_OK)
    422     ret = PROTOCOL_T1_ICC_ERROR;
    423 
    424   else
    425420    {
    426421      /* Send T=1 block */
     
    430425      if (ICC_Async_Transmit (t1->icc, length, buffer) != ICC_ASYNC_OK)
    431426        {
    432           ICC_Async_EndTransmission (t1->icc);
    433427          ret = PROTOCOL_T1_ICC_ERROR;
    434428        }
     
    484478        }
    485479    }
    486 
    487   /* End of transmission */
    488   if (ICC_Async_EndTransmission (t1->icc) != ICC_ASYNC_OK)
    489     ret = PROTOCOL_T1_ICC_ERROR;
    490480
    491481  return ret;
  • trunk/oscam-config.h

    r1171 r1219  
    11#define CS_LOGHISTORY
    2 #define NO_PAR_SWITCH
    32
    43#ifdef OS_FREEBSD
     
    2120#    define SCI_DEV 1
    2221#  endif
    23 #  ifndef NO_PAR_SWITCH
    24 #    define NO_PAR_SWITCH
    25 #  endif
    2622#endif
    2723
     
    3026#  define CS_NOSHM
    3127#  define NO_FTIME
    32 #  ifndef NO_PAR_SWITCH
    33 #    define NO_PAR_SWITCH
    34 #  endif
    3528#endif
    3629
     
    4033#  define CS_LOGFILE "/dev/tty"
    4134#  define NO_ENDIAN_H
    42 #  ifndef NO_PAR_SWITCH
    43 #    define NO_PAR_SWITCH
    44 #  endif
    4535#endif
    4636
Note: See TracChangeset for help on using the changeset viewer.