tcctrl.c
来自「基于H83664的手机模块TC35i短信收发系统 at_cmd01.c/LED」· C语言 代码 · 共 73 行
C
73 行
#include "init.h"
#include <string.h>
#define DL delay()
extern int counter, counter2;
int check(char exr[], char res2[], int ed){
int i, pl, l;
l = strlen(exr);
pl = counter2 - l - ed + 1;
for (i = 0; i < l; i++){
if (exr[i] != res2[pl + i])
break;
}
if (i >= l){
return 0;
}
else { return 1; }
}
void init_TC35i(char res2[]){
sat(res2);
se(res2);
getr(res2);
if (check("OK", res2, 2) != 0){ alarm(); }
DL;
sat(res2);
sc("+cmgf=1",res2, 0);
se(res2);
getr(res2);
if (check("OK", res2, 2) != 0){ alarm(); }
DL;
sat(res2);
sc("+cnmi=3,1,0,2", res2,0);
se(res2);
getr(res2);
if (check("OK", res2, 2) != 0){ alarm(); }
DL;
sat(res2);
sc("+cpms=\"SM\",\"SM\",\"SM\"", res2, 0);
se(res2);
getr(res2);
if (check("OK", res2, 2) != 0){ alarm(); }
DL;
sat(res2);
sc("^ssmss=1", res2, 0);
se(res2);
getr(res2);
if (check("OK", res2, 2) != 0){ alarm(); }
DL;
sat(res2);
sc("^snfs=1",res2, 0);
se(res2);
getr(res2);
if (check("OK", res2, 2) != 0){ alarm(); }
DL;
sat(res2);
sc("+clvl=3",res2, 0);
se(res2);
getr(res2);
if (check("OK", res2, 2) != 0){ alarm(); }
DL;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?