summaryrefslogtreecommitdiff
path: root/nuttx/fs/fat/fs_fat32.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-08-03 17:45:20 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-08-03 17:45:20 +0000
commita3faf4085e5b1cde0c452ac6e9125f98fd6614f3 (patch)
treea2d80ca0547993f06df10e52148be66fb105acb4 /nuttx/fs/fat/fs_fat32.h
parentad8509bd41d1ac2136d79632b2e4ac1d6aba4393 (diff)
downloadpx4-nuttx-a3faf4085e5b1cde0c452ac6e9125f98fd6614f3.tar.gz
px4-nuttx-a3faf4085e5b1cde0c452ac6e9125f98fd6614f3.tar.bz2
px4-nuttx-a3faf4085e5b1cde0c452ac6e9125f98fd6614f3.zip
fleshing out mkfatfs logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@801 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fat/fs_fat32.h')
-rw-r--r--nuttx/fs/fat/fs_fat32.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/nuttx/fs/fat/fs_fat32.h b/nuttx/fs/fat/fs_fat32.h
index cedbd9c84..3dfc0aae2 100644
--- a/nuttx/fs/fat/fs_fat32.h
+++ b/nuttx/fs/fat/fs_fat32.h
@@ -136,7 +136,8 @@
#define DIR_WRTDATE 24 /* 2@24: Date of last write */
#define DIR_FSTCLUSTLO 26 /* 2@26: LS first cluster number */
#define DIR_FILESIZE 28 /* 4@28: File size in bytes */
-#define DIR_SIZE 32
+#define DIR_SIZE 32 /* The size of one directory entry */
+#define DIR_SHIFT 5 /* log2 of DIR_SIZE */
/* First byte of the directory name has special meanings: */
@@ -178,15 +179,22 @@
* These offset describe the FSINFO sector
*/
-#define FSI_LEADSIG 0 /* 4@0: 0x41615252 */
+#define FSI_LEADSIG 0 /* 4@0: 0x41615252 = "RRaA" */
/* 480@4: Reserved (zero) */
-#define FSI_STRUCTSIG 484 /* 4@484: 0x61417272 */
+#define FSI_STRUCTSIG 484 /* 4@484: 0x61417272 = "rrAa" */
#define FSI_FREECOUNT 488 /* 4@488: Last free cluster count on volume */
#define FSI_NXTFREE 492 /* 4@492: Cluster number of 1st free cluster */
/* 12@496: Reserved (zero) */
#define FSI_TRAILSIG 508 /* 4@508: 0xaa550000 */
/****************************************************************************
+ * FAT values
+ */
+
+#define FAT_EOF 0x0ffffff8
+#define FAT_BAD 0x0ffffff7
+
+/****************************************************************************
* Access to data in raw sector data */
#define UBYTE_VAL(p,o) (((ubyte*)(p))[o])