Skip to content

Commit 55d30d1

Browse files
authored
Merge pull request #119 from Shuobatian/master
add n21 n58
2 parents ecc3629 + 71ca8d1 commit 55d30d1

File tree

13 files changed

+3576
-0
lines changed

13 files changed

+3576
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ AT device 软件包是由 RT-Thread AT 组件针对不同 AT 设备的移植文
2929
| class/m6315 | m6315 设备针对 AT 组件的移植目录,实现 AT Socket 功能 |
3030
| class/bc28 | bc28 设备针对 AT 组件的移植目录,实现 AT Socket 功能 |
3131
| class/ec200x | EC200T、EC200S 设备针对 AT 组件的移植目录,实现 AT Socket 功能 |
32+
| class/n21 | N21 设备针对 AT 组件的移植目录,实现 AT Socket 功能 |
33+
| class/n58 | N58 设备针对 AT 组件的移植目录,实现 AT Socket 功能 |
3234
### 1.2 许可证 ###
3335

3436
at_device package 遵循 LGPLv2.1 许可,详见 `LICENSE` 文件。
@@ -111,6 +113,8 @@ RT-Thread online packages --->
111113
[ ] ChinaMobile M6315 --->
112114
[ ] Quectel BC28 --->
113115
[ ] Quectel ec200x --->
116+
[ ] Neoway N21 --->
117+
[ ] Neoway N58 --->
114118
Version (latest) --->
115119
```
116120
@@ -142,6 +146,8 @@ RT-Thread online packages --->
142146
- **ChinaMobile M6315**:开启 M6315 (2G 模块)设备支持;
143147
- **Quectel BC28**:开启 BC28(NB-IoT 模块)设备支持;
144148
- **Quectel EC200X**:开启 EC200T、EC200S(4G 模块)设备支持;
149+
- **Neoway N21**:开启 N21(NB-IoT 模块)设备支持;
150+
- **Neoway N58**:开启 N58(4G 模块)设备支持;
145151
- **Version** 下载软件包版本;
146152
147153
上面配置选项以 2G 模块和 WIFI 模块选项为例,介绍了`V2.X.X` 版本 AT device 软件包配置方式,如下几点值得注意:

SConscript

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,24 @@ if GetDepend(['AT_DEVICE_USING_EC200X']):
147147
src += Glob('class/ec200x/at_socket_ec200x.c')
148148
if GetDepend(['AT_DEVICE_EC200X_SAMPLE']):
149149
src += Glob('samples/at_sample_ec200x.c')
150+
151+
# N21
152+
if GetDepend(['AT_DEVICE_USING_N21']):
153+
path += [cwd + '/class/n21']
154+
src += Glob('class/n21/at_device_n21.c')
155+
if GetDepend(['AT_USING_SOCKET']):
156+
src += Glob('class/n21/at_socket_n21.c')
157+
if GetDepend(['AT_DEVICE_N21_SAMPLE']):
158+
src += Glob('samples/at_sample_n21.c')
159+
160+
# N58
161+
if GetDepend(['AT_DEVICE_USING_N58']):
162+
path += [cwd + '/class/n58']
163+
src += Glob('class/n58/at_device_n58.c')
164+
if GetDepend(['AT_USING_SOCKET']):
165+
src += Glob('class/n58/at_socket_n58.c')
166+
if GetDepend(['AT_DEVICE_N58_SAMPLE']):
167+
src += Glob('samples/at_sample_n58.c')
150168

151169
group = DefineGroup('at_device', src, depend = ['PKG_USING_AT_DEVICE'], CPPPATH = path)
152170

class/n21/Kconfig

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
# N21 AT device configuration
3+
menuconfig AT_DEVICE_USING_N21
4+
bool "neoway N21"
5+
default n
6+
7+
if AT_DEVICE_USING_N21
8+
9+
config AT_DEVICE_N21_INIT_ASYN
10+
bool "Enable initialize by thread"
11+
default n
12+
13+
config AT_DEVICE_N21_SAMPLE
14+
bool "Enable sample"
15+
default y
16+
17+
if AT_DEVICE_N21_SAMPLE
18+
19+
config N21_SAMPLE_POWER_PIN
20+
int "Power pin"
21+
default -1
22+
23+
config N21_SAMPLE_STATUS_PIN
24+
int "Power status pin"
25+
default -1
26+
27+
config N21_SAMPLE_CLIENT_NAME
28+
string "AT client device name"
29+
default "uart3"
30+
31+
config N21_SAMPLE_RECV_BUFF_LEN
32+
int "The maximum length of receive line buffer"
33+
default 512
34+
35+
endif
36+
37+
endif

0 commit comments

Comments
 (0)