Usb_msd_disk

## Data Structures

struct | sector_info_t
| Sector information. More...

## Enumerations

enum

_disk_constants {
kDiskSectorSize = 512,
kDiskTotalLogicalBlocks = 2048 * 16,
kDiskSizeInBytes = kDiskTotalLogicalBlocks * kDiskSectorSize,
kDiskLogicalUnits = 1,
kDiskHeaderSectorCount = 1,
kDiskFat16EntrySize = 2,
kDiskClusterSize = 1,
kDiskDataClusterCount = (kDiskTotalLogicalBlocks - kDiskHeaderSectorCount) / kDiskClusterSize,
kDiskSectorsPerFat,
kDiskSectorSize = 512,
kDiskTotalLogicalBlocks = 2048,
kDiskSizeInBytes = kDiskTotalLogicalBlocks * kDiskSectorSize,
kDiskLogicalUnits = 1,
kDiskHeaderSectorCount = 1,
kDiskFat16EntrySize = 2,
kDiskClusterSize = 1,
kDiskDataClusterCount = (kDiskTotalLogicalBlocks - kDiskHeaderSectorCount) / kDiskClusterSize,
kDiskSectorsPerFat
}

| Disk related constants. More...

enum

_sector_numbers {
kPbsSector = 0,
kFat1Sector = kPbsSector + 1,
kFat2Sector = kFat1Sector + kDiskSectorsPerFat,
kRootDir1Sector = kFat2Sector + kDiskSectorsPerFat,
kRootDir2Sector,
kMacFseventsdDirSector,
kWindowsSysVolInfoDirSector,
kWindowsIndexerVolumeGuidSector,
kInfoFileSector,
kStatusFileSector,
kFirstUnusedSector,
kFirstClusterSector = kRootDir1Sector,
kPbsSector = 0,
kFat1Sector = kPbsSector + 1,
kFat2Sector = kFat1Sector + kDiskSectorsPerFat,
kRootDir1Sector = kFat2Sector + kDiskSectorsPerFat,
kRootDir2Sector,
kMacFseventsdDirSector,
kWindowsSysVolInfoDirSector,
kWindowsIndexerVolumeGuidSector,
kInfoFileSector,
kStatusFileSector,
kFirstUnusedSector,
kFirstClusterSector = kRootDir1Sector
}

| Sector number constants. More...
enum | _root_dir_entry_numbers { kInfoFileDirEntry = 11, kStatusFileDirEntry = 12, kFirstUnusedDirEntry = 13, kInfoFileDirEntry = 11, kStatusFileDirEntry = 12, kFirstUnusedDirEntry = 13 }
| Root directory entry constants.

## Variables

const sector_info_t | g_msdDiskSectors []

## Usage Information

## Data Structure Documentation

struct sector_info_t

Sector information.

Information about canned sectors. The sector data does not have to completely fill the sector. Any remainder bytes will be cleared to zero in the sector read function.

Data Fields
const uint8_t * | data | Data for the sector.
uint32_t | length | Number of bytes of data.
uint32_t | sector | Sector number.

## Enumeration Type Documentation

enum _disk_constants

Disk related constants.

Enumerator
kDiskSectorSize | Size in bytes of each sector of the disk.
kDiskTotalLogicalBlocks | Total number of sectors in the disk.
kDiskSizeInBytes | Size in bytes of the total disk.
kDiskLogicalUnits | Number of SCSI LUNs.
kDiskHeaderSectorCount | PBS.
kDiskFat16EntrySize | Two bytes per FAT16 entry.
kDiskClusterSize | Number of sectors per cluster.
kDiskSectorsPerFat | Number of sectors occupied by each FAT, rounded up.
kDiskSectorSize | Size in bytes of each sector of the disk.
kDiskTotalLogicalBlocks | Total number of sectors in the disk.
kDiskSizeInBytes | Size in bytes of the total disk.
kDiskLogicalUnits | Number of SCSI LUNs.
kDiskHeaderSectorCount | PBS.
kDiskFat16EntrySize | Two bytes per FAT16 entry.
kDiskClusterSize | Number of sectors per cluster.
kDiskSectorsPerFat | Number of sectors occupied by each FAT, rounded up.

enum _sector_numbers

Sector number constants.

Enumerator
kPbsSector | Partition Boot Sector.
kFat1Sector | FAT1.
kFat2Sector | FAT2 (unused)
kRootDir1Sector | Root directory 1 (16 x 32-byte entries)
kRootDir2Sector | Root directory 2 (16 x 32-byte entries)
kMacFseventsdDirSector | Mac OS X '.fseventsd' directory.
kWindowsSysVolInfoDirSector | Windows 8.1 'System Volume Information' directory.
kWindowsIndexerVolumeGuidSector | Windows 8.1 'IndexerVolumeGuid' file.
kInfoFileSector | Info .txt file.
kStatusFileSector | Status .txt file.
kFirstUnusedSector | First sector available for data.
kFirstClusterSector | Sector number of the first cluster.
kPbsSector | Partition Boot Sector.
kFat1Sector | FAT1.
kFat2Sector | FAT2 (unused)
kRootDir1Sector | Root directory 1 (16 x 32-byte entries)
kRootDir2Sector | Root directory 2 (16 x 32-byte entries)
kMacFseventsdDirSector | Mac OS X '.fseventsd' directory.
kWindowsSysVolInfoDirSector | Windows 8.1 'System Volume Information' directory.
kWindowsIndexerVolumeGuidSector | Windows 8.1 'IndexerVolumeGuid' file.
kInfoFileSector | Info .txt file.
kStatusFileSector | Status .txt file.
kFirstUnusedSector | First sector available for data.
kFirstClusterSector | Sector number of the first cluster.