You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

12 lines
401 B

--- a/lpc21isp.c
+++ b/lpc21isp.c
@@ -1130,7 +1130,8 @@ void ClearSerialPortBuffers(ISP_ENVIRONMENT *IspEnvironment)
*/
void Sleep(unsigned long MilliSeconds)
{
- usleep(MilliSeconds*1000); //convert to microseconds
+ struct timespec m = { MilliSeconds / 1000 , (MilliSeconds % 1000 ) * 1000 * 1000};
+ nanosleep(&m, &m); //convert to nanoseconds
}
#endif // defined COMPILE_FOR_LINUX