![]() |
Kinetis Bootloader
2.0.0
Common bootloader for Kinetis devices
|
32-bit CRC More...
Collaboration diagram for CRC32:Data Structures | |
| struct | crc32_data_t |
| State information for the CRC32 algorithm. More... | |
CRC32 | |
| void | crc32_init (crc32_data_t *crc32Config) |
| Initializes the parameters of the crc function, must be called first. More... | |
| void | crc32_update (crc32_data_t *crc32Config, const uint8_t *src, uint32_t lengthInBytes) |
| A "running" crc calculator that updates the crc value after each call. More... | |
| void | crc32_finalize (crc32_data_t *crc32Config, uint32_t *hash) |
| Calculates the final crc value, padding with zeros if necessary, must be called last. More... | |
32-bit CRC
| struct crc32_data_t |
| void crc32_finalize | ( | crc32_data_t * | crc32Config, |
| uint32_t * | hash | ||
| ) |
Calculates the final crc value, padding with zeros if necessary, must be called last.
| crc32Config | Instantiation of the data structure of type crc32_data_t |
| hash | Pointer to the value returned for the final calculated crc value |
| kStatus_Success |
| void crc32_init | ( | crc32_data_t * | crc32Config | ) |
Initializes the parameters of the crc function, must be called first.
| crc32Config | Instantiation of the data structure of type crc32_data_t |
| kStatus_Success |
| void crc32_update | ( | crc32_data_t * | crc32Config, |
| const uint8_t * | src, | ||
| uint32_t | lengthInBytes | ||
| ) |
A "running" crc calculator that updates the crc value after each call.
| crc32Config | Instantiation of the data structure of type crc32_data_t |
| src | Pointer to the source buffer of data |
| lengthInBytes | The length, given in bytes (not words or long-words) |
| kStatus_Success |
Note: We must init CRC module here, As we may seperate one crc calculation into several times Note: It is better to use lock to ensure the integrity of current updating operation of crc calculation