From 8d82fbc9caee949b07cc91914e715e9b4545adf6 Mon Sep 17 00:00:00 2001 From: windyyuan <2416560314@qq.com> Date: Thu, 14 Sep 2023 17:33:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86=E5=AE=9E=E9=AA=8C?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APP_Framework/Applications/app_test/Kconfig | 38 +++++++++++++++++++ APP_Framework/Applications/app_test/Makefile | 12 ++++-- .../app_test/test_lora_p2p/readme.md | 0 APP_Framework/Applications/main.c | 7 +++- 4 files changed, 51 insertions(+), 6 deletions(-) delete mode 100644 APP_Framework/Applications/app_test/test_lora_p2p/readme.md diff --git a/APP_Framework/Applications/app_test/Kconfig b/APP_Framework/Applications/app_test/Kconfig index 33b3bc740..b5d85f743 100644 --- a/APP_Framework/Applications/app_test/Kconfig +++ b/APP_Framework/Applications/app_test/Kconfig @@ -72,6 +72,44 @@ menu "test app" endif endif + menuconfig USER_TEST_LORASEND + select BSP_USING_UART + select BSP_USING_GPIO + select RESOURCES_PIN + select BSP_USING_UART2 + select BSP_USING_LORA + bool "Config test uart(loraE220_send)" + default n + if USER_TEST_LORASEND + if ADD_XIZI_FEATURES + config LORA_UART_DEV_DRIVER + string "Set uart dev path" + default "/dev/uart2_dev2" + config LORA_PIN_DEV_DRIVER + string "Set pin dev path" + default "/dev/pin_dev" + endif + endif + + menuconfig USER_TEST_LORARECEIVE + select BSP_USING_UART + select BSP_USING_GPIO + select RESOURCES_PIN + select BSP_USING_UART2 + select BSP_USING_LORA + bool "Config test uart(loraE220_receive)" + default n + if USER_TEST_LORARECEIVE + if ADD_XIZI_FEATURES + config LORA_UART_DEV_DRIVER + string "Set uart dev path" + default "/dev/uart2_dev2" + config LORA_PIN_DEV_DRIVER + string "Set pin dev path" + default "/dev/pin_dev" + endif + endif + menuconfig USER_TEST_SOCKET select BSP_USING_LWIP bool "Config test socket(lwip)" diff --git a/APP_Framework/Applications/app_test/Makefile b/APP_Framework/Applications/app_test/Makefile index 6b0c1ea96..612fbf04c 100644 --- a/APP_Framework/Applications/app_test/Makefile +++ b/APP_Framework/Applications/app_test/Makefile @@ -109,6 +109,14 @@ ifeq ($(CONFIG_ADD_XIZI_FEATURES),y) SRC_FILES += test_hash/test_hash.c endif + ifeq ($(CONFIG_USER_TEST_LORASEND),y) + SRC_FILES += test_lora_send.c + endif + + ifeq ($(CONFIG_USER_TEST_LORARECEIVE),y) + SRC_FILES += test_lora_receive.c + endif + ifeq ($(CONFIG_USER_TEST_RADIX),y) SRC_FILES += test_radix_tree/test_radix_tree.c endif @@ -137,10 +145,6 @@ ifeq ($(CONFIG_ADD_XIZI_FEATURES),y) SRC_FILES += endif - ifeq ($(CONFIG_USER_TEST_LORA_P2P),y) - SRC_FILES += - endif - ifeq ($(CONFIG_USER_TEST_LORAWAN_SINGLEGW),y) SRC_FILES += endif diff --git a/APP_Framework/Applications/app_test/test_lora_p2p/readme.md b/APP_Framework/Applications/app_test/test_lora_p2p/readme.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/APP_Framework/Applications/main.c b/APP_Framework/Applications/main.c index ae578a35c..3e8b2c2e7 100644 --- a/APP_Framework/Applications/main.c +++ b/APP_Framework/Applications/main.c @@ -12,18 +12,21 @@ #include #include -// #include +//#include #include +extern void LoraSend(); extern int FrameworkInit(); extern void ApplicationOtaTaskInit(void); int main(void) { - printf("Hello, world!"); + printf("running!"); FrameworkInit(); + LoraSend(); #ifdef APPLICATION_OTA ApplicationOtaTaskInit(); #endif + printf("+strat ok"); return 0; } // int cppmain(void);