Index: NVDataMgmt.c =================================================================== diff -u -rbc8e6282b66b86f678cf2f7d9195250e3d243354 -rd85e1955124a1b15ddee1192250ca82eccb7c5e8 --- NVDataMgmt.c (.../NVDataMgmt.c) (revision bc8e6282b66b86f678cf2f7d9195250e3d243354) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision d85e1955124a1b15ddee1192250ca82eccb7c5e8) @@ -1591,6 +1591,70 @@ /*********************************************************************//** * @brief + * The testSetNVRecordCRCOverride overrides the non-volatile record CRC override. + * @details Inputs: none + * @details Outputs: none + * @param job the job to override its CRC (i.e. calibration record) + * @param crc the value its CRC to be overridden + * @return TRUE if the job was scheduled successfully otherwise, FALSE + *************************************************************************/ +BOOL testSetNVRecordCRCOverride( U32 job, U16 crc ) +{ + BOOL status = FALSE; + RECORD_JOBS_STATE_T nvJob = (RECORD_JOBS_STATE_T)job; + + switch( nvJob ) + { + case NVDATAMGMT_CALIBRATION_RECORD: +#ifdef _DG_ + dgCalibrationRecord.crc = crc; +#endif +#ifdef _HD_ + +#endif + status = enqueueSector0Records(); + break; + + case NVDATAMGMT_SYSTEM_RECORD: +#ifdef _DG_ + dgSystemGroup.crc = crc; +#endif +#ifdef _HD_ + +#endif + status = enqueueSector0Records(); + break; + + case NVDATAMGMT_SERVICE_RECORD: +#ifdef _DG_ + dgServiceGroup.crc = crc; +#endif +#ifdef _HD_ + +#endif + status = enqueueSector0Records(); + break; + + case NVDATAMGMT_USAGE_INFO_RECORD: +#ifdef _DG_ + dgUsageInfoGroup.crc = crc; +#endif +#ifdef _HD_ + +#endif + if ( getAvailableRecordQueueCount() > 0 ) + { + enqueueRecordJob( NVDATAMGMT_WRITE, RECORDS_SPECS[ NVDATAMGMT_USAGE_INFO_RECORD ].dataLoc, NVDATAMGMT_USAGE_INFO_RECORD ); + status = TRUE; + } + break; + } + + return status; +} + +/*********************************************************************//** + * @brief * The handleSelfTestReadRecords waits for the records to be read * @details Inputs: none * @details Outputs: none