Skip to content

Commit 32d452c

Browse files
authored
Merge pull request #335 from cruise2018/iot_link
Add:kconfig:add the new kconfig for the sdk
2 parents 4edaa83 + 80d438a commit 32d452c

File tree

341 files changed

+28158
-4889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

341 files changed

+28158
-4889
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SDK提供端云协同能力,集成了MQTT、LwM2M、CoAP、mbedtls、LwIP 全
99
## SDK接入云平台开发指南
1010

1111
* [SDK开发指南](./doc/Huawei_IoT_Link_SDK_Developer_Guide.md)
12+
* [SDK的Kconfig配置](./tools/kconfig/Readme.md)
1213

1314
通过SDK中的端云互通组件,可以简单快速地实现与华为 OceanConnect IoT平台安全可靠连接,可以大大减少开发周期,快速构建IoT产品。
1415

autoconf.h

Lines changed: 0 additions & 10 deletions
This file was deleted.

demos/demos.mk

Lines changed: 0 additions & 85 deletions
This file was deleted.

iot_link/at/at.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141

4242
//these defines could be reconfigured at the iot_link_config.h
4343

44+
#ifndef CONFIG_AT_DEVNAME
45+
#define CONFIG_AT_DEVNAME "atdev"
46+
#endif
47+
4448
#ifndef CONFIG_AT_OOBTABLEN
4549
#define CONFIG_AT_OOBTABLEN 6 //only allow 6 oob command monitor here,you could configure it more
4650
#endif
@@ -49,6 +53,14 @@
4953
#define CONFIG_AT_RECVMAXLEN 1024 //PROSING THAT COULD GET THE MOST REPSLENGTH
5054
#endif
5155

56+
#ifndef CONFIG_AT_TASKPRIOR
57+
#define CONFIG_AT_TASKPRIOR 10
58+
#endif
59+
60+
61+
62+
63+
5264
//at control block here
5365
typedef struct
5466
{
@@ -424,12 +436,12 @@ instruction :if you want to use the at frame work, please call this function
424436
please supply the function read and write.the read function must be
425437
a block function controlled by timeout
426438
*******************************************************************************/
427-
int at_init(const char *devname)
439+
int at_init()
428440
{
429441
int ret = -1;
430442

431443
(void) memset(&g_at_cb,0,sizeof(g_at_cb));
432-
g_at_cb.devname = devname;
444+
g_at_cb.devname = CONFIG_AT_DEVNAME;
433445

434446

435447
if(false == osal_semp_create(&g_at_cb.cmd.cmdsync,1,1))

iot_link/at/at.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ typedef int (*fn_at_oob)(void *args,void *data,size_t datalen);
4949
*
5050
* @return:0 success while -1 failed
5151
* */
52-
int at_init(const char *devname);
52+
int at_init();
5353

5454
/**
5555
* @brief:use this function to register a function that monitor the URC message

iot_link/at/kconfig_at

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#
2+
# Copyright (c) [2020] Huawei Technologies Co.,Ltd.All rights reserved.
3+
#
4+
# LiteOS NOVA is licensed under the Mulan PSL v1.
5+
# You can use this software according to the terms and conditions of the Mulan PSL v1.
6+
# You may obtain a copy of Mulan PSL v1 at:
7+
#
8+
# http://license.coscl.org.cn/MulanPSL
9+
#
10+
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER
11+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR
12+
# FIT FOR A PARTICULAR PURPOSE.
13+
# See the Mulan PSL v1 for more details.
14+
#
15+
menu "At configuration"
16+
depends on LITEOS_ENABLE || NOVAOS_ENABLE || NEW_OS
17+
18+
config AT_ENABLE
19+
bool "Enable AT framework. and we will select the driver"
20+
select DRIVER_ENABLE
21+
default y
22+
23+
if AT_ENABLE
24+
25+
config AT_DEVNAME
26+
string "The device for the at io"
27+
default "atdev"
28+
29+
config AT_OOBTABLEN
30+
int "How many oob functions could be hooked"
31+
default 6
32+
33+
config AT_RECVMAXLEN
34+
int "The maxlen could be received for the at components"
35+
default 1024
36+
37+
config AT_TASKPRIOR
38+
int "The at receive task priority"
39+
default 10
40+
endif
41+
42+
endmenu
43+
44+
45+
46+
47+
48+
49+
50+
51+
52+
53+

iot_link/cJSON/cJSON.mk

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@
66

77
ifeq ($(CONFIG_CJSON_ENABLE),y)
88

9-
CJSON_MODULE_SRC = ${wildcard $(iot_link_root)/cJSON/*.c}
10-
C_SOURCES += $(CJSON_MODULE_SRC)
11-
12-
CJSON_MODULE_INC = -I $(iot_link_root)/cJSON
13-
C_INCLUDES += $(CJSON_MODULE_INC)
14-
9+
C_SOURCES += ${wildcard $(iot_link_root)/cJSON/*.c}
10+
C_INCLUDES += -I $(iot_link_root)/cJSON
1511
C_DEFS += -D CONFIG_JSON_ENABLE=1
16-
12+
LDFLAGS += -u _printf_float
13+
1714
endif
1815

1916

0 commit comments

Comments
 (0)