|
@@ -387,7 +387,7 @@ UINT8 Uart_DataRecv_func(UINT8* Uart_Read_Msg,UINT8* Uart_Recv_Buffer)
|
|
|
*(Uart_Read_Msg+6) = CRC_chk_buffer;
|
|
|
*(Uart_Read_Msg+7) = CRC_chk_buffer>>8;
|
|
|
USARTdrv->Send(Uart_Read_Msg,8);
|
|
|
- #ifdef USING_PRINTF1
|
|
|
+ #ifdef USING_PRINTF
|
|
|
printf("Uart_Send_buffer: ");
|
|
|
for(int i=0;i<8;i++)
|
|
|
{
|
|
@@ -396,17 +396,6 @@ UINT8 Uart_DataRecv_func(UINT8* Uart_Read_Msg,UINT8* Uart_Recv_Buffer)
|
|
|
printf("\n");
|
|
|
#endif
|
|
|
USARTdrv->Receive(Uart_Recv_Buffer,Data_Len);
|
|
|
- // while((isRecvTimeout == false) && (isRecvComplete == false))
|
|
|
- // {
|
|
|
- // timeout++;
|
|
|
- // osDelay(100);
|
|
|
- // if (timeout>=50)
|
|
|
- // {
|
|
|
- // timeout =0;
|
|
|
- // isRecvTimeout = true;
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
while(true)
|
|
|
{
|
|
|
|
|
@@ -418,16 +407,13 @@ UINT8 Uart_DataRecv_func(UINT8* Uart_Read_Msg,UINT8* Uart_Recv_Buffer)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
-
|
|
|
osDelay(100);
|
|
|
if (timeout>=50)
|
|
|
{
|
|
|
timeout =0;
|
|
|
isRecvTimeout = true;
|
|
|
- //break;
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
}
|
|
|
#ifdef USING_PRINTF
|
|
|
printf("%s[%d]\r\n",__FUNCTION__, __LINE__);
|