This file contains prototypes for APIs to calculate, store and validate 16-bit CCITT CRC for a given EEPROM region.
Includes
- diag_memory_types.h
Functions
Table 4-20. diag_crc_status_tDIAG_EEPROM_CalculateStoreCRC16 (uint32_t startAddress, uint32_t length, uint32_t storeAddress)
Parameters |
[in] startAddress
|
uint32_t
- starting address of EEPROM memory region to be considered for CRC
|
[in] length
|
uint32_t
- number of bytes from startAddress to be considered for CRC
|
[in] storeAddress
|
uint32_t
- the EEPROM address where calculated CRC will be stored
|
|
Returns |
diag_crc_status_t
| CRC_OK,
CRC_ERROR,
CRC_INVALID_ADDRESS,
CRC_INVALID_LENGTH
|
|
Table 4-21. diag_crc_status_tDIAG_EEPROM_ValidateCRC16 (uint32_t startAddress, uint32_t length, uint32_t refAddress)
Parameters |
[in] startAddress
|
uint32_t
- starting address of EEPROM memory region to be considered for CRC
|
[in] length
|
uint32_t
- number of bytes from startAddress to be considered for CRC
|
[in] refAddress
|
uint32_t
- the EEPROM address where reference CRC is available
|
|
Returns |
diag_crc_status_t
| CRC_OK,
CRC_ERROR,
CRC_INVALID_ADDRESS,
CRC_INVALID_LENGTH
|
|