diff --git a/src/dev_arygon.c b/src/dev_arygon.c index adfe04c..f01ba91 100644 --- a/src/dev_arygon.c +++ b/src/dev_arygon.c @@ -137,10 +137,18 @@ bool dev_arygon_transceive(const dev_spec ds, const byte_t* pbtTx, const uint32_ } /** @note ARYGON-APDB need 20ms between sending and receiving frame. No information regarding this in ARYGON datasheet... */ - usleep(20000); + #ifdef _WIN32 + Sleep(20); + #else + usleep(20000); + #endif /** @note ARYGON-APDB need 20ms more to be able to report (correctly) present tag. */ - usleep(20000); + #ifdef _WIN32 + Sleep(20); + #else + usleep(20000); + #endif if (!rs232_receive((serial_port)ds,abtRxBuf,&uiRxBufLen)) { ERR("Unable to receive data. (RX)"); diff --git a/src/libnfc.c b/src/libnfc.c index 5237382..5fd0eca 100644 --- a/src/libnfc.c +++ b/src/libnfc.c @@ -389,12 +389,13 @@ bool nfc_initiator_init(const dev_info* pdi) bool nfc_initiator_select_dep_target(const dev_info* pdi, const init_modulation im, const byte_t* pbtPidData, const uint32_t uiPidDataLen, const byte_t* pbtNFCID3i, const uint32_t uiNFCID3iDataLen, const byte_t *pbtGbData, const uint32_t uiGbDataLen, tag_info* pti) { + uint32_t offset; if(im == IM_ACTIVE_DEP) { pncmd_reader_jump_for_dep[2] = 0x01; /* active DEP */ } pncmd_reader_jump_for_dep[3] = 0x00; /* baud rate = 106kbps */ - uint32_t offset = 5; + offset = 5; if(pbtPidData && im != IM_ACTIVE_DEP) { /* can't have passive initiator data when using active mode */ pncmd_reader_jump_for_dep[4] |= 0x01; memcpy(pncmd_reader_jump_for_dep+offset,pbtPidData,uiPidDataLen);