求大神看看问题出在哪里
void USART1_IRQHandler(void)
{
uint8_t ch_U1;
if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
{
ch_U1 = USART_ReceiveData(USART1);
if(isnRF51begin == false)
{
if(ch_U1 ==0xFF)
{
isnRF51begin = true;
RxBuffer1[RxCounter1] = ch_U1;
RxCounter1++;
}
else {return;}
}
else
{ //Delay(100);
RxBuffer1[RxCounter1] = ch_U1;
RxCounter1++;
}
if(RxCounter1 >= 8)
{
RxCounter1 = 0;
isnRF51begin=false;
rx_nRF51_flag = true;
}
else{}
}
} |