| |
| #include <stdio.h> |
| #include <stdlib.h> |
| #include <string.h> |
| #include <lib_at/lynq_at.h> |
| |
| /** |
| * @brief callback |
| * |
| * @param input type:in |
| * @param output type:out |
| * @param out_max_size type:in |
| */ |
| void lynq_test_example(char input[], char output[], int out_max_size) |
| { |
| if(!strcmp(input, "AT+TEST1")) |
| { |
| memcpy(output, input, strlen(input)); |
| } |
| else if(!strcmp(input, "AT+TEST2")) |
| { |
| memcpy(output, input, strlen(input)); |
| } |
| else if(!strcmp(input, "AT+TEST3")) |
| { |
| memcpy(output, input, strlen(input)); |
| } |
| else if(!strcmp(input, "AT+TEST4")) |
| { |
| memcpy(output, input, strlen(input)); |
| } |
| else if(!strcmp(input, "AT+TEST5")) |
| { |
| memcpy(output, input, strlen(input)); |
| } |
| return; |
| } |
| |
| int main(void) |
| { |
| /*regis third at cmd*/ |
| char cmd[64] = "AT+TEST1;AT+TEST2;AT+TEST3;AT+TEST4;AT+TEST5"; |
| int ret = lynq_reg_third_at(cmd, lynq_test_example);//syn |
| while (1) |
| { |
| getchar(); |
| } |
| return 0; |
| } |