diff -r -u digitemp-3.3.2.orig/userial/ds9097u/ds2480ut.c digitemp-3.3.2/userial/ds9097u/ds2480ut.c --- digitemp-3.3.2.orig/userial/ds9097u/ds2480ut.c Mon Jan 26 01:40:11 2004 +++ digitemp-3.3.2/userial/ds9097u/ds2480ut.c Thu Feb 17 23:55:51 2005 @@ -41,6 +41,15 @@ // 2.10 -> 3.00 Added memory bank functionality // Added file I/O operations // +// + +// based on Version 3.00: +// +// 2005-02-17: DS2480_Try() modification for (pseudo) serial lines +// that cannot send a break - e.g. bluetooth links +// by Christian Kreiner (kreiner at iti dot tu-graz dot ac dat at) +// +// #include "ownet.h" #include "ds2480.h" @@ -121,6 +130,10 @@ // delay to let line settle msDelay(4); + // just in case the 2480 did not undergo a reset - switch to command mode + // [ this could happen over (pseudo) serial lines that cannot send a BREAK + // like a bluetooth link ] + sendpacket[sendlen++] = MODE_COMMAND; // set the FLEX configuration parameters // default PDSRC = 1.37Vus sendpacket[sendlen++] = CMD_CONFIG | PARMSEL_SLEW | PARMSET_Slew1p37Vus; @@ -140,7 +153,7 @@ int i; printf("sendpacket: "); - for(i=0;i<5;i++) + for(i=0;i