/* This function performs CRC calculation on BufferSize bytes from input data buffer aDataBuffer.  */
uint32_t Calculate_CRC(uint32_t BufferSize)
/* This function performs CRC calculation on BufferSize bytes from input data buffer aDataBuffer.  */
uint32_t Calculate_CRC(uint32_t BufferSize)
{
  register uint32_t data = 0;
  register uint32_t index = 0;
  for (index = 0; index < (BufferSize / 4); index++)
  {
    data = (uint32_t)((aDataBuffer[4 * index + 3] << 24) | (aDataBuffer[4 * index + 2] << 16) | (aDataBuffer[4 * index + 1] << 8) | aDataBuffer[4 * index]);
    LL_CRC_FeedData32(CRC, data);
  }
  return(LL_CRC_ReadData32(CRC));
}