git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@47 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
frankmorgner
2010-03-10 09:14:38 +00:00
parent 2bc8c9b512
commit e80c647b22
2 changed files with 14 additions and 3 deletions

View File

@@ -21,6 +21,8 @@
#include "apdu.h" #include "apdu.h"
#include <opensc/log.h> #include <opensc/log.h>
#include <opensc/types.h> #include <opensc/types.h>
#include <string.h>
/*********************************************************************/ /*********************************************************************/
/* higher level APDU transfer handling functions */ /* higher level APDU transfer handling functions */
@@ -48,6 +50,15 @@
*/ */
#ifndef _WIN32
#include <unistd.h>
#define msleep(t) usleep((t) * 1000)
#else
#define msleep(t) Sleep(t)
#define sleep(t) Sleep((t) * 1000)
#endif
/** Tries to determine the APDU type (short or extended) of the supplied /** Tries to determine the APDU type (short or extended) of the supplied
* APDU if one of the SC_APDU_CASE_? types is used. * APDU if one of the SC_APDU_CASE_? types is used.
* @param apdu APDU object * @param apdu APDU object

View File

@@ -1,11 +1,11 @@
#ifndef _PACE_H #ifndef _APDU_H
#define _PACE_H #define _APDU_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <opensc.h> #include <opensc/opensc.h>
/** Sends a APDU to the card /** Sends a APDU to the card
* @param card sc_card_t object to which the APDU should be send * @param card sc_card_t object to which the APDU should be send