/* Get the delta value of two index in queue.  */
static uint32_t CSI_TransferGetQueueDelta(uint32_t startIdx, uint32_t endIdx)
/* Get the delta value of two index in queue.  */
static uint32_t CSI_TransferGetQueueDelta(uint32_t startIdx, uint32_t endIdx)
{
    if (endIdx >= startIdx)
    {
        return endIdx - startIdx;
    }
    else
    {
        return startIdx + CSI_DRIVER_ACTUAL_QUEUE_SIZE - endIdx;
    }
}