- /***************************************************************
- * 功 能: 串口1数据检测函数 USARE1_detection
- * 参 数: 无
- * 返回值: 无
- *
- ****************************************************************/
-
- void USARE1_detection(void)
- {
-
- if(USARTReceFullFlag)
- {
- if((USARTReceBuff[0] == 0x88))
- {
- GPIO_ResetBits(GPIOF, GPIO_Pin_10);
- GPIO_ResetBits(GPIOF, GPIO_Pin_9);
- GPIO_SetBits(GPIOF, GPIO_Pin_10 | GPIO_Pin_8);
- }else if((USARTReceBuff[0] == 0x99))
- {
- GPIO_ResetBits(GPIOF, GPIO_Pin_10 | GPIO_Pin_8);
- GPIO_SetBits(GPIOF, GPIO_Pin_9);
- }
- USARTReceFullFlag = 0; //关闭串口数据标志位
- USARTReceIn = 0; //串口接收数据变量清零
- }
- }
|