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