/* Reads or writes a block of data from/to the physical device EEPROM using a block buffer stored in RAM, if the requested block is within the virtual firmware file's sector ranges in the emulated FAT file system. */
static void ReadWriteEEPROMFileBlock(const uint16_t BlockNumber, uint8_t *BlockBuffer, const bool Read)
/* Reads or writes a block of data from/to the physical device EEPROM using a block buffer stored in RAM, if the requested block is within the virtual firmware file's sector ranges in the emulated FAT file system. */
static void ReadWriteEEPROMFileBlock(const uint16_t BlockNumber, uint8_t *BlockBuffer, const bool Read)
{
	uint16_t FileStartBlock = DISK_BLOCK_DataStartBlock + (*EEPROMFileStartCluster - 2) * SECTOR_PER_CLUSTER;
	uint16_t FileEndBlock   = FileStartBlock + (FILE_SECTORS(EEPROM_FILE_SIZE_BYTES) - 1);
	if (!((BlockNumber >= FileStartBlock) && (BlockNumber <= FileEndBlock)))
	  return;
	uint16_t EEPROMAddress = (uint16_t)(BlockNumber - FileStartBlock) * SECTOR_SIZE_BYTES;
	if (Read)
	{
		for (uint16_t i = 0; i < SECTOR_SIZE_BYTES; i++)
		  BlockBuffer[i] = ReadEEPROMByte((uint8_t*)EEPROMAddress++);
	}
	else
	{
		for (uint16_t i = 0; i < SECTOR_SIZE_BYTES; i++)
		  WriteEEPROMByte((uint8_t*)EEPROMAddress++, BlockBuffer[i]);
	}
}