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;