Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r090cfb22a7c0b4738299c3fb411ca77aaba8d968 -r4fb1e15d35f6b968bab5620909c30baec98bfd4e --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 090cfb22a7c0b4738299c3fb411ca77aaba8d968) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 4fb1e15d35f6b968bab5620909c30baec98bfd4e) @@ -43,7 +43,7 @@ #include "WatchdogMgmt.h" /** - * @addtogroup DGInitAndPOSTMode + * @addtogroup DDInitAndPOSTMode * @{ */ @@ -76,7 +76,7 @@ *************************************************************************/ void initInitAndPOSTMode( void ) { - postState = DG_POST_STATE_START; + postState = DD_POST_STATE_START; postCompleted = FALSE; postPassed = FALSE; tempPOSTPassed = TRUE; @@ -123,51 +123,51 @@ // execute current POST state switch ( postState ) { - case DG_POST_STATE_START: + case DD_POST_STATE_START: postState = handlePOSTStateStart(); #ifdef BOARD_WITH_NO_HARDWARE - postState = DG_POST_STATE_RTC; + postState = DD_POST_STATE_RTC; #endif break; - case DG_POST_STATE_FW_COMPATIBILITY: + case DD_POST_STATE_FW_COMPATIBILITY: //testStatus = execFWCompatibilityTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_FW_INTEGRITY: + case DD_POST_STATE_FW_INTEGRITY: //testStatus = execIntegrityTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_FPGA: + case DD_POST_STATE_FPGA: //testStatus = execFPGATest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_RTC: + case DD_POST_STATE_RTC: //testStatus = execRTCSelfTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_NVDATAMGMT: + case DD_POST_STATE_NVDATAMGMT: //testStatus = execNVDataMgmtSelfTest(); postState = handlePOSTStatus( testStatus ); break; // NOTE: all the actuators and sensors must execute their POST after NVDataMgmt // NVDataMgmt must load all the calibration data into RAM so the actuators // can query their corresponding calibration values successfully - case DG_POST_STATE_TEMPERATURE_SENSORS: + case DD_POST_STATE_TEMPERATURE_SENSORS: #ifndef BOARD_WITH_NO_HARDWARE //testStatus = execTemperatureSensorsSelfTest(); postState = handlePOSTStatus( testStatus ); #else - postState = DG_POST_STATE_COMPLETED; + postState = DD_POST_STATE_COMPLETED; #endif break; - case DG_POST_STATE_ACCELEROMETER: + case DD_POST_STATE_ACCELEROMETER: #ifndef _RELEASE_ //if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ACCELS ) != SW_CONFIG_ENABLE_VALUE ) #endif @@ -183,32 +183,32 @@ postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_PRESSURES: + case DD_POST_STATE_PRESSURES: //testStatus = execPressureSelfTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_DRAIN_PUMP: + case DD_POST_STATE_DRAIN_PUMP: //testStatus = execDrainPumpSelfTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_CONCENTRATE_PUMPS: + case DD_POST_STATE_CONCENTRATE_PUMPS: //testStatus = execConcenratePumpsSelfTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_CONDUCTIVITY_SENSORS: + case DD_POST_STATE_CONDUCTIVITY_SENSORS: //testStatus = execConductivitySensorsSelfTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_RESERVOIRS: + case DD_POST_STATE_RESERVOIRS: //testStatus = execReservoirsSelfTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_UV_REACTORS: + case DD_POST_STATE_UV_REACTORS: #ifndef _RELEASE_ //if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_UV_REACTORS ) != SW_CONFIG_ENABLE_VALUE ) #endif @@ -224,47 +224,47 @@ postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_THERMISTORS: + case DD_POST_STATE_THERMISTORS: //testStatus = execThermistorsSelfTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_FANS: + case DD_POST_STATE_FANS: //testStatus = execFansSelfTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_FLOW_SENSORS: + case DD_POST_STATE_FLOW_SENSORS: //testStatus = execFlowSensorsSelfTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_WATCHDOG: + case DD_POST_STATE_WATCHDOG: //testStatus = execWatchdogTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_SAFETY_SHUTDOWN: + case DD_POST_STATE_SAFETY_SHUTDOWN: //testStatus = execSafetyShutdownTest(); postState = handlePOSTStatus( testStatus ); break; // Should be last POST (and last POST test must be a test that completes in a single call) - case DG_POST_STATE_LOAD_CELL: + case DD_POST_STATE_LOAD_CELL: //testStatus = execLoadCellsSelfTest(); handlePOSTStatus( testStatus ); // Ignoring return value because last test if ( TRUE == tempPOSTPassed ) { - postState = DG_POST_STATE_COMPLETED; + postState = DD_POST_STATE_COMPLETED; } else { - postState = DG_POST_STATE_FAILED; + postState = DD_POST_STATE_FAILED; } break; - case DG_POST_STATE_COMPLETED: + case DD_POST_STATE_COMPLETED: // Set overall HD POST status to "passed" postPassed = TRUE; // Set overall HD POST completed status to TRUE @@ -277,11 +277,11 @@ requestNewOperationMode( DD_MODE_STAN ); break; - case DG_POST_STATE_FAILED: + case DD_POST_STATE_FAILED: // Should not get here - any failed post test should have already triggered a fault and taken us to fault m default: SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_MODE_INIT_POST_INVALID_POST_STATE, postState ) - postState = DG_POST_STATE_FAILED; + postState = DD_POST_STATE_FAILED; break; } @@ -290,7 +290,7 @@ /*********************************************************************//** * @brief - * The isPOSTCompleted function determines whether all DG POST have been run + * The isPOSTCompleted function determines whether all DD POST have been run * and completed. If true, call the isPOSTPassed() to see final result (pass/fail). * @details \b Inputs: postCompleted * @details \b Outputs: none @@ -352,7 +352,7 @@ *************************************************************************/ static DD_POST_STATE_T handlePOSTStateStart( void ) { - DD_POST_STATE_T state = DG_POST_STATE_START; + DD_POST_STATE_T state = DD_POST_STATE_START; // There is a delay before starting POST to make sure the CAN bus is up and listening so // when the event data can be sent @@ -363,12 +363,12 @@ systemREG1->SYSESR = systemREG1->SYSESR; // clear reset bit(s) after logging event so subsequent resets can be properly identified as not being power-on resets. // Send the startup event - SEND_EVENT_WITH_2_U32_DATA( DG_EVENT_STARTUP, systemREG1->DEV, 0x12345678 ) // log startup event w/ device ID bits - SEND_EVENT_WITH_2_U32_DATA( DG_EVENT_STARTUP, resetReason, systemREG1->GBLSTAT ) // log startup event w/ reset reason(s) bits + SEND_EVENT_WITH_2_U32_DATA( DD_EVENT_STARTUP, systemREG1->DEV, 0x12345678 ) // log startup event w/ device ID bits + SEND_EVENT_WITH_2_U32_DATA( DD_EVENT_STARTUP, resetReason, systemREG1->GBLSTAT ) // log startup event w/ reset reason(s) bits // Send the first submode change event. It is the mode Init and it does not start from a previous // mode previous and current are both published as Init - SEND_EVENT_WITH_2_U32_DATA( DG_EVENT_OP_MODE_CHANGE, DD_MODE_INIT, DD_MODE_INIT ) - state = DG_POST_STATE_FW_COMPATIBILITY; + SEND_EVENT_WITH_2_U32_DATA( DD_EVENT_OP_MODE_CHANGE, DD_MODE_INIT, DD_MODE_INIT ) + state = DD_POST_STATE_FW_COMPATIBILITY; startPOSTDelayCounter = 0; }