~ubuntu-branches/ubuntu/wily/acsccid/wily

« back to all changes in this revision

Viewing changes to src/ifdhandler.c

  • Committer: Package Import Robot
  • Author(s): Godfrey Chung
  • Date: 2013-09-02 11:46:30 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130902114630-lujvp61jp7wacnwv
Tags: 1.0.5-1
* New upstream release.
* Updated Standards-Version to 3.9.4.
* Updated debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
    ifdhandler.c: IFDH API
3
3
    Copyright (C) 2003-2009   Ludovic Rousseau
4
 
    Copyright (C) 2009-2012   Advanced Card Systems Ltd.
 
4
    Copyright (C) 2009-2013   Advanced Card Systems Ltd.
5
5
 
6
6
    This library is free software; you can redistribute it and/or
7
7
    modify it under the terms of the GNU Lesser General Public
63
63
static int DebugInitialized = FALSE;
64
64
 
65
65
// Card voltage and card type selection for ACR38U, ACR38U-SAM and SCR21U
66
 
int ACR38CardVoltage = 0;
67
 
int ACR38CardType = 0;
 
66
BYTE ACR38CardVoltage = 0;
 
67
DWORD ACR38CardType = 0;
68
68
 
69
69
/* local functions */
70
70
#if HAVE_DECL_TAG_IFD_POLLING_THREAD && !defined(TWIN_SERIAL) && defined(USE_USB_INTERRUPT)
623
623
                                                (ACS_ACR1281_DUAL_READER_QPBOC == readerID) ||
624
624
                                                (ACS_ACR1281_DUAL_READER_BSI == readerID) ||
625
625
                                                (ACS_ACR1281_1S_PICC_READER == readerID) ||
626
 
                                                (ACS_ACR1251_1S_CL_READER == readerID))
 
626
                                                (ACS_ACR1251_1S_CL_READER == readerID) ||
 
627
                                                (ACS_ACR1251U_C == readerID))
627
628
                                                *Value = 2;
628
629
                                }
629
630
#endif
2108
2109
                goto end;
2109
2110
        }
2110
2111
 
2111
 
#ifndef __APPLE__
2112
 
        // ACR1222 or ACR1283 is required to read data from interrupt endpoint
2113
 
        if ((ACS_ACR85_PINPAD_READER_PICC == ccid_descriptor->readerID) ||
2114
 
                (ACS_ACR1222_DUAL_READER == ccid_descriptor->readerID) ||
2115
 
                (ACS_ACR1222_1SAM_DUAL_READER == ccid_descriptor->readerID) ||
2116
 
                (ACS_ACR1283_4S_CL_READER == ccid_descriptor->readerID) ||
2117
 
                (ACS_ACR1283_CL_READER == ccid_descriptor->readerID) ||
2118
 
                (ACS_ACR1283U_FW_UPGRADE == ccid_descriptor->readerID))
2119
 
        {
2120
 
                InterruptRead(reader_index, 10);
2121
 
        }
2122
 
#endif
2123
 
 
2124
2112
        /* save the current read timeout computed from card capabilities */
2125
2113
        oldReadTimeout = ccid_descriptor->readTimeout;
2126
2114
 
2180
2168
                }
2181
2169
        }
2182
2170
        else
 
2171
        {
 
2172
#ifndef __APPLE__
 
2173
                InterruptRead(reader_index, 10);
 
2174
#endif
2183
2175
                return_value = CcidSlots[reader_index].pGetSlotStatus(reader_index, pcbuffer);
 
2176
        }
2184
2177
 
2185
2178
        /* set back the old timeout */
2186
2179
        ccid_descriptor->readTimeout = oldReadTimeout;