tm3d
/
owTools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add access with W1-Kernelmodule
[owTools.git]
/
src
/
owDevice.cpp
diff --git
a/src/owDevice.cpp
b/src/owDevice.cpp
index
840a0b2
..
070ec40
100755
(executable)
--- a/
src/owDevice.cpp
+++ b/
src/owDevice.cpp
@@
-32,8
+32,21
@@
#include "owInterface.h"
#include "owInterface.h"
+#ifdef LINUX
#include <unistd.h>
#include <unistd.h>
-
+#endif
+#ifdef WIN
+void usleep(int waitTime) {
\r
+ __int64 time1 = 0, time2 = 0, freq = 0;
\r
+
\r
+ QueryPerformanceCounter((LARGE_INTEGER *)&time1);
\r
+ QueryPerformanceFrequency((LARGE_INTEGER *)&freq);
\r
+
\r
+ do {
\r
+ QueryPerformanceCounter((LARGE_INTEGER *)&time2);
\r
+ } while ((time2 - time1) < waitTime);
\r
+}
+#endif
owDevice::owDevice(owInterface *owi_,snum_t num) {
snum=num;
owi=owi_;
owDevice::owDevice(owInterface *owi_,snum_t num) {
snum=num;
owi=owi_;
@@
-236,7
+249,7
@@
int owDeviceDS18B20::convertAll() {
void owDeviceDS2438::setDefaultConfig() {
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;
}
configstate=OWDCS_DEFAULT;
}