/* Read a line of string from receiving buffer.  */
unsigned char BTReadLine(char *pData)
/* Read a line of string from receiving buffer.  */
unsigned char BTReadLine(char *pData)
{
	unsigned char ucLineLen = 0;
	unsigned long ulTimeOut = TEL0026_TIMEOUT_LONG;
	while(ulTimeOut && (s_ucLinesCnt == 0))
	{
		if(--ulTimeOut == 0)
			return 0;
	}
		s_ucLinesCnt--;
	while(s_cUartRecBuffer[ucHead]!='\r')
	{
		*pData++ = s_cUartRecBuffer[ucHead++];
		if(ucHead == UART_RXD_BUFFER_SIZE)
			ucHead = 0;
		ucLineLen++;
	};
	*pData = 0;
	ucHead += 2;
	return ucLineLen;
}