/* Add a specified length protocal header to the start of data buffer hold by specified rtk_buffer. This function extends used data area of the buffer at the buffer start.  */
uint8_t* RtbAddHead(RTK_BUFFER *RtkBuffer, uint32_t Length)
/* Add a specified length protocal header to the start of data buffer hold by specified rtk_buffer. This function extends used data area of the buffer at the buffer start.  */
uint8_t* RtbAddHead(RTK_BUFFER *RtkBuffer, uint32_t Length)
{
    if ((uint32_t)(RtkBuffer->Data - RtkBuffer->Head) >= Length)
    {
        RtkBuffer->Data -= Length;
        RtkBuffer->Length += Length;
        RtkBuffer->HeadRoom -= Length;
        return RtkBuffer->Data;
    }
    return NULL;
}