void USART1_IRQHandler(void)
{
uint16_t ch_U1;
if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
{
ch_U1 = USART_ReceiveData(USART1);
if(isRXbegin == false)
{
if(ch_U1 ==0xFF)
{
isRXbegin = true;
RxBuffer1[RxCounter1] = ch_U1;
RxCounter1++;
}
else {return;}
}
else
{
RxBuffer1[RxCounter1] = ch_U1;
RxCounter1++;
}
if(RxCounter1 >= 8)
{
RxCounter1 = 0;
isRXbegin= false;
rx_nRF51_flag = true;
}
else{}
}
}
为什么 设置的flag (isRXbegin定义为Bool变量)的值改变,会引起数组 RxBuffer1 某一位数据的改变?
求解答