修改参数命名
This commit is contained in:
@ -40,9 +40,9 @@ unsigned short USART_RX_STA=0; //
|
||||
//}
|
||||
|
||||
u32 RX_CNT = 0;
|
||||
u8 f;
|
||||
u8 x[12];
|
||||
u8 y[12];
|
||||
u8 Y_index;
|
||||
u8 G_RX_Xerror[12];
|
||||
u8 G_RX_Yerror[12];
|
||||
void USART1_IRQHandler(void)
|
||||
{
|
||||
unsigned char res;
|
||||
@ -53,15 +53,15 @@ void USART1_IRQHandler(void)
|
||||
if(res != 0x0d)
|
||||
{
|
||||
USART_RX_BUF[RX_CNT] = res;
|
||||
if(res == 'y') f = RX_CNT;
|
||||
if(res == 'y') Y_index = Y_index;
|
||||
USART_RX_STA = 1;
|
||||
RX_CNT++;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
memcpy(x,USART_RX_BUF,f+1);
|
||||
memcpy(y,USART_RX_BUF+f+1,30-f-1);
|
||||
memcpy(G_RX_Xerror,USART_RX_BUF,Y_index+1);
|
||||
memcpy(G_RX_Yerror,USART_RX_BUF+Y_index+1,30-Y_index-1);
|
||||
memset(USART_RX_BUF,0,30);
|
||||
RX_CNT = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user