Index: NVDataMgmt.c =================================================================== diff -u -ra64884aedcc49f4d844f1a3dbba7e4bf1b2016b9 -r48b132d2864c23654ed6fb73d5beb1fa3177accc --- NVDataMgmt.c (.../NVDataMgmt.c) (revision a64884aedcc49f4d844f1a3dbba7e4bf1b2016b9) +++ NVDataMgmt.c (.../NVDataMgmt.c) (revision 48b132d2864c23654ed6fb73d5beb1fa3177accc) @@ -509,7 +509,9 @@ static MEMORY_LOG_OPS_T currentJob; ///< Current job. static LOG_RECORD_T logRecord; ///< Log record variable. static U08 queueRearIndex; ///< Queue rear index. +#ifdef ENABLE_LOCAL_LOGGING static U08 queueFrontIndex; ///< Queue front index. +#endif static U08 queueCount; ///< Queue count. static NVDATAMGMT_SELF_TEST_STATE_T nvDataMgmtSelfTestState; ///< NVDataMgmt self-test state variable. static NVDATAMGMT_EXEC_STATE_T nvDataMgmtExecState; ///< NVDataMgmt exec state variable. @@ -544,10 +546,12 @@ U32 startAddress, U08* data, READ_DATA_T* extAddress, U32 length ); static void enqueue( NVDATAMGMT_OPERATION_STATE_T ops, NVDATAMGMT_LOCATION_STATE_T location, U32 startAddress, U08* data, READ_DATA_T* extAddress, U32 length ); +#ifdef ENABLE_LOCAL_LOGGING static void dequeue( void ); +static BOOL isQueueEmpty( void ); +#endif static U32 prepareWriteLogJobAndGetStartAddress( U08* data ); static U32 prepareReadLogJobAndGetStartAddress( void ); -static BOOL isQueueEmpty( void ); static BOOL isQueueFull( void ); static U32 getAvailableQueueCount( void ); @@ -627,7 +631,9 @@ nvDataMgmtExecProcessRecordState = NVDATAMGMT_PROCESS_RECORD_STATE_IDLE; nvDataMgmtExecReceiveRecordState = NVDATAMGMT_RECEIVE_RECORD_IDLE; queueRearIndex = QUEUE_START_INDEX; +#ifdef ENABLE_LOCAL_LOGGING queueFrontIndex = QUEUE_START_INDEX; +#endif queueCount = 0; recordUpdateAddress = 0; recordQueueRearIndex = QUEUE_START_INDEX; @@ -2590,6 +2596,7 @@ } } +#ifdef ENABLE_LOCAL_LOGGING /*********************************************************************//** * @brief * The dequeue function removes a job from the job queue if it is not empty. @@ -2614,7 +2621,9 @@ } _enable_IRQ(); } +#endif +#ifdef ENABLE_LOCAL_LOGGING /*********************************************************************//** * @brief * The isQueueEmpty checks whether the queue is empty and if it is empty, @@ -2634,6 +2643,7 @@ return isEmpty; } +#endif /*********************************************************************//** * @brief @@ -3938,8 +3948,8 @@ /*********************************************************************//** * @brief * The enqueueRecordJob function enqueues a new record job. - * @details Inputs: queueFrontIndex, queueCount, recordJobQueue - * @details Outputs: queueFrontIndex, queueCount, recordJobQueue + * @details Inputs: recordQueueRearIndex, queueCount, recordJobQueue + * @details Outputs: recordQueueRearIndex, queueCount, recordJobQueue * @param ops: memory operation (i.e write, read) * @param location: memory location which are either EEPROM or RTC RAM * @param job: type of job (i.e write calibration data)