Example #1
0
/*****************************************************************************
 * Function - RunSubTask
 * DESCRIPTION:
 *
 *****************************************************************************/
void GeniAppTestMode::RunSubTask()
{
  static U32 run_counter = 0;

  run_counter++;

  if (mpTestModeEnable.IsUpdated())
  {
    EnableTestMode(true);
  }
  if (mpTestModeDisable.IsUpdated())
  {
    EnableTestMode(false);
  }

  /* Handle GENI Class 6 data received from bus*/
  if (mTestModeEnabled == true)
  {
    HandleGeniTestData();

  /* Get test status from internal tests and copy result to geni */
  #ifndef __PC__
    GetTestStatus();
  #endif
  }

  // Special handling for sw version strings since IO version may be a bit delayed (count = 100 ~~> 1 second)
  if (run_counter == 1 || run_counter == 100)
  {
    // Initialize software versions (could be in a separate class, not really test values)
    sprintf(G_ge_cpu_software_version,"%s CPU %s",HW_NAME, CpuSoftwareVersion::GetInstance()->GetValue());
    sprintf(G_ge_io_software_version,"CU 361 IO %s", IoSoftwareVersion::GetInstance()->GetValue());
    sprintf(G_ge_boot_load_software_version,"%s BOOT LOAD %s", HW_NAME, BootLoadSoftwareVersion::GetInstance()->GetValue());
  }
}
Example #2
0
void TestModeControl(void)
{
  if (ExtPower())
  {
    if (!TestModeEnabled) EnableTestMode();
  }
  else if (TestModeEnabled)
  {
    DisableTestMode();
  }  
}