Index: Accel.c =================================================================== diff -u -r6c500be6ac0c5adffc0d91b666862e35ba27e2db -r409e885c34d148bf23f9d6928befa0523202f547 --- Accel.c (.../Accel.c) (revision 6c500be6ac0c5adffc0d91b666862e35ba27e2db) +++ Accel.c (.../Accel.c) (revision 409e885c34d148bf23f9d6928befa0523202f547) @@ -51,13 +51,13 @@ NUM_OF_ACCELEROMETER_STATES ///< Number of accelerometer states } ACCEL_STATE_T; -/// Enumeration of accelerometer self test states. +/// Enumeration of accelerometer self-test states. typedef enum Accelerometer_Self_Test_States { - ACCELEROMETER_SELF_TEST_STATE_START = 0, ///< Accelerometer self test start state - ACCELEROMETER_SELF_TEST_STATE_IN_PROGRESS, ///< Accelerometer self test in progress state - ACCELEROMETER_SELF_TEST_STATE_COMPLETE, ///< Accelerometer self test completed state - NUM_OF_ACCELEROMETER_SELF_TEST_STATES ///< Number of accelerometer self test states + ACCELEROMETER_SELF_TEST_STATE_START = 0, ///< Accelerometer self-test start state + ACCELEROMETER_SELF_TEST_STATE_IN_PROGRESS, ///< Accelerometer self-test in progress state + ACCELEROMETER_SELF_TEST_STATE_COMPLETE, ///< Accelerometer self-test completed state + NUM_OF_ACCELEROMETER_SELF_TEST_STATES ///< Number of accelerometer self-test states } ACCELEROMETER_SELF_TEST_STATE_T; // ********** private data ********** @@ -81,7 +81,7 @@ static F32 accelTilt[ NUM_OF_ACCEL_AXES ]; ///< Axis angles for tilt determination (filtered and converted to degrees) static U32 accelTiltErrorTimerCounter = 0; ///< used for persistence requirement on tilt error -static ACCELEROMETER_SELF_TEST_STATE_T accelSelfTestState = ACCELEROMETER_SELF_TEST_STATE_START; ///< current accelerometer self test state +static ACCELEROMETER_SELF_TEST_STATE_T accelSelfTestState = ACCELEROMETER_SELF_TEST_STATE_START; ///< current accelerometer self-test state // ********** private function prototypes ********** @@ -551,11 +551,11 @@ /*********************************************************************//** * @brief * The execAccelTest function executes the state machine for the - * accelerometer self test. + * accelerometer self-test. * @details * Inputs: accelSelfTestState, accelCalOffsets - * Outputs: accelSelfTestState, accelCalOffsets, Alarm is self test failed - * @return the current state of the accelerometer self test. + * Outputs: accelSelfTestState, accelCalOffsets, Alarm is self-test failed + * @return the current state of the accelerometer self-test. *************************************************************************/ SELF_TEST_STATUS_T execAccelTest( void ) { Index: Common.h =================================================================== diff -u -r6c500be6ac0c5adffc0d91b666862e35ba27e2db -r409e885c34d148bf23f9d6928befa0523202f547 --- Common.h (.../Common.h) (revision 6c500be6ac0c5adffc0d91b666862e35ba27e2db) +++ Common.h (.../Common.h) (revision 409e885c34d148bf23f9d6928befa0523202f547) @@ -50,13 +50,13 @@ NUM_OF_PIN_SIGNAL_STATES ///< Number of pin signal states } PIN_SIGNAL_STATE_T; -/// List of self test status. +/// List of self-test status. typedef enum Self_Test_Status { SELF_TEST_STATUS_IN_PROGRESS = 0, ///< Self test is in progress SELF_TEST_STATUS_PASSED, ///< Self test has passed SELF_TEST_STATUS_FAILED, ///< Self test has failed - NUM_OF_SELF_TEST_STATUS ///< Number of self test status + NUM_OF_SELF_TEST_STATUS ///< Number of self-test status } SELF_TEST_STATUS_T; /// List of 2-way valve states. Index: NVDataMgmt.c =================================================================== diff -u -r6c500be6ac0c5adffc0d91b666862e35ba27e2db -r409e885c34d148bf23f9d6928befa0523202f547 --- NVDataMgmt.c (.../NVDataMgmt.c) (revision 6c500be6ac0c5adffc0d91b666862e35ba27e2db) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision 409e885c34d148bf23f9d6928befa0523202f547) @@ -81,7 +81,7 @@ #define COMMAND_TIME_OUT 500U // time in ms ///< Timeout for an EEPROM or RTC command in ms -/// NVDataMgmt self test states enumeration. +/// NVDataMgmt self-test states enumeration. typedef enum NVDataMgmt_Self_Test_States { NVDATAMGMT_SELF_TEST_STATE_START = 0, ///< Self test start @@ -96,7 +96,7 @@ NVDATAMGMT_SELF_TEST_STATE_READ_LAST_DISINFECTION_DATE, ///< Self test read last disinfection date NVDATAMGMT_SELF_TEST_STATE_CHECK_CRC, ///< Self test check CRC NVDATAMGMT_SELF_TEST_STATE_COMPLETE, ///< Self test complete - NUM_OF_NVDATAMGMT_SELF_TEST_STATES ///< Total number of self test states + NUM_OF_NVDATAMGMT_SELF_TEST_STATES ///< Total number of self-test states } NVDATAMGMT_SELF_TEST_STATE_T; /// NVDataMgmt Exec states enumeration. @@ -217,9 +217,9 @@ static U08 queueRearIndex = QUEUE_START_INDEX; ///< Queue rear index static U08 queueFrontIndex = QUEUE_START_INDEX; ///< Queue front index static U08 queueCount = 0; ///< Queue count -static NVDATAMGMT_SELF_TEST_STATE_T NVDataMgmtSelfTestState = NVDATAMGMT_SELF_TEST_STATE_START; ///< NVDataMgmt self test state variable +static NVDATAMGMT_SELF_TEST_STATE_T NVDataMgmtSelfTestState = NVDATAMGMT_SELF_TEST_STATE_START; ///< NVDataMgmt self-test state variable static NVDATAMGMT_EXEC_STATE_T NVDataMgmtExecState = NVDATAMGMT_EXEC_STATE_WAIT_FOR_POST; ///< NVDataMgmt exec state variable -static SELF_TEST_STATUS_T NVDataMgmtSelfTestResult = SELF_TEST_STATUS_IN_PROGRESS; ///< NVDataMgmt self test result +static SELF_TEST_STATUS_T NVDataMgmtSelfTestResult = SELF_TEST_STATUS_IN_PROGRESS; ///< NVDataMgmt self-test result static U32 bootloaderFlag = 0; ///< Bootloader flag static BOOL hasCommandTimedout = FALSE; ///< Boolean flag for timeout of the commands static U32 currentTime = 0; ///< Current time @@ -623,11 +623,11 @@ /*********************************************************************//** * @brief - * The execNVDataMgmtSelfTest runs the NVDataMgmt POST during the self test. + * The execNVDataMgmtSelfTest runs the NVDataMgmt POST during the self-test. * @details * Inputs: NVDataMgmtSelfTestState * Outputs: NVDataMgmtSelfTestState, alarm if there was a software fault - * @return NVDataMgmtSelfTestResult the result of self test + * @return NVDataMgmtSelfTestResult the result of self-test *************************************************************************/ SELF_TEST_STATUS_T execNVDataMgmtSelfTest ( void ) { @@ -1184,7 +1184,7 @@ SET_ALARM_WITH_2_U32_DATA( ALARM_ID_NVDATA_SRVC_RECORD_CRC_ERROR, recordCRC, calcCRC ); } #endif - // There should be no failed CRCs and no command should timeout for the self test to pass + // There should be no failed CRCs and no command should timeout for the self-test to pass if ( hasCRCPassed && !hasCommandTimedout ) { NVDataMgmtSelfTestResult = SELF_TEST_STATUS_PASSED; @@ -1403,7 +1403,12 @@ /*********************************************************************//** * @brief - * The setMemoryOpsStruct fills up the job structure. + * The setMemoryOpsStruct function checks whether it is an EEPROM write, + * EEPROM read, or RTC RAM operation. For read or write data logs into EEPROM, + * it calls other functions to check for wraps and to find the next address for + * read or write. The function then checks for the length of the buffer and if + * it is greater than the specified max buffer, it breaks the operation into + * multiple jobs. * @details * Inputs: jobQueue, queueCount, queueRearIndex * Outputs: jobQueue, queueCount, queueRearIndex @@ -1739,7 +1744,7 @@ static BOOL didCommandTimeout ( ALARM_ID_T alarm, U08* state ) { /* - * NOTE: The state is a pointer so it can cover both the self test + * NOTE: The state is a pointer so it can cover both the self-test * states and exec states */ BOOL status = FALSE; Index: RTC.c =================================================================== diff -u -r6c500be6ac0c5adffc0d91b666862e35ba27e2db -r409e885c34d148bf23f9d6928befa0523202f547 --- RTC.c (.../RTC.c) (revision 6c500be6ac0c5adffc0d91b666862e35ba27e2db) +++ RTC.c (.../RTC.c) (revision 409e885c34d148bf23f9d6928befa0523202f547) @@ -120,7 +120,7 @@ #define LOCAL_TO_GTM_TIME_CONVERSION 8U ///< Local time to GTM conversion for VectorCAST #endif -/// RTC self test state enumeration. +/// RTC self-test state enumeration. typedef enum RTC_Self_Test_States { RTC_SELF_TEST_STATE_START = 0, ///< Self test start @@ -129,7 +129,7 @@ RTC_SELF_TEST_STATE_WAIT_FOR_SECOND_SECOND, ///< Self test wait for second second RTC_SELF_TEST_STATE_CHECK_ACCURACY, ///< Self test check time accuracy RTC_SELF_TEST_STATE_COMPLETE, ///< Self test complete - NUM_OF_RTC_SELF_TEST_STATES ///< Total number of self test states + NUM_OF_RTC_SELF_TEST_STATES ///< Total number of self-test states } RTC_SELF_TEST_STATE_T; /// Read date states enumeration. @@ -173,7 +173,7 @@ static RTC_SELF_TEST_STATE_T RTCSelfTestState = RTC_SELF_TEST_STATE_START; ///< Self test variable static RTC_GET_DATA_STATE_T RTCServiceState = RTC_SEND_COMMAND; ///< RTC get data variable static RTC_EXEC_STATE_T RTCExecState = RTC_EXEC_STATE_WAIT_FOR_POST; ///< RTC exec state variable -static SELF_TEST_STATUS_T RTCSelfTestResult = SELF_TEST_STATUS_IN_PROGRESS; ///< RTC self test status variable +static SELF_TEST_STATUS_T RTCSelfTestResult = SELF_TEST_STATUS_IN_PROGRESS; ///< RTC self-test status variable static RTC_RAM_STATUS_T RTCRAMStatus = RTC_RAM_STATUS_IDLE; ///< RTC RAM status variable static RTC_RAM_STATE_T RTCRAMState = RTC_RAM_STATE_READY; ///< RTC RAM state static RTC_TIMESTAMP_T RTCTimestampStruct; ///< Timestamp struct @@ -301,11 +301,11 @@ /*********************************************************************//** * @brief - * The execRTCSelfTest runs the RTC POST during the self test. + * The execRTCSelfTest runs the RTC POST during the self-test. * @details * Inputs: RTCSelfTestState * Outputs: RTCSelfTestState, alarm if invalid state was called - * @return RTCSelfTestResult the result of self test + * @return RTCSelfTestResult the result of self-test *************************************************************************/ SELF_TEST_STATUS_T execRTCSelfTest( void ) {