2.1.3.1 DIAG_EEPROM_CalculateStoreCRC()

diag_result_t DIAG_EEPROM_CalculateStoreCRC (eeprom_address_t startAddress, uint16_t length, eeprom_address_t storeAddress)

Calculates the 16-bit CRC for a given EEPROM memory region and stores it at the EEPROM address indicated by the storeAddress argument.

Parameters:
in startAddress

Starting address of the EEPROM memory region to be considered for CRC

in length

Number of bytes from startAddress to be considered for CRC

in storeAddress

The EEPROM address where calculated CRC will be stored

Returns:

DIAG_PASS - CRC for given EEPROM region is calculated and stored successfully  

DIAG_INVALID_ARG - An invalid argument is passed to the function  

DIAG_NVM_STORE_ERROR - An error occurred while storing the calculated CRC in EEPROM