X-Git-Url: http://git.smho.de/gw/?a=blobdiff_plain;f=src%2FowDevice.cpp;h=070ec4093e49eb0f8e39763f9e76921454a69088;hb=6cc62e3c72ae861a7d1c7f770e052b7b054d0c7a;hp=840a0b2ca0857d304fbc37568d8cc3f9b672e97b;hpb=c7561c5e50f1df4015c0c250bdbaa2efbb95a3bd;p=owTools.git diff --git a/src/owDevice.cpp b/src/owDevice.cpp index 840a0b2..070ec40 100755 --- a/src/owDevice.cpp +++ b/src/owDevice.cpp @@ -32,8 +32,21 @@ #include "owInterface.h" +#ifdef LINUX #include - +#endif +#ifdef WIN +void usleep(int waitTime) { + __int64 time1 = 0, time2 = 0, freq = 0; + + QueryPerformanceCounter((LARGE_INTEGER *)&time1); + QueryPerformanceFrequency((LARGE_INTEGER *)&freq); + + do { + QueryPerformanceCounter((LARGE_INTEGER *)&time2); + } while ((time2 - time1) < waitTime); +} +#endif owDevice::owDevice(owInterface *owi_,snum_t num) { snum=num; owi=owi_; @@ -236,7 +249,7 @@ int owDeviceDS18B20::convertAll() { void owDeviceDS2438::setDefaultConfig() { - config->setConfig({1,6, 6,8, 4,7, 7,17, 0,2,3,12,4,0,0,0,0,0,0,0,0,0,0,0}); + config->setConfig({1,6, 6,8, 4,7, 6,17, 0,2,3,12,4,0,0,0,0,0,0,0,0,0,0,0}); configstate=OWDCS_DEFAULT; }