72 static uint16_t crcCalls = 0u;
74 uint32_t dataBufferLow = 0u;
75 uint32_t dataBufferHigh = 0u;
76 uint32_t remainingBytes = lengthInBytes;
77 uint32_t remainingData = 0u;
83 uint8_t *pRead = pData;
99 volatile uint64_t *pCrcRegister = (
volatile uint64 *)(&crcREG1->PSA_SIGREGL1);
107 uint8_t dataBuffer = *(pRead + i);
114 uint8_t dataBuffer = *(pRead + i);
119 *pCrcRegister = crcData;
126 if (remainingBytes > 0u) {
129 while (remainingBytes > 0u) {
130 uint8_t dataBuffer = *pRead;
136 dataBufferLow = remainingData;
139 dataBufferHigh = remainingData;
142 *pCrcRegister = crcData;
149 crcREG1->PSA_SIGREGL1 = dataBufferLow;
152 *pCrc = crcREG1->PSA_SIGREGL1;
STD_RETURN_TYPE_e CRC_CalculateCrc(uint64_t *pCrc, uint8_t *pData, uint32_t lengthInBytes)
Computes CRC of data flow.
#define CRC_DATA_CAPTURE_MODE_CLEAR_MASK
#define CRC_REGISTER_SIZE_IN_BYTES
#define CRC_BYTE_SIZE_IN_BITS
#define CRC_REVERSE_BYTES_ORDER
#define CRC_FULL_CPU_MODE_SET_MASK
#define CRC_REGISTER_SIZE_IN_BITS
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
#define NULL_PTR
Null pointer.