Ignore:
Timestamp:
01/11/10 19:30:52 (12 years ago)
Author:
alno
Message:

WebIf:

  • Merging revisions 1180-1185 of trunk
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/monitor-improvement/csctapi/ifd_towitoko.c

    r1177 r1189  
    364364#elif COOL
    365365    if(ifd->io->com==RTYP_SCI)
    366     {
    367     //  in=1;//FIXME
    368         int state;
    369         if (cnxt_smc_get_state(handle, &state))
    370             return IFD_TOWITOKO_IO_ERROR;
    371         //guessing: state = 0 no card, 1 = not ready, 2 = ready
    372         if (state)
    373           in = 1; //CARD, even if not ready report card is in, or it will never get activated
    374         else
    375             in = 0; //Nocard
     366    {   
     367        if (!Cool_GetStatus(&in))
     368            return IFD_TOWITOKO_IO_ERROR;
    376369    }
    377370    else
     
    627620        if(n==0)
    628621            return IFD_TOWITOKO_IO_ERROR;
    629 #elif COOL
    630     if(ifd->io->com==RTYP_SCI) {
    631         //Cool_Reset(atr);
    632         //reset needs clock to be reset by hand
    633         typedef unsigned long u_int32;
    634         u_int32 clk;
    635         clk = 357*10000; // MHZ
    636         if (cnxt_smc_set_clock_freq(handle, clk))
    637             return IFD_TOWITOKO_IO_ERROR;
     622#endif
    638623           
    639         //reset card
    640         int timeout = 5000; // Timout in ms?
    641         if (cnxt_smc_reset_card (handle, timeout, NULL, NULL))
    642             return IFD_TOWITOKO_IO_ERROR;
    643 
    644         int n = 40;
    645         unsigned char buf[40];
    646         if (cnxt_smc_get_atr (handle, buf, &n))
    647             return IFD_TOWITOKO_IO_ERROR;
    648 #endif
    649            
    650 #if defined(SCI_DEV) || defined(COOL)
     624#ifdef SCI_DEV
    651625        (*atr) = ATR_New ();
    652626        if(ATR_InitFromArray ((*atr), buf, n) == ATR_OK)
Note: See TracChangeset for help on using the changeset viewer.