更新readme描述

This commit is contained in:
魔罗技术 2020-07-04 21:11:24 +08:00
parent dbfcb5f2a3
commit 34f1ec0a41
3 changed files with 52 additions and 20 deletions

View File

@ -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管理器放入任务中轮询
```
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");
```

View File

@ -1,12 +1,16 @@
/*******************************************************************************
/******************************************************************************
* @brief AT (OS版本)
*
* Change Logs
* 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>

View File

@ -1,12 +1,16 @@
/*******************************************************************************
/******************************************************************************
* @brief AT (OS版本)
*
* Change Logs
* 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_