This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
FAT12/16 filesystem for ecos
- From: Iram <iram_raza at yahoo dot co dot uk>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 24 Aug 2004 11:12:00 +0100 (BST)
- Subject: [ECOS] FAT12/16 filesystem for ecos
Hi Savin
>Data in FAT fs is in little endian format by
>standard. The current
>macros are written for the little endian machines,
>if you are accessing this data with an big endian
> uC, then you need to write a new set of GET/SET _
> BYTE/WORD/DWORD macros
> (in _DWORD macros just switch '(_off_) + 1' > with
'(_off_) + 2' and
> '(_off_)' with '(_off_) + 3' ... etc)
> you can ifdef them with '#if CYG_BYTEORDER ==
> CYG_MSBFIRST'
Thanx for your reply. I have written some of the
macros for Big Endian. The GET_BYTES macro uses
function bcopy() to copy 'n' length string for little
endian. For big endian its not as simple as that I was
wondering if a similar sort of macro already exists
that could be used as a starting point
regards
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss