/* Updates a FAT12 cluster chain in the FAT file table with a linear chain of the specified length. */
static void UpdateFAT12ClusterChain(uint8_t *const FATTable, const uint16_t Index, const uint8_t ChainLength)
/* Updates a FAT12 cluster chain in the FAT file table with a linear chain of the specified length. */
static void UpdateFAT12ClusterChain(uint8_t *const FATTable, const uint16_t Index, const uint8_t ChainLength)
{
	for (uint8_t i = 0; i < ChainLength; i++)
	{
		uint16_t CurrentCluster = Index + i;
		uint16_t NextCluster    = CurrentCluster + 1;
		if (i == (ChainLength - 1))
		  NextCluster = 0xFFF;
		UpdateFAT12ClusterEntry(FATTable, CurrentCluster, NextCluster);
	}
}