/* Obtains the total number of segments in the linked list with firmware data.  */
uint32_t FirmwareGetSegmentCount(void)
/* Obtains the total number of segments in the linked list with firmware data.  */
uint32_t FirmwareGetSegmentCount(void)
{
  tFirmwareSegment * currentSegment;
  uint32_t segmentCount = 0;
  if (segmentList != NULL)
  {
    currentSegment = segmentList;
    do 
    {
      segmentCount++;
      currentSegment = currentSegment->next;
    }
    while (currentSegment != NULL);
  }
  return segmentCount;
}