Skip to content

Commit

Permalink
Merge pull request #57 from Lawlieta/master
Browse files Browse the repository at this point in the history
【修改】AT 组件版本判断操作
  • Loading branch information
armink authored Jul 19, 2019
2 parents 1625598 + d70339d commit a4eaef3
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 64 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ AT device 软件包是对 AT 组件和 AT socket 功能的移植,需开启 AT

AT device 软件包目前已经发布多个版本,各个版本之间选项配置方式和其对应的系统版本有所不同,下面主要列出当前可使用的软件包版本信息:

- **V1.2.0**:RT-Thread 版本小于 V3.1.3,AT 组件版本等于 V1.0.0;
- **V1.3.0**:RT-Thread 版本小于 V3.1.3,AT 组件版本等于 V1.1.0;
- **V1.4.0**:RT-Thread 版本小于 V3.1.3或等于 V4.0.0, AT 组件版本等于 V1.2.0;
- **V1.5.0**: RT-Thread 版本小于 V3.1.3 或等于 V4.0.0, AT 组件版本等于 V1.2.0;
- **V1.6.0**: RT-Thread 版本等于 V3.1.3 或等于 V4.0.1, AT 组件版本等于 V1.2.0;
- **laster**: RT-Thread 版本小于大于 V4.0.1 或者大于 3.1.3, AT 组件版本大于 V1.2.0;
- **V1.2.0**适用于 RT-Thread 版本小于 V3.1.3,AT 组件版本等于 V1.0.0;
- **V1.3.0**适用于 RT-Thread 版本小于 V3.1.3,AT 组件版本等于 V1.1.0;
- **V1.4.0**适用于 RT-Thread 版本小于 V3.1.3或等于 V4.0.0, AT 组件版本等于 V1.2.0;
- **V1.5.0**:适用于 RT-Thread 版本小于 V3.1.3 或等于 V4.0.0, AT 组件版本等于 V1.2.0;
- **V1.6.0**:适用于 RT-Thread 版本等于 V3.1.3 或等于 V4.0.1, AT 组件版本等于 V1.2.0;
- **laster**:只适用于 RT-Thread 版本大于 V4.0.1 或者大于 3.1.3, AT 组件版本大于 V1.2.0;

> 上述 版本判断在 menuconfig 中自动完成,at_device 软件包选择版本时会根据当前系统环境给出最佳版本支持,这里版本介绍作为运行环境参考。
针对不同的版本号,在 ENV 中的选项配置也有所不同,主要分为如下几部分:

**V1.X.X 版本配置选项介绍**

开启 AT device 软件包,该版本只支持**同时开启一种 AT 设备**, 配置选项具体如下所示:
开启 AT device 软件包,该版本只支持**同时开启一种 AT 设备**, 配置选项具体如下所示:

RT-Thread online packages --->
IoT - internet of things --->
Expand Down
4 changes: 0 additions & 4 deletions class/ec20/at_device_ec20.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@

#include <at_device_ec20.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.dev"
#include <at_log.h>

Expand Down
4 changes: 0 additions & 4 deletions class/ec20/at_socket_ec20.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@

#include <at_device_ec20.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.skt"
#include <at_log.h>

Expand Down
4 changes: 0 additions & 4 deletions class/esp8266/at_device_esp8266.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

#include <at_device_esp8266.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.dev"

#include <at_log.h>
Expand Down
4 changes: 0 additions & 4 deletions class/esp8266/at_socket_esp8266.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

#include <at_device_esp8266.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.skt"
#include <at_log.h>

Expand Down
4 changes: 0 additions & 4 deletions class/m26/at_device_m26.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

#include <at_device_m26.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.dev"
#include <at_log.h>

Expand Down
4 changes: 0 additions & 4 deletions class/m26/at_socket_m26.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

#include <at_device_m26.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.dev"
#include <at_log.h>

Expand Down
4 changes: 0 additions & 4 deletions class/mw31/at_device_mw31.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

#include <at_device_mw31.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.dev"

#include <at_log.h>
Expand Down
4 changes: 0 additions & 4 deletions class/mw31/at_socket_mw31.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

#include <at_device_mw31.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.skt"
#include <at_log.h>

Expand Down
4 changes: 0 additions & 4 deletions class/rw007/at_device_rw007.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

#include <at_device_rw007.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.dev"

#include <at_log.h>
Expand Down
4 changes: 0 additions & 4 deletions class/rw007/at_socket_rw007.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

#include <at_device_rw007.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.skt"
#include <at_log.h>

Expand Down
4 changes: 0 additions & 4 deletions class/sim76xx/at_device_sim76xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@

#include <at_device_sim76xx.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.dev"
#include <at_log.h>

Expand Down
4 changes: 0 additions & 4 deletions class/sim76xx/at_socket_sim76xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@

#include <at_device_sim76xx.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.skt"
#include <at_log.h>

Expand Down
4 changes: 0 additions & 4 deletions class/sim800c/at_device_sim800c.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@

#include <at_device_sim800c.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.dev"
#include <at_log.h>

Expand Down
4 changes: 0 additions & 4 deletions class/sim800c/at_socket_sim800c.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

#include <at_device_sim800c.h>

#if !defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300
#error "This AT Client version is older, please check and update latest AT Client!"
#endif

#define LOG_TAG "at.skt"
#include <at_log.h>

Expand Down
3 changes: 2 additions & 1 deletion inc/at_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ extern "C" {
#include <at.h>
#include <at_socket.h>

#if !defined(RT_USING_NETDEV)
#if !defined(RT_USING_NETDEV) || (!defined(AT_SW_VERSION_NUM) || AT_SW_VERSION_NUM < 0x10300)
#error "This RT-Thread version is older, please check and updata laster RT-Thread!"
#else

#include <arpa/inet.h>
#include <netdev.h>
#endif /* RT_USING_NETDEV */
Expand Down

0 comments on commit a4eaef3

Please sign in to comment.