#include "delay.h"
#include "usart.h"
#include "led.h"
#include "adc.h"
#include "beep.h"
#include "key.h"
#include "string.h"
#include "stdbool.h"
#include "stdlib.h"
//1---接收用户通过串口发送过来的命令并存储到u变量中。
//协议:1字符代表蜂鸣器开,0字符代表蜂鸣器关
//2---采集蜂鸣器的状态并存储到变量d
//3---执行用户的命令,如果u为字符1,则控制蜂鸣器为响;否u为字符0,则不响;
//4--上传蜂鸣器的状态给用户,即将d结果输出到串口
u8 x=0,key,beep_d,led_d=4,sonser_d;
double temper,num;
char companyHead[] = "xtjc03";
char sampleAll[] = "xtjc03ff";
char res1[]="xtjc03led";
char res2[]="xtjc03beep";
char res3[]="xtjc03temp";
char res0[]="";
char* function(char var,int cmdType)
{
bool isControl=0;
temper=Get_Temprate();