aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2013-03-25 21:09:55 +0000
committerDean Camera <dean@fourwalledcubicle.com>2013-03-25 21:09:55 +0000
commit3bc066cd6975dd5cc917c63631045b607a9acc3e (patch)
tree528bce3e849d9e6dd538b4f5d2bbea93092cc32b /Bootloaders
parent169f21fbb158a07ee628d86f3c20339fcf490939 (diff)
downloadlufa-3bc066cd6975dd5cc917c63631045b607a9acc3e.tar.gz
lufa-3bc066cd6975dd5cc917c63631045b607a9acc3e.tar.bz2
lufa-3bc066cd6975dd5cc917c63631045b607a9acc3e.zip
Clean up the Mass Storage bootloader virtual FAT directory entry definitions.
Diffstat (limited to 'Bootloaders')
-rw-r--r--Bootloaders/MassStorage/Lib/VirtualFAT.c11
-rw-r--r--Bootloaders/MassStorage/Lib/VirtualFAT.h22
2 files changed, 23 insertions, 10 deletions
diff --git a/Bootloaders/MassStorage/Lib/VirtualFAT.c b/Bootloaders/MassStorage/Lib/VirtualFAT.c
index c0d9786ee..5b94ed32a 100644
--- a/Bootloaders/MassStorage/Lib/VirtualFAT.c
+++ b/Bootloaders/MassStorage/Lib/VirtualFAT.c
@@ -79,16 +79,15 @@ static FATDirectoryEntry_t FirmwareFileEntries[] =
* fields are ignored. Should be the same as the label in the boot block.
*/
{
- .MSDOS =
+ .MSDOS_Directory =
{
- .Filename = "LUFA BOO",
- .Extension = "T ",
+ .Name = "LUFA BOOT ",
.Attributes = FAT_FLAG_VOLUME_NAME,
.Reserved = {0},
.CreationTime = 0,
.CreationDate = 0,
.StartingCluster = 0,
- .FileSizeBytes = 0,
+ .Reserved2 = 0,
}
},
@@ -96,7 +95,7 @@ static FATDirectoryEntry_t FirmwareFileEntries[] =
* prevent corruption of systems that are unable to detect the device
* as being a legacy MSDOS style FAT12 volume to prevent corruption. */
{
- .VFAT =
+ .VFAT_LongFileName =
{
.Ordinal = FAT_ORDINAL_LAST_ENTRY | 1,
.Attribute = FAT_FLAG_LONG_FILE_NAME,
@@ -123,7 +122,7 @@ static FATDirectoryEntry_t FirmwareFileEntries[] =
/* MSDOS file entry for the virtual Firmware image. */
{
- .MSDOS =
+ .MSDOS_File =
{
.Filename = "FIRMWARE",
.Extension = "BIN",
diff --git a/Bootloaders/MassStorage/Lib/VirtualFAT.h b/Bootloaders/MassStorage/Lib/VirtualFAT.h
index 440b65d1a..37095eae5 100644
--- a/Bootloaders/MassStorage/Lib/VirtualFAT.h
+++ b/Bootloaders/MassStorage/Lib/VirtualFAT.h
@@ -154,11 +154,12 @@
/* uint16_t MagicSignature; */
} FATBootBlock_t;
- /** FAT legacy 8.3 style directory entry structure definition, used to
- * identify the files and folders of FAT filesystem stored on a disk.
+ /** FAT directory entry structure, for the various kinds of File and
+ * directory descriptors on a FAT disk.
*/
typedef union
{
+ /** FAT Long File Name directory entry. */
struct
{
uint8_t Ordinal;
@@ -179,8 +180,9 @@
uint16_t Reserved2;
uint16_t Unicode12;
uint16_t Unicode13;
- } VFAT;
+ } VFAT_LongFileName;
+ /** FAT MSDOS 8.3 legacy file entry. */
struct
{
uint8_t Filename[8];
@@ -191,7 +193,19 @@
uint16_t CreationDate;
uint16_t StartingCluster;
uint32_t FileSizeBytes;
- } MSDOS;
+ } MSDOS_File;
+
+ /** FAT MSDOS (sub-)directory entry. */
+ struct
+ {
+ uint8_t Name[11];
+ uint8_t Attributes;
+ uint8_t Reserved[10];
+ uint16_t CreationTime;
+ uint16_t CreationDate;
+ uint16_t StartingCluster;
+ uint32_t Reserved2;
+ } MSDOS_Directory;
} FATDirectoryEntry_t;
/* Function Prototypes: */