diff --git a/APP_Framework/lib/Kconfig b/APP_Framework/lib/Kconfig index c13ad7a4c..8f9b35eda 100755 --- a/APP_Framework/lib/Kconfig +++ b/APP_Framework/lib/Kconfig @@ -14,4 +14,5 @@ menu "app lib" source "$APP_DIR/lib/lvgl/Kconfig" source "$APP_DIR/lib/embedded_database/Kconfig" source "$APP_DIR/lib/lorawan/Kconfig" + source "$APP_DIR/lib/mqtt/Kconfig" endmenu diff --git a/APP_Framework/lib/Makefile b/APP_Framework/lib/Makefile index 327c69ef2..5877462e4 100644 --- a/APP_Framework/lib/Makefile +++ b/APP_Framework/lib/Makefile @@ -18,4 +18,8 @@ ifeq ($(CONFIG_LIB_USING_LORAWAN),y) SRC_DIR += lorawan endif +ifeq ($(CONFIG_TOOL_USING_MQTT),y) + SRC_DIR += mqtt +endif + include $(KERNEL_ROOT)/compiler.mk diff --git a/Ubiquitous/XiZi_IIoT/tool/mqtt/Kconfig b/APP_Framework/lib/mqtt/Kconfig similarity index 97% rename from Ubiquitous/XiZi_IIoT/tool/mqtt/Kconfig rename to APP_Framework/lib/mqtt/Kconfig index 09aa3e87e..00be02038 100644 --- a/Ubiquitous/XiZi_IIoT/tool/mqtt/Kconfig +++ b/APP_Framework/lib/mqtt/Kconfig @@ -1,4 +1,4 @@ -menu "MQTT function" +menu "lib using MQTT" menuconfig TOOL_USING_MQTT bool "Enable support MQTT function" diff --git a/Ubiquitous/XiZi_IIoT/tool/mqtt/Makefile b/APP_Framework/lib/mqtt/Makefile similarity index 100% rename from Ubiquitous/XiZi_IIoT/tool/mqtt/Makefile rename to APP_Framework/lib/mqtt/Makefile diff --git a/Ubiquitous/XiZi_IIoT/tool/mqtt/platform_mqtt.c b/APP_Framework/lib/mqtt/platform_mqtt.c similarity index 99% rename from Ubiquitous/XiZi_IIoT/tool/mqtt/platform_mqtt.c rename to APP_Framework/lib/mqtt/platform_mqtt.c index b26e2aa61..91689d280 100644 --- a/Ubiquitous/XiZi_IIoT/tool/mqtt/platform_mqtt.c +++ b/APP_Framework/lib/mqtt/platform_mqtt.c @@ -15,16 +15,14 @@ * @brief: platform_mqtt.c file * @version: 1.0 * @author: AIIT XUOS Lab -* @date: 2023/6/14 +* @date: 2023/7/27 * */ #include #include #include -#include "shell.h" -#include "xsconfig.h" -#include +#include #include "platform_mqtt.h" MQTT_TCB Platform_mqtt; //创建一个用于连接云平台mqtt的结构体 diff --git a/Ubiquitous/XiZi_IIoT/tool/mqtt/platform_mqtt.h b/APP_Framework/lib/mqtt/platform_mqtt.h similarity index 99% rename from Ubiquitous/XiZi_IIoT/tool/mqtt/platform_mqtt.h rename to APP_Framework/lib/mqtt/platform_mqtt.h index a7331ffed..92333e9b1 100644 --- a/Ubiquitous/XiZi_IIoT/tool/mqtt/platform_mqtt.h +++ b/APP_Framework/lib/mqtt/platform_mqtt.h @@ -15,7 +15,7 @@ * @brief: platform_mqtt.h file * @version: 1.0 * @author: AIIT XUOS Lab -* @date: 2023/6/14 +* @date: 2023/7/27 * */ diff --git a/Ubiquitous/XiZi_IIoT/tool/mqtt/utils_hmacsha1.c b/APP_Framework/lib/mqtt/utils_hmacsha1.c similarity index 99% rename from Ubiquitous/XiZi_IIoT/tool/mqtt/utils_hmacsha1.c rename to APP_Framework/lib/mqtt/utils_hmacsha1.c index 41b63e6e0..8ed6670ed 100644 --- a/Ubiquitous/XiZi_IIoT/tool/mqtt/utils_hmacsha1.c +++ b/APP_Framework/lib/mqtt/utils_hmacsha1.c @@ -15,7 +15,7 @@ * @brief: utils_hmacsha1.c file * @version: 1.0 * @author: AIIT XUOS Lab -* @date: 2023/6/29 +* @date: 2023/7/27 * */ diff --git a/Ubiquitous/XiZi_IIoT/tool/mqtt/utils_hmacsha1.h b/APP_Framework/lib/mqtt/utils_hmacsha1.h similarity index 98% rename from Ubiquitous/XiZi_IIoT/tool/mqtt/utils_hmacsha1.h rename to APP_Framework/lib/mqtt/utils_hmacsha1.h index da56792a4..0ddbe377b 100644 --- a/Ubiquitous/XiZi_IIoT/tool/mqtt/utils_hmacsha1.h +++ b/APP_Framework/lib/mqtt/utils_hmacsha1.h @@ -15,7 +15,7 @@ * @brief: utils_hmacsha1.h file * @version: 1.0 * @author: AIIT XUOS Lab -* @date: 2023/6/29 +* @date: 2023/7/27 * */ diff --git a/Ubiquitous/XiZi_IIoT/path_kernel.mk b/Ubiquitous/XiZi_IIoT/path_kernel.mk index e02ab827b..0fa334129 100755 --- a/Ubiquitous/XiZi_IIoT/path_kernel.mk +++ b/Ubiquitous/XiZi_IIoT/path_kernel.mk @@ -565,7 +565,7 @@ KERNELPATHS +=-I$(KERNEL_ROOT)/tool/bootloader/flash \ endif ifeq ($(CONFIG_TOOL_USING_MQTT), y) -KERNELPATHS +=-I$(KERNEL_ROOT)/tool/mqtt +KERNELPATHS +=-I$(KERNEL_ROOT)/../../APP_Framework/lib/mqtt endif ifeq ($(CONFIG_FS_LWEXT4),y) diff --git a/Ubiquitous/XiZi_IIoT/tool/Kconfig b/Ubiquitous/XiZi_IIoT/tool/Kconfig index 0c3aa9494..1989064ce 100644 --- a/Ubiquitous/XiZi_IIoT/tool/Kconfig +++ b/Ubiquitous/XiZi_IIoT/tool/Kconfig @@ -1,6 +1,5 @@ menu "Tool feature" source "$KERNEL_DIR/tool/bootloader/Kconfig" - source "$KERNEL_DIR/tool/mqtt/Kconfig" endmenu diff --git a/Ubiquitous/XiZi_IIoT/tool/Makefile b/Ubiquitous/XiZi_IIoT/tool/Makefile index e18b07080..cd148dd4f 100644 --- a/Ubiquitous/XiZi_IIoT/tool/Makefile +++ b/Ubiquitous/XiZi_IIoT/tool/Makefile @@ -8,8 +8,4 @@ ifeq ($(CONFIG_TOOL_USING_OTA),y) SRC_DIR += bootloader endif -ifeq ($(CONFIG_TOOL_USING_MQTT),y) - SRC_DIR += mqtt -endif - include $(KERNEL_ROOT)/compiler.mk