完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
if(strstr(Uart2_Buf,"+IPD")!=NULL) //èô»o′æ×Ö·û′®ÖDo¬óD^SISR { Heartbeat=0; //Çå3yDÄìøÖ¡¼ÆêyÆ÷ Heart_beat=0; Delay_nMs(100); //UART1_SendString("êÕμ½DÂDÅÏ¢£orn"); //strncpy((char *)USART2_RX_BUF,(const char *)Uart2_Buf+12,18); //UART1_SendString(Uart2_Buf); //UART1_SendString((char *)USART2_RX_BUF); mid((char*)USART2_RX_BUF,(char*)Uart2_Buf,19,12); UART1_SendString((char *)USART2_RX_BUF); USART_SendData(USART1 ,0x0d); while(USART_GetFlagStatus(USART1, USART_FLAG_TC)==RESET); USART_SendData(USART1 ,0x0a); while(USART_GetFlagStatus(USART1, USART_FLAG_TC)==RESET); CLR_Buf2(); Heart_beat=1;//·¢Ëíó|′eêy¾Y£¬¸æËß·tÎñÆ÷êÕμ½êy¾Y } har *mid(char *dst,char *src,int n,int m) { char *p=src; char *q=dst; int len=strlen(src); if(n>len)n=len-m; if(m<0)m=0; if(m>len)return NULL; p+=m; while(n--)*(q++)=*(p++); *(q++)=' |