ATK |
您所在的位置:网站首页 › hc05蓝牙模块实物图高清 › ATK |
/******************************************************** 函数:HC05_Reset 描述:复位蓝牙模块 参数:无 返回:无 ********************************************************/ void HC05_Reset(void) { ATSendCmd("AT+RESET\r\n"); curStat=CRESET; //当前状态设置为CRESET SetTimeOut(6); //设置定时时间为4s while(curStat!=NOCMD) //等待蓝牙模块响应 { if(tryAgain || timeOut)//重新发送命令 { printf("蓝牙模块复位失败,重试中!\r\n"); tryAgain=0; ATSendCmd("AT+RESET\r\n"); SetTimeOut(6); //重新设置定时时间为4s } } CloseTimer(); //关闭定时器 Delay_ms(1000); printf("蓝牙模块复位成功!\r\n"); } |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |