uint16_t RxBuffer1;
char *RequestData;
int main(void)
{
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
Delay_Init();
USART_Printf_Init(115200);//初始化USART1;
USARTx_CFG();
//USART_ReceiveData(USART1);
//模块初始化,等待五秒
// printf("模块初始化");
Delay_Ms(5000);
//查询版本号
printf("ATI\r\n");
Delay_Ms(1000);
RequestData = strstr((const char *)RxBuffer1,"Fibocom");
while(RequestData == NULL)
{
printf("ATI\r\n");
Delay_Ms(1000);
RequestData = strstr((const char *)RxBuffer1,"Fibocom");
}
void USART1_IRQHandler(void)
{
GPIO_INIT();
if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
{
RxBuffer1 = USART_ReceiveData(USART1);
GPIO_ResetBits(GPIOE, GPIO_Pin_11);
}
}