/* This function returns either the unmodified CRC result or the post- processed CRC result from the EC module. The post-processing options are selectable through  */
uint32_t CRCDataProcess(uint32_t ui32Base, void *puiDataIn, uint32_t ui32DataLength, uint32_t ui32Config)
/* This function returns either the unmodified CRC result or the post- processed CRC result from the EC module. The post-processing options are selectable through  */
uint32_t CRCDataProcess(uint32_t ui32Base, void *puiDataIn, uint32_t ui32DataLength, uint32_t ui32Config)
{
    uint8_t *pui8DataIn;
    uint32_t *pui32DataIn;
    ASSERT(ui32Base == DTHE_BASE);
    if(ui32Config & DTHE_CRC_CTRL_SIZE)
    {
        pui8DataIn = (uint8_t *)puiDataIn;
        while(ui32DataLength--)
        {
            HWREG(ui32Base + DTHE_O_CRC_DIN) = *pui8DataIn++;
        }
    }
    else
    {
    	pui32DataIn = (uint32_t *)puiDataIn;
        while(ui32DataLength--)
        {
            HWREG(ui32Base + DTHE_O_CRC_DIN) = *pui32DataIn++;
        }
    }
    return(CRCResultRead(ui32Base));
}