This is something I'm not too sure about. Personally, I feel that the
user should be responsible for updating the file size. Expecially
because you may also want to decrease a files size.

When writing, you can update your file size in your loop every maybe
10 sectors or whatever you wish, or before, or after you write data.

One other thing to note is that you must write full sectors. So, with
the fat32 small lib, you can't write to the exact end of a file, you
have to start at the next sector. Adding data to a sector that already
has some data would mean that you will need to store the entire sector
somewhere. This is another reason why you can only have one file.

I also noticed that this fat32 small lib uses a lot of stack on
smaller processors like 16f877a. I'm not sure how to reduce that.

Matt.

On Oct 25, 12:50 pm, "funlw65(Vasi)" <[email protected]> wrote:
> Thanks for the example. If I understand well, we must keep also the
> evidence of sectors? It is not done "automatically", as is the file
> size?
>
> Vasi
>
> On Oct 25, 6:50 am, [email protected] wrote:
>
>
>
> > Revision: 2292
> > Author: [email protected]
> > Date: Sun Oct 24 20:50:17 2010
> > Log: Added fat32_small write at end of file 
> > sample.http://code.google.com/p/jallib/source/detail?r=2292
>
> > Modified:
> >   /trunk/sample/16f877_fat32_small_pata_hard_disk.jal
> >   /trunk/sample/16f877_fat32_small_sd_card.jal
> >   /trunk/sample/16f877a_fat32_small_pata_hard_disk.jal
> >   /trunk/sample/16f877a_fat32_small_sd_card.jal
> >   /trunk/sample/18f4525_fat32_small_pata_hard_disk.jal
> >   /trunk/sample/18f4525_fat32_small_sd_card.jal
> >   /trunk/sample/18f452_fat32_small_pata_hard_disk.jal
> >   /trunk/sample/18f452_fat32_small_sd_card.jal
> >   /trunk/sample/18f4550_fat32_small_sd_card.jal
> >   /trunk/sample/18f4620_fat32_small_pata_hard_disk.jal
> >   /trunk/sample/18f4620_fat32_small_sd_card.jal
> >   /trunk/sample/18f67j50_fat32_small_pata_hard_disk.jal
> >   /trunk/sample/18f67j50_fat32_small_sd_card.jal- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to