FAT file structures.
More...
Type name for FAT32 Boot Sector
Type name for FAT32 FSINFO Sector
Type name for FAT Boot Sector
static uint8_t DIR_IS_FILE |
( |
const dir_t * |
dir | ) |
|
|
inlinestatic |
Directory entry is for a file
- Parameters
-
[in] | dir | Pointer to a directory entry. |
- Returns
- true if the entry is for a normal file else false.
static uint8_t DIR_IS_FILE_OR_SUBDIR |
( |
const dir_t * |
dir | ) |
|
|
inlinestatic |
Directory entry is for a file or subdirectory
- Parameters
-
[in] | dir | Pointer to a directory entry. |
- Returns
- true if the entry is for a normal file or subdirectory else false.
static uint8_t DIR_IS_HIDDEN |
( |
const dir_t * |
dir | ) |
|
|
inlinestatic |
Directory entry is hidden
- Parameters
-
[in] | dir | Pointer to a directory entry. |
- Returns
- true if the entry is hidden else false.
static uint8_t DIR_IS_LONG_NAME |
( |
const dir_t * |
dir | ) |
|
|
inlinestatic |
Directory entry is part of a long name
- Parameters
-
[in] | dir | Pointer to a directory entry. |
- Returns
- true if the entry is for part of a long name else false.
static uint8_t DIR_IS_SUBDIR |
( |
const dir_t * |
dir | ) |
|
|
inlinestatic |
Directory entry is for a subdirectory
- Parameters
-
[in] | dir | Pointer to a directory entry. |
- Returns
- true if the entry is for a subdirectory else false.
static uint8_t DIR_IS_SYSTEM |
( |
const dir_t * |
dir | ) |
|
|
inlinestatic |
Directory entry is system type
- Parameters
-
[in] | dir | Pointer to a directory entry. |
- Returns
- true if the entry is system else false.
static uint16_t FAT_DATE |
( |
uint16_t |
year, |
|
|
uint8_t |
month, |
|
|
uint8_t |
day |
|
) |
| |
|
inlinestatic |
date field for FAT directory entry
- Parameters
-
[in] | year | [1980,2107] |
[in] | month | [1,12] |
[in] | day | [1,31] |
- Returns
- Packed date for dir_t entry.
static uint8_t FAT_DAY |
( |
uint16_t |
fatDate | ) |
|
|
inlinestatic |
day part of FAT directory date field
- Parameters
-
[in] | fatDate | Date in packed dir format. |
- Returns
- Extracted day [1,31]
static uint8_t FAT_HOUR |
( |
uint16_t |
fatTime | ) |
|
|
inlinestatic |
hour part of FAT directory time field
- Parameters
-
[in] | fatTime | Time in packed dir format. |
- Returns
- Extracted hour [0,23]
static uint8_t FAT_MINUTE |
( |
uint16_t |
fatTime | ) |
|
|
inlinestatic |
minute part of FAT directory time field
- Parameters
-
[in] | fatTime | Time in packed dir format. |
- Returns
- Extracted minute [0,59]
static uint8_t FAT_MONTH |
( |
uint16_t |
fatDate | ) |
|
|
inlinestatic |
month part of FAT directory date field
- Parameters
-
[in] | fatDate | Date in packed dir format. |
- Returns
- Extracted month [1,12]
static uint8_t FAT_SECOND |
( |
uint16_t |
fatTime | ) |
|
|
inlinestatic |
second part of FAT directory time field Note second/2 is stored in packed time.
- Parameters
-
[in] | fatTime | Time in packed dir format. |
- Returns
- Extracted second [0,58]
static uint16_t FAT_TIME |
( |
uint8_t |
hour, |
|
|
uint8_t |
minute, |
|
|
uint8_t |
second |
|
) |
| |
|
inlinestatic |
time field for FAT directory entry
- Parameters
-
[in] | hour | [0,23] |
[in] | minute | [0,59] |
[in] | second | [0,59] |
- Returns
- Packed time for dir_t entry.
static uint16_t FAT_YEAR |
( |
uint16_t |
fatDate | ) |
|
|
inlinestatic |
year part of FAT directory date field
- Parameters
-
[in] | fatDate | Date in packed dir format. |
- Returns
- Extracted year [1980,2107]
const uint8_t BOOTSIG0 = 0X55 |
Value for byte 510 of boot block or MBR
const uint8_t BOOTSIG1 = 0XAA |
Value for byte 511 of boot block or MBR
const uint8_t DIR_ATT_ARCHIVE = 0X20 |
Old DOS archive bit for backup support
const uint8_t DIR_ATT_DEFINED_BITS = 0X3F |
const uint8_t DIR_ATT_DIRECTORY = 0X10 |
Mask for file/subdirectory tests
const uint8_t DIR_ATT_HIDDEN = 0X02 |
File should e hidden in directory listings
const uint8_t DIR_ATT_LONG_NAME = 0X0F |
Test value for long name entry. Test is (d->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME.
const uint8_t DIR_ATT_LONG_NAME_MASK = 0X3F |
Test mask for long name entry
const uint8_t DIR_ATT_READ_ONLY = 0X01 |
const uint8_t DIR_ATT_SYSTEM = 0X04 |
Entry is for a system file
const uint8_t DIR_ATT_VOLUME_ID = 0X08 |
Directory entry contains the volume label
const uint8_t DIR_NAME_0XE5 = 0X05 |
escape for name[0] = 0XE5
const uint8_t DIR_NAME_DELETED = 0XE5 |
name[0] value for entry that is free after being "deleted"
const uint8_t DIR_NAME_FREE = 0X00 |
name[0] value for entry that is free and no allocated entries follow
const uint8_t DIR_NT_LC_BASE = 0X08 |
Filename base-name is all lower case
const uint8_t DIR_NT_LC_EXT = 0X10 |
Filename extension is all lower case.
const uint8_t EXTENDED_BOOT_SIG = 0X29 |
Value for bootSignature field int FAT/FAT32 boot sector
const uint16_t FAT12EOC = 0XFFF |
FAT12 end of chain value used by Microsoft.
const uint16_t FAT12EOC_MIN = 0XFF8 |
Minimum value for FAT12 EOC. Use to test for EOC.
const uint16_t FAT16EOC = 0XFFFF |
FAT16 end of chain value used by Microsoft.
const uint16_t FAT16EOC_MIN = 0XFFF8 |
Minimum value for FAT16 EOC. Use to test for EOC.
const uint32_t FAT32EOC = 0X0FFFFFFF |
FAT32 end of chain value used by Microsoft.
const uint32_t FAT32EOC_MIN = 0X0FFFFFF8 |
Minimum value for FAT32 EOC. Use to test for EOC.
const uint32_t FAT32MASK = 0X0FFFFFFF |
Mask a for FAT32 entry. Entries are 28 bits.
const uint16_t FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1 |
Default date for file timestamps is 1 Jan 2000
const uint16_t FAT_DEFAULT_TIME = (1 << 11) |
Default time for file timestamp is 1 am
const uint32_t FSINFO_LEAD_SIG = 0x41615252 |
Lead signature for a FSINFO sector
const uint32_t FSINFO_STRUCT_SIG = 0x61417272 |
Struct signature for a FSINFO sector
const uint8_t LDIR_NAME1_DIM = 5 |
Dimension of first name field in long directory entry
const uint8_t LDIR_NAME2_DIM = 6 |
Dimension of first name field in long directory entry
const uint8_t LDIR_NAME3_DIM = 2 |
Dimension of first name field in long directory entry
const uint8_t LDIR_ORD_LAST_LONG_ENTRY = 0X40 |
Ord mast that indicates the entry is the last long dir entry in a set of long dir entries. All valid sets of long dir entries must begin with an entry having this mask.