mirror of
https://github.com/preble/libpinproc
synced 2026-02-22 18:15:25 +01:00
Replace sleep() with PRSleep() for cross-platform compiling
This commit is contained in:
@@ -555,7 +555,8 @@ void waitTime(long microsec)
|
||||
// Read the JTAG status register to exercise the USB bus
|
||||
PRJTAGGetStatus(proc, &jtagStatus);
|
||||
|
||||
sleep( ( microsec - 2000L ) / 1000000L);
|
||||
PRSleep( ( microsec - 2000L ) / 1000L);
|
||||
//sleep( ( microsec - 2000L ) / 1000000L);
|
||||
}
|
||||
else /* Satisfy FPGA JTAG configuration, startup TCK cycles */
|
||||
{
|
||||
@@ -568,6 +569,7 @@ void waitTime(long microsec)
|
||||
PRJTAGGetStatus(proc, &jtagStatus);
|
||||
}
|
||||
//{
|
||||
//PRSleep( ( microsec + 19999L ) / 1000L );
|
||||
//sleep( ( microsec + 19999L ) / 1000000L );
|
||||
//sleep( 1 );
|
||||
//pulseClock();
|
||||
|
||||
@@ -13,6 +13,13 @@
|
||||
#ifndef PINPROCFW_H
|
||||
#define PINPROCFW_H
|
||||
|
||||
#if defined(__WIN32__)
|
||||
#include <windows.h>
|
||||
#define PRSleep(milliseconds) Sleep(milliseconds)
|
||||
#else
|
||||
#define PRSleep(milliseconds) sleep(milliseconds/1000)
|
||||
#endif
|
||||
|
||||
/* Legacy error codes for xsvfExecute from original XSVF player v2.0 */
|
||||
#define XSVF_LEGACY_SUCCESS 1
|
||||
#define XSVF_LEGACY_ERROR 0
|
||||
|
||||
Reference in New Issue
Block a user