Index: yc_uart.h
===================================================================
--- /YC3121_SDK/fw/sdk/yc_uart.h	(revision 590)
+++ /YC3121_SDK/fw/sdk/yc_uart.h	(working copy)
@@ -294,4 +294,11 @@
   */
 void UART_StructInit(UART_InitTypeDef* UART_InitStruct);
 
+/**
+  * @brief  UART_ReceiveDataLen
+  * @param  UARTx: UART0 or UART1
+  * @retval Data len
+  */
+uint16_t UART_ReceiveDataLen(UART_TypeDef UARTx)
+
 #endif /*__YC_UART_H__*/
Index: yc_uart.c
===================================================================
--- /YC3121_SDK/fw/sdk/yc_uart.c	(revision 590)
+++ /YC3121_SDK/fw/sdk/yc_uart.c	(working copy)
@@ -417,3 +417,17 @@
 	UART_InitStruct->StopBits = StopBits_1;
 	UART_InitStruct->Parity = 0;
 }
+
+uint16_t UART_ReceiveDataLen(UART_TypeDef UARTx)
+{
+	_ASSERT(IS_UART(UARTx) );
+
+	if(UART0 == UARTx)
+	{
+		return (uint16_t)(UART0_STATUS>>16);
+	}
+	else
+	{
+		return (uint16_t)(UART1_STATUS>>16);
+	}
+}
