git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@796
4a8a32a2-be11-0410-ad9d-
d568d2c75423
-MFLAGS = -mds390 --model-flat24 --stack-10bit
LFLAGS = --xram-loc 0x100080 --code-loc 0x10000 -Wl-r
OBJECTS = clock390.rel
LFLAGS = --xram-loc 0x100080 --code-loc 0x10000 -Wl-r
OBJECTS = clock390.rel
- rm -f *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.rst *.sym *.lnk
+ rm -f *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.rst *.sym *.lnk core *.dump*
clock390.hex: $(OBJECTS)
$(CC) $(MFLAGS) $(LFLAGS) $(OBJECTS)
clock390.hex: $(OBJECTS)
$(CC) $(MFLAGS) $(LFLAGS) $(OBJECTS)
- sdcc -mds390 --model-flat24 --stack-10bit \
- --xram-loc 0x100080 --code-loc 0x10000 \
+ sdcc -mds390 --xram-loc 0x100080 --code-loc 0x10000 \
-Wl-r hello390.c
packihx hello390.ihx >hello390.hex
#tinitalk -c execute hello390.hex
clean:
-Wl-r hello390.c
packihx hello390.ihx >hello390.hex
#tinitalk -c execute hello390.hex
clean:
- rm -f *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.rst *.sym *.lnk
+ rm -f *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.rst *.sym *.lnk core *.dump*
-MFLAGS = -mds390 --model-flat24 --stack-10bit
LFLAGS = --xram-loc 0x100080 --code-loc 0x10000 -Wl-r
OBJECTS = i2c390.rel ds1621.rel pcf8591.rel
LFLAGS = --xram-loc 0x100080 --code-loc 0x10000 -Wl-r
OBJECTS = i2c390.rel ds1621.rel pcf8591.rel
- rm -f *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.rst *.sym *.lnk
+ rm -f *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.rst *.sym *.lnk core *.dump*
i2c390.hex: $(OBJECTS)
$(CC) $(MFLAGS) $(LFLAGS) $(OBJECTS)
i2c390.hex: $(OBJECTS)
$(CC) $(MFLAGS) $(LFLAGS) $(OBJECTS)
clean:
rm -f core *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map \
clean:
rm -f core *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map \
- *.rst *.sym *.lnk *.lib
+ *.rst *.sym *.lnk *.lib *.dump*
%.hex: ow.lib sensors.lib $(TINI_TEST_OBJECTS) %.rel
$(CC) $(MFLAGS) $(LFLAGS) $*.rel $(TINI_TEST_OBJECTS) \
%.hex: ow.lib sensors.lib $(TINI_TEST_OBJECTS) %.rel
$(CC) $(MFLAGS) $(LFLAGS) $*.rel $(TINI_TEST_OBJECTS) \
-int fopen(char * path, char *mode) {
+FILE * fopen(char * path, char *mode) {
path, mode; //hush the compiler
path, mode; //hush the compiler
#define stdout ((void *)0)
#define stderr ((void *)0)
int fprintf (FILE *fp, xdata char *format, ...) reentrant;
#define stdout ((void *)0)
#define stderr ((void *)0)
int fprintf (FILE *fp, xdata char *format, ...) reentrant;
-int fopen (char *, char *);
+FILE *fopen (char *, char *);
int fclose (FILE *);
// defines
int fclose (FILE *);
// defines
int main() //short argc, char **argv)
{
int Fahrenheit=FALSE,filenum,num,i,j;
int main() //short argc, char **argv)
{
int Fahrenheit=FALSE,filenum,num,i,j;
ThermoStateType ThermoState;
uchar ThermoSN[MAXDEVICES][8]; //the serial numbers for the devices
int portnum=0;
ThermoStateType ThermoState;
uchar ThermoSN[MAXDEVICES][8]; //the serial numbers for the devices
int portnum=0;
fp = NULL;
if (filenum > 0)
{
fp = NULL;
if (filenum > 0)
{
- fp = fopen(argv[filenum],"w+");
- if(fp == NULL)
- {
+ fp = fopen(argv[filenum],"w+");
+ if(fp == NULL)
+ {
printf("ERROR, Could not open output file!\n");
exit(1);
printf("ERROR, Could not open output file!\n");
exit(1);
- }
- else
- printf("File '%s' opened to write mission results.\n",
- argv[filenum]);
+ }
+ else
+ printf("File '%s' opened to write mission results.\n",
+ argv[filenum]);
}
// get list of Thermochron's
}
// get list of Thermochron's
- num = FindDevices(portnum, &ThermoSN[0],THERMO_FAM, MAXDEVICES);
+ 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);
// loop to download each Thermochron
// check if not present or more then 1 present
if (num == 0)
ExitProg("Thermochron not present on 1-Wire\n",1);
// loop to download each Thermochron
for (i = 0; i < num; i++)
{
// set the serial number portion in the thermo state
for (i = 0; i < num; i++)
{
// set the serial number portion in the thermo state
printf("%02X",ThermoSN[i][j]);
}
printf("\n");
printf("%02X",ThermoSN[i][j]);
}
printf("\n");
// download the Thermochron found
if (DownloadThermo(portnum,&ThermoSN[i][0],&ThermoState,stdout))
{
// download the Thermochron found
if (DownloadThermo(portnum,&ThermoSN[i][0],&ThermoState,stdout))
{
- // interpret the results of the download
- InterpretStatus(&ThermoState.MissStat);
- InterpretAlarms(&ThermoState.AlarmData, &ThermoState.MissStat);
- InterpretHistogram(&ThermoState.HistData);
- InterpretLog(&ThermoState.LogData, &ThermoState.MissStat);
+ // interpret the results of the download
+ InterpretStatus(&ThermoState.MissStat);
+ InterpretAlarms(&ThermoState.AlarmData, &ThermoState.MissStat);
+ InterpretHistogram(&ThermoState.HistData);
+ InterpretLog(&ThermoState.LogData, &ThermoState.MissStat);
- PrintResults(&ThermoState,fp,Fahrenheit);
+ PrintResults(&ThermoState,fp,Fahrenheit);
}
// release the 1-Wire Net
}
// release the 1-Wire Net
- owRelease(portnum,return_msg);
+ //owRelease(portnum,return_msg);
printf("\n%s",return_msg);
ExitProg("End program normally\n",0);
return 0;
printf("\n%s",return_msg);
ExitProg("End program normally\n",0);
return 0;
-MFLAGS = -mds390 --model-flat24 --stack-10bit
LFLAGS = --xram-loc 0x180080 --code-loc 0x10000 -Wl-r
OBJECTS = readmac.rel ow.rel crcutil.rel
LFLAGS = --xram-loc 0x180080 --code-loc 0x10000 -Wl-r
OBJECTS = readmac.rel ow.rel crcutil.rel
- rm -f *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.rst *.sym *.lnk
+ rm -f *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.rst *.sym *.lnk core *.dump*
readmac.hex: readmac.ihx
packihx readmac.ihx >readmac.hex
readmac.hex: readmac.ihx
packihx readmac.ihx >readmac.hex
//
// Kevin Vigor, 11/20/2000
//
// Kevin Vigor, 11/20/2000
#include "ow.h"
#include "crcutil.h"
#include "ow.h"
#include "crcutil.h"
-#include <serial390.h>
-#include <ds80c390.h>
#include "ow.h"
#include "crcutil.h"
#include "ow.h"
#include "crcutil.h"
-MFLAGS = -mds390 --model-flat24 --stack-10bit
LFLAGS = --xram-loc 0x100080 --code-loc 0x10000 -Wl-r
OBJECTS = rtc390.rel
LFLAGS = --xram-loc 0x100080 --code-loc 0x10000 -Wl-r
OBJECTS = rtc390.rel
- rm -f *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.rst *.sym *.lnk
+ rm -f *~ \#* *.asm *.cdb *.rel *.hex *.ihx *.lst *.map *.rst *.sym *.lnk core *.dump*
rtc390.hex: $(OBJECTS)
$(CC) $(MFLAGS) $(LFLAGS) $(OBJECTS)
rtc390.hex: $(OBJECTS)
$(CC) $(MFLAGS) $(LFLAGS) $(OBJECTS)