3.5.2.3 DIAG_EEPROM_CalculateCRC16
Software Requirement Reference ID : SW_EEPROM_MEMORY_CHECKSUM_CRC_TEST_01. This API calculates 16-bit CRC with CCITT Direct Computation method for given EEPROM memory region. This API will be used by DIAG_EEPROM_CalculateStoreCRC16 and DIAG_EEPROM_ValidateCRC16
static diag_crc_status_t DIAG_EEPROM_CalculateCRC16(
uint16_t startAddress, uint16_t length, uint16_t * crcSeed
)
Parameters
[in] startAddress |
uint16_t
- starting address of EEPROM memory region to be considered for CRC |
[in] length |
uint16_t
- number of bytes from startAddress to be considered for CRC |
[in, out] crcSeed |
uint16_t *
- pointer to initial and final CRC |
Returns
diag_crc_status_t | CRC_OK= 0, CRC_ERROR= 1, CRC_INVALID_ADDRESS= 2, CRC_INVALID_LENGTH= 3 |