/* Calculate the CRC16 value and start with the previously calculated CRC as initial value.  */
uint16_t CRC_CRC16_AccumulateData(uint8_t u8DataWidth, const void *pvData, uint32_t u32Len)
/* Calculate the CRC16 value and start with the previously calculated CRC as initial value.  */
uint16_t CRC_CRC16_AccumulateData(uint8_t u8DataWidth, const void *pvData, uint32_t u32Len)
{
    uint16_t u16CrcValue = 0U;
    if ((pvData != NULL) && (u32Len != 0UL)) {
        DDL_ASSERT(IS_CRC_DATA_WIDTH(u8DataWidth));
        if (CRC_DATA_WIDTH_32BIT == u8DataWidth) {
            (void)CRC_WriteData32((const uint32_t *)pvData, u32Len);
        } else if (CRC_DATA_WIDTH_16BIT == u8DataWidth) {
            (void)CRC_WriteData16((const uint16_t *)pvData, u32Len);
        } else {
            (void)CRC_WriteData8((const uint8_t *)pvData, u32Len);
        }
        u16CrcValue = (uint16_t)READ_REG16(CM_CRC->RESLT);
    }
    return u16CrcValue;
}