Skip to content

Commit

Permalink
Merge pull request #335 from cruise2018/iot_link
Browse files Browse the repository at this point in the history
Add:kconfig:add the new kconfig for the sdk
  • Loading branch information
cruise2018 authored Apr 7, 2020
2 parents 4edaa83 + 80d438a commit 32d452c
Show file tree
Hide file tree
Showing 341 changed files with 28,158 additions and 4,889 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SDK提供端云协同能力,集成了MQTT、LwM2M、CoAP、mbedtls、LwIP 全
## SDK接入云平台开发指南

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

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

Expand Down
10 changes: 0 additions & 10 deletions autoconf.h

This file was deleted.

85 changes: 0 additions & 85 deletions demos/demos.mk

This file was deleted.

16 changes: 14 additions & 2 deletions iot_link/at/at.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@

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

#ifndef CONFIG_AT_DEVNAME
#define CONFIG_AT_DEVNAME "atdev"
#endif

#ifndef CONFIG_AT_OOBTABLEN
#define CONFIG_AT_OOBTABLEN 6 //only allow 6 oob command monitor here,you could configure it more
#endif
Expand All @@ -49,6 +53,14 @@
#define CONFIG_AT_RECVMAXLEN 1024 //PROSING THAT COULD GET THE MOST REPSLENGTH
#endif

#ifndef CONFIG_AT_TASKPRIOR
#define CONFIG_AT_TASKPRIOR 10
#endif





//at control block here
typedef struct
{
Expand Down Expand Up @@ -424,12 +436,12 @@ instruction :if you want to use the at frame work, please call this function
please supply the function read and write.the read function must be
a block function controlled by timeout
*******************************************************************************/
int at_init(const char *devname)
int at_init()
{
int ret = -1;

(void) memset(&g_at_cb,0,sizeof(g_at_cb));
g_at_cb.devname = devname;
g_at_cb.devname = CONFIG_AT_DEVNAME;


if(false == osal_semp_create(&g_at_cb.cmd.cmdsync,1,1))
Expand Down
2 changes: 1 addition & 1 deletion iot_link/at/at.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ typedef int (*fn_at_oob)(void *args,void *data,size_t datalen);
*
* @return:0 success while -1 failed
* */
int at_init(const char *devname);
int at_init();

/**
* @brief:use this function to register a function that monitor the URC message
Expand Down
53 changes: 53 additions & 0 deletions iot_link/at/kconfig_at
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#
# Copyright (c) [2020] Huawei Technologies Co.,Ltd.All rights reserved.
#
# LiteOS NOVA is licensed under the Mulan PSL v1.
# You can use this software according to the terms and conditions of the Mulan PSL v1.
# You may obtain a copy of Mulan PSL v1 at:
#
# http://license.coscl.org.cn/MulanPSL
#
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR
# FIT FOR A PARTICULAR PURPOSE.
# See the Mulan PSL v1 for more details.
#
menu "At configuration"
depends on LITEOS_ENABLE || NOVAOS_ENABLE || NEW_OS

config AT_ENABLE
bool "Enable AT framework. and we will select the driver"
select DRIVER_ENABLE
default y

if AT_ENABLE

config AT_DEVNAME
string "The device for the at io"
default "atdev"

config AT_OOBTABLEN
int "How many oob functions could be hooked"
default 6

config AT_RECVMAXLEN
int "The maxlen could be received for the at components"
default 1024

config AT_TASKPRIOR
int "The at receive task priority"
default 10
endif

endmenu











11 changes: 4 additions & 7 deletions iot_link/cJSON/cJSON.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@

ifeq ($(CONFIG_CJSON_ENABLE),y)

CJSON_MODULE_SRC = ${wildcard $(iot_link_root)/cJSON/*.c}
C_SOURCES += $(CJSON_MODULE_SRC)

CJSON_MODULE_INC = -I $(iot_link_root)/cJSON
C_INCLUDES += $(CJSON_MODULE_INC)

C_SOURCES += ${wildcard $(iot_link_root)/cJSON/*.c}
C_INCLUDES += -I $(iot_link_root)/cJSON
C_DEFS += -D CONFIG_JSON_ENABLE=1

LDFLAGS += -u _printf_float

endif


Loading

0 comments on commit 32d452c

Please sign in to comment.