From: maartenbrock Date: Thu, 4 Nov 2004 21:19:23 +0000 (+0000) Subject: * device/examples/ds390/ow390/ad26.h, X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=22c0fb25b740b7f86141e1acb16247a1f765c20c;p=fw%2Fsdcc * device/examples/ds390/ow390/ad26.h, * device/examples/ds390/ow390/cnt1d.h, * device/examples/ds390/ow390/crcutil.c, * device/examples/ds390/ow390/ownet.h, * device/examples/ds390/ow390/owsesu.c, * device/examples/ds390/ow390/swt12.h, * device/examples/ds390/ow390/swtoper.c, * device/examples/ds390/ow390/temp10.h, * device/examples/ds390/ow390/thermodl.c, * device/examples/ds390/tinitalk/tinitalk.dsp, * device/examples/ds390/tinitalk/tinitalk.dsw, * device/examples/mcs51/clock/hw.h, * device/examples/mcs51/simple2/go.bat, * device/examples/serialcomm/windows/serial.h, * device/examples/xa51/dummy.c, * device/examples/xa51/hello.c, * device/include/80c51xa.h, * device/include/at89x051.h: corrected cvs line endings git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3565 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 2a4a258e..60604307 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2004-11-04 Maarten Brock + + * device/examples/ds390/ow390/ad26.h, + * device/examples/ds390/ow390/cnt1d.h, + * device/examples/ds390/ow390/crcutil.c, + * device/examples/ds390/ow390/ownet.h, + * device/examples/ds390/ow390/owsesu.c, + * device/examples/ds390/ow390/swt12.h, + * device/examples/ds390/ow390/swtoper.c, + * device/examples/ds390/ow390/temp10.h, + * device/examples/ds390/ow390/thermodl.c, + * device/examples/ds390/tinitalk/tinitalk.dsp, + * device/examples/ds390/tinitalk/tinitalk.dsw, + * device/examples/mcs51/clock/hw.h, + * device/examples/mcs51/simple2/go.bat, + * device/examples/serialcomm/windows/serial.h, + * device/examples/xa51/dummy.c, + * device/examples/xa51/hello.c, + * device/include/80c51xa.h, + * device/include/at89x051.h: corrected cvs line endings + 2004-11-04 Vangelis Rokas * src/pic16/main.c (options): added command line --gstack, to trace @@ -79,9 +100,9 @@ 2004-10-22 Frieder Ferlemann * device/lib/ser_ir_cts_rts.c: integer promotion caused a call to the - non-reentrant function __modsint in the interrupt function (thus + non-reentrant function __modsint in the interrupt function (thus corrupting math operations during serial I/O) - * device/lib/ser_ir.c: as above, changed buffersize + * device/lib/ser_ir.c: as above, changed buffersize * src/mcs51/peeph.def: added 259.a,b for removing redundant ret, 256.c,d for zeroing * doc/Makefile: added option -t for rsync diff --git a/device/examples/ds390/ow390/ad26.h b/device/examples/ds390/ow390/ad26.h index ae3fb693..83027ba6 100755 --- a/device/examples/ds390/ow390/ad26.h +++ b/device/examples/ds390/ow390/ad26.h @@ -1,27 +1,27 @@ //--------------------------------------------------------------------------- // Copyright (C) 2000 Dallas Semiconductor Corporation, All Rights Reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included +// +// The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES -// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES +// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// Except as contained in this notice, the name of Dallas Semiconductor -// shall not be used except as stated in the Dallas Semiconductor -// Branding Policy. +// +// Except as contained in this notice, the name of Dallas Semiconductor +// shall not be used except as stated in the Dallas Semiconductor +// Branding Policy. //--------------------------------------------------------------------------- // // ad26.h - Include file for Smart Battery Monitor demo. diff --git a/device/examples/ds390/ow390/crcutil.c b/device/examples/ds390/ow390/crcutil.c index 09add308..1002ab81 100644 --- a/device/examples/ds390/ow390/crcutil.c +++ b/device/examples/ds390/ow390/crcutil.c @@ -1,27 +1,27 @@ //--------------------------------------------------------------------------- // Copyright (C) 2000 Dallas Semiconductor Corporation, All Rights Reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included +// +// The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES -// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES +// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// Except as contained in this notice, the name of Dallas Semiconductor -// shall not be used except as stated in the Dallas Semiconductor -// Branding Policy. +// +// Except as contained in this notice, the name of Dallas Semiconductor +// shall not be used except as stated in the Dallas Semiconductor +// Branding Policy. //-------------------------------------------------------------------------- // // crcutil.c - Keeps track of the CRC for 16 and 8 bit operations @@ -107,7 +107,7 @@ ushort docrc16(int portnum, ushort data) //-------------------------------------------------------------------------- // Update the Dallas Semiconductor One Wire CRC (utilcrc8) from the global -// variable utilcrc8 and the argument. +// variable utilcrc8 and the argument. // // 'portnum' - number 0 to MAX_PORTNUM-1. This number is provided to // indicate the symbolic port number. diff --git a/device/examples/ds390/ow390/ownet.h b/device/examples/ds390/ow390/ownet.h index 7c183628..7da3687c 100755 --- a/device/examples/ds390/ow390/ownet.h +++ b/device/examples/ds390/ow390/ownet.h @@ -1,29 +1,29 @@ //--------------------------------------------------------------------------- // Copyright (C) 2000 Dallas Semiconductor Corporation, All Rights Reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included +// +// The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES -// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES +// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// Except as contained in this notice, the name of Dallas Semiconductor -// shall not be used except as stated in the Dallas Semiconductor -// Branding Policy. +// +// Except as contained in this notice, the name of Dallas Semiconductor +// shall not be used except as stated in the Dallas Semiconductor +// Branding Policy. //--------------------------------------------------------------------------- -// +// // ownet.h - Include file for 1-Wire Net library // // Version: 2.00 @@ -40,19 +40,19 @@ typedef unsigned long ulong; #endif -// general defines +// general defines #define WRITE_FUNCTION 1 -#define READ_FUNCTION 0 +#define READ_FUNCTION 0 // error codes #define READ_ERROR -1 -#define INVALID_DIR -2 -#define NO_FILE -3 -#define WRITE_ERROR -4 +#define INVALID_DIR -2 +#define NO_FILE -3 +#define WRITE_ERROR -4 #define WRONG_TYPE -5 #define FILE_TOO_BIG -6 -// Misc +// Misc #define FALSE 0 #define TRUE 1 #define MAX_PORTNUM 16 @@ -102,7 +102,7 @@ extern uchar SerialNum[MAX_PORTNUM][8]; // owtrnu.c extern int owBlock(int,int,uchar *,int); extern int owReadPacketStd(int,int,int,uchar *); -extern int owWritePacketStd(int,int,uchar *,int,int,int); +extern int owWritePacketStd(int,int,uchar *,int,int,int); extern int owProgramByte(int,int,int,int,int,int); // crcutil.c @@ -139,7 +139,7 @@ extern void owRelease(int, char *); //extern void owRelease(int); // findtype.c -extern int FindDevices(int, uchar FamilySN[][8], int, int); +extern int FindDevices(int, uchar FamilySN[][8], int, int); // offile.c int owReadFile(int,uchar *,uchar *); diff --git a/device/examples/ds390/ow390/owsesu.c b/device/examples/ds390/ow390/owsesu.c index d0acf558..897f55f8 100755 --- a/device/examples/ds390/ow390/owsesu.c +++ b/device/examples/ds390/ow390/owsesu.c @@ -1,35 +1,35 @@ //--------------------------------------------------------------------------- // Copyright (C) 2000 Dallas Semiconductor Corporation, All Rights Reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included +// +// The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES -// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES +// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// Except as contained in this notice, the name of Dallas Semiconductor -// shall not be used except as stated in the Dallas Semiconductor -// Branding Policy. +// +// Except as contained in this notice, the name of Dallas Semiconductor +// shall not be used except as stated in the Dallas Semiconductor +// Branding Policy. //--------------------------------------------------------------------------- // // owSesU.C - Acquire and release a Session on the 1-Wire Net. // // Version: 2.00 // -// History: 1.03 -> 2.00 Changed 'MLan' to 'ow'. Added support for -// multiple ports. +// History: 1.03 -> 2.00 Changed 'MLan' to 'ow'. Added support for +// multiple ports. #include #include "ownet.h" @@ -40,13 +40,13 @@ static char portname[MAX_PORTNUM][128]; //--------------------------------------------------------------------------- // Attempt to acquire a 1-Wire net using a com port and a DS2480 based -// adapter. +// adapter. // // 'portnum' - number 0 to MAX_PORTNUM-1. This number was provided to // OpenCOM to indicate the port number. // 'port_zstr' - zero terminated port name. For this platform // use format COMX where X is the port number. -// 'return_msg' - zero terminated return message. +// 'return_msg' - zero terminated return message. // // Returns: TRUE - success, COM port opened // @@ -74,7 +74,7 @@ int owAcquire(int portnum, char *port_zstr, char *return_msg) cnt += sprintf(&return_msg[cnt],"Closing port %s.\n",port_zstr); CloseCOM(portnum); return FALSE; - } + } // success sprintf(portname[portnum],"%s",port_zstr); @@ -86,7 +86,7 @@ int owAcquire(int portnum, char *port_zstr, char *return_msg) // // 'portnum' - number 0 to MAX_PORTNUM-1. This number was provided to // OpenCOM to indicate the port number. -// 'return_msg' - zero terminated return message. +// 'return_msg' - zero terminated return message. // void owRelease(int portnum, char *return_msg) { diff --git a/device/examples/ds390/ow390/swtoper.c b/device/examples/ds390/ow390/swtoper.c index 2954eb86..d48eab2a 100755 --- a/device/examples/ds390/ow390/swtoper.c +++ b/device/examples/ds390/ow390/swtoper.c @@ -1,27 +1,27 @@ //--------------------------------------------------------------------------- // Copyright (C) 2000 Dallas Semiconductor Corporation, All Rights Reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included +// +// The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES -// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES +// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// Except as contained in this notice, the name of Dallas Semiconductor -// shall not be used except as stated in the Dallas Semiconductor -// Branding Policy. +// +// Except as contained in this notice, the name of Dallas Semiconductor +// shall not be used except as stated in the Dallas Semiconductor +// Branding Policy. //-------------------------------------------------------------------------- // // swtoper.C - Menu-driven test of DS2406(DS2407) 1-Wire switch @@ -81,7 +81,7 @@ int main() //short argc, char **argv) // attempt to acquire the 1-Wire Net if (!owAcquire(portnum, argv[1], return_msg)) - { + { printf("%s",return_msg); exit(1); } @@ -99,7 +99,7 @@ int main() //short argc, char **argv) n=0; if(owAccess(portnum)) { - // loop while not done + // loop while not done do { test = ReadSwitch12(portnum, clear); @@ -112,7 +112,7 @@ int main() //short argc, char **argv) count = SwitchStateToString12(test, out); printf("%s", out); - // print menu + // print menu printf("\n\n(1) Display the switch Info\n" "(2) Clear activity Latches\n" "(3) Set Flip Flop(s) on switch\n" @@ -122,10 +122,10 @@ int main() //short argc, char **argv) ch = getkeystroke(); printf("\n\n"); - // do something from the menu selection + // do something from the menu selection clear = FALSE; switch(ch) - { + { case '1': // Display the switch Info done = FALSE; break; @@ -201,8 +201,8 @@ int main() //short argc, char **argv) break; case '5': case 'q': case 'Q': // Done - done = TRUE; - break; + done = TRUE; + break; default: break; } diff --git a/device/examples/ds390/ow390/thermodl.c b/device/examples/ds390/ow390/thermodl.c index 652c9724..86544501 100644 --- a/device/examples/ds390/ow390/thermodl.c +++ b/device/examples/ds390/ow390/thermodl.c @@ -1,43 +1,43 @@ //--------------------------------------------------------------------------- // Copyright (C) 2000 Dallas Semiconductor Corporation, All Rights Reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included +// +// The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES -// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES +// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// Except as contained in this notice, the name of Dallas Semiconductor -// shall not be used except as stated in the Dallas Semiconductor -// Branding Policy. +// +// Except as contained in this notice, the name of Dallas Semiconductor +// shall not be used except as stated in the Dallas Semiconductor +// Branding Policy. //--------------------------------------------------------------------------- // // thermodl.c - This utility uses to download the results of the // current mission of a DS1921 Thermochron iButton. // // Version: 2.00 -// +// // History: -// 1.03 -> 2.00 Reorganization of Public Domain Kit +// 1.03 -> 2.00 Reorganization of Public Domain Kit // Y2K update, display all histogram bins, debug // dump. Supports multiple thermochons. // #include #include -#include "ownet.h" +#include "ownet.h" #include "thermo21.h" // defines @@ -84,7 +84,7 @@ int main() //short argc, char **argv) //---------------------------------------- // Introduction printf("\n/----------------------------------------------\n"); - printf(" Find and download DS1921 Thermochron iButton(s)\n" + printf(" Find and download DS1921 Thermochron iButton(s)\n" " Version 2.00\n\n"); // check arguments for temperature conversion and filename @@ -98,21 +98,21 @@ int main() //short argc, char **argv) Fahrenheit = TRUE; if (argc == 4) - { + { if (argv[3][0] != '/') filenum = 3; else if ((argv[3][1] == 'F') || (argv[3][1] == 'f')) Fahrenheit = TRUE; - } + } } - // open the output file + // open the output file fp = NULL; if (filenum > 0) { fp = fopen(argv[filenum],"w+"); if(fp == NULL) - { + { printf("ERROR, Could not open output file!\n"); exit(1); } @@ -121,12 +121,12 @@ int main() //short argc, char **argv) argv[filenum]); } - // get list of Thermochron's + // get list of Thermochron's num = FindDevices(portnum, &ThermoSN[0],THERMO_FAM, MAXDEVICES); // check if not present or more then 1 present if (num == 0) - ExitProg("Thermochron not present on 1-Wire\n",1); + ExitProg("Thermochron not present on 1-Wire\n",1); // loop to download each Thermochron for (i = 0; i < num; i++) @@ -189,15 +189,15 @@ void PrintResults(ThermoStateType *ThermoState, FILE *fp, int ConvertToF) #if 0 // get big block to use as a buffer - str = malloc(80000); + str = malloc(80000); if (str == NULL) { - printf("Insufficient memory available to print!\n"); + printf("Insufficient memory available to print!\n"); return; } #endif - // mission status + // mission status MissionStatusToString(&ThermoState->MissStat, ConvertToF, &str[0]); fprintf(fp,"\n%s\n",str); @@ -214,8 +214,8 @@ void PrintResults(ThermoStateType *ThermoState, FILE *fp, int ConvertToF) fprintf(fp,"%s\n",str); // debug raw data - DebugToString(&ThermoState->MissStat, &ThermoState->AlarmData, - &ThermoState->HistData, &ThermoState->LogData, &str[0]); + DebugToString(&ThermoState->MissStat, &ThermoState->AlarmData, + &ThermoState->HistData, &ThermoState->LogData, &str[0]); fprintf(fp,"%s\n",str); #if 0 diff --git a/device/examples/ds390/tinitalk/tinitalk.dsp b/device/examples/ds390/tinitalk/tinitalk.dsp index c9f38f9a..b521f13f 100644 --- a/device/examples/ds390/tinitalk/tinitalk.dsp +++ b/device/examples/ds390/tinitalk/tinitalk.dsp @@ -7,20 +7,20 @@ CFG=tinitalk - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "tinitalk.mak". -!MESSAGE +!MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "tinitalk.mak" CFG="tinitalk - Win32 Debug" -!MESSAGE +!MESSAGE !MESSAGE Possible choices for configuration are: -!MESSAGE +!MESSAGE !MESSAGE "tinitalk - Win32 Release" (based on\ "Win32 (x86) Console Application") !MESSAGE "tinitalk - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE +!MESSAGE # Begin Project # PROP Scc_ProjName "" @@ -74,7 +74,7 @@ LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -!ENDIF +!ENDIF # Begin Target diff --git a/device/examples/serialcomm/windows/serial.h b/device/examples/serialcomm/windows/serial.h index dffeb2f1..e939554d 100755 --- a/device/examples/serialcomm/windows/serial.h +++ b/device/examples/serialcomm/windows/serial.h @@ -14,7 +14,7 @@ #define ASCII_XOFF 0x13 -HANDLE SerialInit(char*, int); +HANDLE SerialInit(char*, int); char SerialGetc(HANDLE*);