mirror of
https://gitee.com/moluo-tech/AT-Command
synced 2025-06-17 07:57:52 +00:00
更新readme描述
This commit is contained in:
parent
dbfcb5f2a3
commit
34f1ec0a41
36
README.md
36
README.md
@ -11,25 +11,49 @@ at_core.c at_core.h用于OS版本
|
||||
|
||||
##### at_chat 模块(无OS)
|
||||
|
||||
1. 定义AT管理器
|
||||
at_core_t at;
|
||||
|
||||
2. AT管理器配置参数
|
||||
const at_core_conf_t conf = {
|
||||
|
||||
```
|
||||
|
||||
static at_core_t at; //定义AT管理器
|
||||
|
||||
const at_core_conf_t conf = { //AT管理器配置参数
|
||||
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
3. 初始化AT管理器
|
||||
|
||||
```
|
||||
at_core_init(&at, &conf);
|
||||
```
|
||||
|
||||
|
||||
4. 将AT管理器放入任务中轮询
|
||||
at_poll_task(&at);
|
||||
|
||||
```
|
||||
void main(void)
|
||||
{
|
||||
/*do something ...*/
|
||||
while (1) {
|
||||
/*do something ...*/
|
||||
|
||||
at_poll_task(&at);
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
||||
5. 发送单行命令
|
||||
|
||||
|
||||
```
|
||||
static void read_csq_callback(at_response_t *r)
|
||||
{
|
||||
/*...*/
|
||||
}
|
||||
at_send_singlline(&at, read_csq_callback, "AT+CSQ");
|
||||
```
|
||||
|
||||
|
||||
|
18
at_chat.c
18
at_chat.c
@ -1,12 +1,16 @@
|
||||
/*******************************************************************************
|
||||
* @brief AT 通信管理(无OS版本)
|
||||
*
|
||||
* Change Logs
|
||||
* Date Author Notes
|
||||
/******************************************************************************
|
||||
* @brief AT 通信管理(无OS版本)
|
||||
*
|
||||
* Copyright (c) 2019, <master_roger@sina.com>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2016-01-22 Morro Initial version.
|
||||
* 2018-02-11 Morro 使用链式队列管理AT作业
|
||||
* 2020-05-21 Morro 支持多个AT管理器
|
||||
*******************************************************************************/
|
||||
* 2020-05-21 Morro 支持at_core对象
|
||||
******************************************************************************/
|
||||
|
||||
#include "at_chat.h"
|
||||
#include <stdarg.h>
|
||||
|
18
at_chat.h
18
at_chat.h
@ -1,12 +1,16 @@
|
||||
/*******************************************************************************
|
||||
* @brief AT 通信管理(无OS版本)
|
||||
*
|
||||
* Change Logs
|
||||
* Date Author Notes
|
||||
/******************************************************************************
|
||||
* @brief AT 通信管理(无OS版本)
|
||||
*
|
||||
* Copyright (c) 2019, <master_roger@sina.com>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2016-01-22 Morro Initial version.
|
||||
* 2018-02-11 Morro 使用链式队列管理AT作业
|
||||
* 2020-05-21 Morro 支持多个AT管理器
|
||||
*******************************************************************************/
|
||||
* 2020-05-21 Morro 支持at_core对象
|
||||
******************************************************************************/
|
||||
#ifndef _ATCHAT_H_
|
||||
#define _ATCHAT_H_
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user