Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
逆着光、寻觅
rt-thread
提交
521a5595
R
rt-thread
项目概览
逆着光、寻觅
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
521a5595
编写于
10月 12, 2018
作者:
B
Bernard Xiong
提交者:
GitHub
10月 12, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1889 from armink/fix_at
Fix at
上级
61fd1607
4e578b00
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
73 addition
and
150 deletion
+73
-150
components/net/at/Kconfig
components/net/at/Kconfig
+7
-1
components/net/at/at_socket/at_socket.c
components/net/at/at_socket/at_socket.c
+4
-20
components/net/at/at_socket/at_socket.h
components/net/at/at_socket/at_socket.h
+2
-16
components/net/at/include/at.h
components/net/at/include/at.h
+3
-33
components/net/at/include/at_log.h
components/net/at/include/at_log.h
+30
-0
components/net/at/src/at_base_cmd.c
components/net/at/src/at_base_cmd.c
+6
-16
components/net/at/src/at_cli.c
components/net/at/src/at_cli.c
+2
-16
components/net/at/src/at_client.c
components/net/at/src/at_client.c
+8
-16
components/net/at/src/at_server.c
components/net/at/src/at_server.c
+9
-16
components/net/at/src/at_utils.c
components/net/at/src/at_utils.c
+2
-16
未找到文件。
components/net/at/Kconfig
浏览文件 @
521a5595
...
...
@@ -76,7 +76,13 @@ if RT_USING_AT
default n
endif
config AT_SW_VERSION_NUM
int
default 0x10200
help
sfotware module version number
endif
endmenu
components/net/at/at_socket/at_socket.c
浏览文件 @
521a5595
/*
* File : at_socket.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
...
...
@@ -34,10 +20,8 @@
#include <dfs_poll.h>
#endif
#ifdef DBG_SECTION_NAME
#undef DBG_SECTION_NAME
#define DBG_SECTION_NAME "AT_SOC"
#endif
#define LOG_TAG "at.skt"
#include <at_log.h>
#define HTONS_PORT(x) ((((x) & 0x00ffUL) << 8) | (((x) & 0xff00UL) >> 8))
#define NIPQUAD(addr) \
...
...
components/net/at/at_socket/at_socket.h
浏览文件 @
521a5595
/*
* File : at_socket.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
...
...
components/net/at/include/at.h
浏览文件 @
521a5595
/*
* File : at.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
...
...
@@ -32,18 +18,7 @@
extern
"C"
{
#endif
#define AT_SW_VERSION "1.1.0"
#define AT_SW_VERSION_NUM 0x10100
#define DBG_ENABLE
#define DBG_SECTION_NAME "AT"
#ifdef AT_DEBUG
#define DBG_LEVEL DBG_LOG
#else
#define DBG_LEVEL DBG_INFO
#endif
/* AT_DEBUG */
#define DBG_COLOR
#include <rtdbg.h>
#define AT_SW_VERSION "1.2.0"
#define AT_CMD_NAME_LEN 16
#define AT_END_MARK_LEN 4
...
...
@@ -52,11 +27,6 @@ extern "C" {
#define AT_CMD_MAX_LEN 128
#endif
/* client receive idle timeout, client will wait this timeout when send data, unit: ms */
#ifndef AT_CLIENT_RECV_IDEL
#define AT_CLIENT_RECV_IDEL 50
#endif
/* the server AT commands new line sign */
#if defined(AT_CMD_END_MARK_CRLF)
#define AT_CMD_END_MARK "\r\n"
...
...
components/net/at/include/at_log.h
0 → 100644
浏览文件 @
521a5595
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2018-10-12 armink first version
*/
/*
* NOTE: DO NOT include this file on the header file.
*/
#define DBG_ENABLE
#define DBG_COLOR
#ifndef LOG_TAG
#define DBG_SECTION_NAME "at"
#else
#define DBG_SECTION_NAME LOG_TAG
#endif
/* LOG_TAG */
#ifdef AT_DEBUG
#define DBG_LEVEL DBG_LOG
#else
#define DBG_LEVEL DBG_INFO
#endif
/* AT_DEBUG */
#include <rtdbg.h>
components/net/at/src/at_base_cmd.c
浏览文件 @
521a5595
/*
* File : at_base_cmd.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
...
...
@@ -29,6 +15,8 @@
#include <rtdevice.h>
#ifdef AT_USING_SERVER
#define AT_ECHO_MODE_CLOSE 0
#define AT_ECHO_MODE_OPEN 1
...
...
@@ -129,3 +117,5 @@ static at_result_t at_uart_setup(const char *args)
}
AT_CMD_EXPORT
(
"AT+UART"
,
"=<baudrate>,<databits>,<stopbits>,<parity>,<flow_control>"
,
RT_NULL
,
at_uart_query
,
at_uart_setup
,
RT_NULL
);
#endif
/* AT_USING_SERVER */
components/net/at/src/at_cli.c
浏览文件 @
521a5595
/*
* File : at_cli.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
...
...
components/net/at/src/at_client.c
浏览文件 @
521a5595
/*
* File : at_client.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
...
...
@@ -29,6 +15,11 @@
#include <stdlib.h>
#include <string.h>
#define LOG_TAG "at.clnt"
#include <at_log.h>
#ifdef AT_USING_CLIENT
#define AT_RESP_END_OK "OK"
#define AT_RESP_END_ERROR "ERROR"
#define AT_RESP_END_FAIL "FAIL"
...
...
@@ -924,3 +915,4 @@ __exit:
return
result
;
}
#endif
/* AT_USING_CLIENT */
components/net/at/src/at_server.c
浏览文件 @
521a5595
/*
* File : at_server.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
...
...
@@ -30,6 +16,11 @@
#include <rthw.h>
#define LOG_TAG "at.svr"
#include <at_log.h>
#ifdef AT_USING_SERVER
#define AT_CMD_CHAR_0 '0'
#define AT_CMD_CHAR_9 '9'
#define AT_CMD_QUESTION_MARK '?'
...
...
@@ -565,3 +556,5 @@ RT_WEAK void at_port_factory_reset(void)
{
LOG_E
(
"The factory reset for AT server is not implement."
);
}
#endif
/* AT_USING_SERVER */
components/net/at/src/at_utils.c
浏览文件 @
521a5595
/*
* File : at_utils.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录