Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 323 → Rev 324

/trunk/fat16.c
542,15 → 542,10
UART1_PutString("\r\n FAT16 deinit...");
// declare the filepointers as unused.
for(cnt = 0; cnt < FILE_MAX_OPEN; cnt++)
{
if(FilePointer[cnt].State == FSTATE_USED)
{
returnvalue += fclose_(&FilePointer[cnt]); // try to close open file pointers
}
else UnlockFilePointer(&FilePointer[cnt]);
 
{
UnlockFilePointer(&FilePointer[cnt]);
}
SDC_Deinit(); // uninitialize interface to sd-card
returnvalue = SDC_Deinit(); // uninitialize interface to sd-card
Partition.IsValid = 0; // mark data in partition structure as invalid
Partition.VolumeLabel[0]='\0';
UART1_PutString("ok");
1613,7 → 1608,7
}
 
dir = (DirEntry_t *)file->Cache;
// update dile size and modification time & date
// update file size and modification time & date
dir[file->DirectoryIndex].ModTime = FileTime(&SystemTime);
dir[file->DirectoryIndex].ModDate = FileDate(&SystemTime);
dir[file->DirectoryIndex].LastAccessDate = dir[file->DirectoryIndex].ModDate;
/trunk/gpx.c
409,7 → 409,7
switch(doc->state)
{
case GPX_DOC_CLOSED: // document hasn't been opened yet therefore it will be initialized automatically
retval = GPX_DocumentOpen("default.gpx",doc); // open the gpx-document with a standardname.
retval = GPX_DocumentOpen("default.gpx",doc); // open the gpx-document with a standardname.
break;
 
case GPX_DOC_OPENED: // if a document has been opened before but no track exists:
/trunk/main.c
306,6 → 306,12
//----------------------------------------------------------------------------------------------------
int main(void)
{
/*
static u32 ftimer =0;
static u8 fstate = 0;
static File_t* f = NULL;
*/
/* Configure the system clocks */
SCU_Config();
/* init VIC (Vectored Interrupt Controller) */
404,6 → 410,49
}
// ---------------- Logging ---------------------------------------
Logging_Update(); // could be block some time for at max. 2 seconds, therefore move time critical part of the mainloop into the ISR of timer 1
/*
// test
if(CheckDelay(ftimer))
{
 
s8* filename = "test.txt";
 
ftimer = SetDelay(100);
if(FC.Poti[3]>100 && fstate == 0)
{
fstate = 1;
}
else if(FC.Poti[3]<100 && fstate == 2)
{
fstate = 3;
}
 
switch(fstate)
{
case 1:
sprintf(text,"\r\nStart writing file: %s", filename);
UART1_PutString(text);
f = fopen_(filename, 'a');
if(f== NULL) Fat16_Init();
fstate = 2;
break;
 
case 2:
fputs_("\r\ntest edins sdv dsivbds iv dsivb disbv idsv bisd bv d suiv dsibsivbdis fbvisdöb visdbvisdb vidbfibds ibv", f);
break;
case 3:
sprintf(text,"\r\nClosing file: %s", filename);
UART1_PutString(text);
fclose_(f);
fstate = 0;
break;
 
default:
break;
}
}
*/
}
}
 
/trunk/sdc.c
642,7 → 642,7
// Description: This function deinitialises the SDCard interface.
//
//
// Returnvalue: the function returns 0 if the initialisation was successfull otherwise the function returns an errorcode.
// Returnvalue: the function returns 0 if the deinitialisation was successfull otherwise the function returns an errorcode.
//________________________________________________________________________________________________________________________________________
 
SD_Result_t SDC_Deinit(void)
707,6 → 707,7
goto end;
}
}while((rsp & 0x11) != 0x01 );
// analyse data response token
switch(rsp & DATA_RESPONSE_MASK)
{