Subversion Repositories NaviCtrl

Rev

Rev 368 | Rev 379 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 368 Rev 378
Line 58... Line 58...
58
#include "timer1.h"
58
#include "timer1.h"
59
#include "fat16.h"
59
#include "fat16.h"
60
#include "sdc.h"
60
#include "sdc.h"
61
#include "uart1.h"
61
#include "uart1.h"
62
#include "logging.h"
62
#include "logging.h"
-
 
63
#include "led.h"
63
//________________________________________________________________________________________________________________________________________
64
//________________________________________________________________________________________________________________________________________
64
// Module name:                 fat16.c
65
// Module name:                 fat16.c
65
// Compiler used:               avr-gcc 3.4.5
66
// Compiler used:               avr-gcc 3.4.5
66
// Last Modifikation:   20.03.2010
67
// Last Modifikation:   20.03.2010
67
// Version:                             2.10
68
// Version:                             2.10
Line 1737... Line 1738...
1737
                                {
1738
                                {
1738
                                        Fat16_Deinit();
1739
                                        Fat16_Deinit();
1739
                                        return(EOF);
1740
                                        return(EOF);
1740
                                }
1741
                                }
1741
                        }
1742
                        }
1742
               
1743
       
1743
                        file->Cache[file->ByteOfCurrSector] = (u8)c;            // write databyte into the buffer. The byte will be written to the device at once
-
 
-
 
1744
 
1744
                        if(file->Size == file->Position) file->Size++;          // a character has been written to the file so the size is incremented only when the character has been added at the end of the file.
1745
                        if(file->Size == file->Position) file->Size++;          // a character has been written to the file so the size is incremented only when the character has been added at the end of the file.
1745
                        file->Position++;                                                                       // the actual positon within the file.
1746
                        file->Position++;                                                                       // the actual positon within the file.
1746
                        file->ByteOfCurrSector++;                                                       // goto next byte in sector
1747
                        file->ByteOfCurrSector++;                                                       // goto next byte in sector
1747
                        if(file->ByteOfCurrSector >= BYTES_PER_SECTOR)          // if the end of this sector is reached yet
1748
                        if(file->ByteOfCurrSector >= BYTES_PER_SECTOR)          // if the end of this sector is reached yet
1748
                        {       // save the sector to the sd-card
1749
                        {       // save the sector to the sd-card