SDFat: FatStructs.h File Reference

This graph shows which files directly or indirectly include this file:

subjects

struct   partitionTable
  MBR partition table entry. More...
struct   masterBootRecord
  Master Boot Record. More...
struct   biosParmBlock
  BIOS parameter block. More...
struct   fat32BootSector
  Boot sector for a FAT16 or FAT32 volume. More...
struct   directoryEntry
  FAT short directory entry. More...

Defines

#define  BOOTSIG0   0X55
#define  BOOTSIG1   0XAA
#define  FAT16EOC_MIN   0XFFF8
#define  FAT32EOC_MIN   0X0FFFFFF8
#define  FAT16EOC   0XFFFF
#define  FAT32EOC   0X0FFFFFFF
#define  FAT32MASK   0X0FFFFFFF
#define  DIR_NAME_0XE5   0X05
#define  DIR_NAME_DELETED   0XE5
#define  DIR_NAME_FREE   0X00
#define  DIR_ATT_READ_ONLY   0X01
#define  DIR_ATT_HIDDEN   0X02
#define  DIR_ATT_SYSTEM   0X04
#define  DIR_ATT_VOLUME_ID   0X08
#define  DIR_ATT_DIRECTORY   0X10
#define  DIR_ATT_ARCHIVE   0X20
#define  DIR_ATT_LONG_NAME   0X0F
#define  DIR_ATT_LONG_NAME_MASK   0X3F
#define  DIR_ATT_DEFINED_BITS   0X3F
#define  DIR_IS_LONG_NAME(dir)   (((dir).attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME)
#define  DIR_ATT_FILE_TYPE_MASK   (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY)
#define  DIR_IS_FILE(dir)   (((dir).attributes & DIR_ATT_FILE_TYPE_MASK) == 0)
#define  DIR_IS_SUBDIR(dir)   (((dir).attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY)
#define  DIR_IS_FILE_OR_SUBDIR(dir)   (((dir).attributes & DIR_ATT_VOLUME_ID) == 0)

Typedefs

typedef struct partitionTable  part_t
typedef struct masterBootRecord  mbr_t
typedef struct biosParmBlock  bpb_t
typedef struct fat32BootSector  fbs_t
typedef struct directoryEntry  dir_t

Detailed Description

FAT file structures


Define Documentation

#define BOOTSIG0   0X55

Value for byte 510 of boot block or MBR

#define BOOTSIG1   0XAA

Value for byte 511 of boot block or MBR

#define DIR_ATT_ARCHIVE   0X20

Old DOS archive bit for backup support

#define DIR_ATT_DEFINED_BITS   0X3F

defined attribute bits

#define DIR_ATT_DIRECTORY   0X10

Entry is for a directory

#define DIR_ATT_FILE_TYPE_MASK   (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY)

Mask for file/subdirectory tests

#define DIR_ATT_HIDDEN   0X02

File should hidden in directory listings

#define DIR_ATT_LONG_NAME   0X0F

Test value for long name entry. Test is d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME.

#define DIR_ATT_LONG_NAME_MASK   0X3F

Test mask for long name entry

#define DIR_ATT_READ_ONLY   0X01

file is read-only

#define DIR_ATT_SYSTEM   0X04

Entry is for a system file

#define DIR_ATT_VOLUME_ID   0X08

Directory entry contains the volume label

#define DIR_IS_FILE ( dir   )     (((dir).attributes & DIR_ATT_FILE_TYPE_MASK) == 0)

Directory entry is for a file

#define DIR_IS_FILE_OR_SUBDIR ( dir   )     (((dir).attributes & DIR_ATT_VOLUME_ID) == 0)

Directory entry is for a file or subdirectory

#define DIR_IS_LONG_NAME ( dir   )     (((dir).attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME)

Directory entry is part of a long name

#define DIR_IS_SUBDIR ( dir   )     (((dir).attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY)

Directory entry is for a subdirectory

#define DIR_NAME_0XE5   0X05

escape for name[0] = 0XE5

#define DIR_NAME_DELETED   0XE5

name[0] value for entry that is free after being "deleted"

#define DIR_NAME_FREE   0X00

name[0] value for entry that is free and no allocated entries follow

#define FAT16EOC   0XFFFF

FAT16 end of chain value used by Microsoft.

#define FAT16EOC_MIN   0XFFF8

Minimum value for FAT16 EOC. Use to test for EOC.

#define FAT32EOC   0X0FFFFFFF

FAT32 end of chain value used by Microsoft.

#define FAT32EOC_MIN   0X0FFFFFF8

Minimum value for FAT32 EOC. Use to test for EOC.

#define FAT32MASK   0X0FFFFFFF

Mask a for FAT32 entry. Entries are 28 bits.


Typedef Documentation

typedef struct biosParmBlock bpb_t

Type name for biosParmBlock

typedef struct directoryEntry dir_t

Type name for directoryEntry

typedef struct fat32BootSector fbs_t

Type name for fat32BootSector

typedef struct masterBootRecord mbr_t

Type name for masterBootRecord

typedef struct partitionTable part_t

Type name for partitionTable


Generated on Wed Dec 23 08:22:21 2009 for SdFat by  doxygen 1.6.1