diff --git a/.gitmodules b/.gitmodules index 59ee5c1d2..c90431278 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "Ubiquitous/Nuttx_Fusion_XiUOS/apps"] path = Ubiquitous/Nuttx_Fusion_XiUOS/apps url = https://code.gitlink.org.cn/wgzAIIT/incubator-nuttx-apps.git +[submodule "APP_Framework/Applications/webnet/WebNet_XiUOS"] + path = APP_Framework/Applications/webnet/WebNet_XiUOS + url = https://gitlink.org.cn/xuos/WebNet_XiUOS.git diff --git a/APP_Framework/Applications/Kconfig b/APP_Framework/Applications/Kconfig index 7d66db54a..eb11622e7 100644 --- a/APP_Framework/Applications/Kconfig +++ b/APP_Framework/Applications/Kconfig @@ -19,4 +19,5 @@ menu "Applications" source "$APP_DIR/Applications/knowing_app/Kconfig" source "$APP_DIR/Applications/sensor_app/Kconfig" source "$APP_DIR/Applications/embedded_database_app/Kconfig" + source "$APP_DIR/Applications/webnet/Kconfig" endmenu diff --git a/APP_Framework/Applications/webnet/Kconfig b/APP_Framework/Applications/webnet/Kconfig new file mode 100644 index 000000000..812518e11 --- /dev/null +++ b/APP_Framework/Applications/webnet/Kconfig @@ -0,0 +1,92 @@ +menuconfig APP_USING_WEBNET + bool "WebNet: A lightweight, customizable, embeddable Web Server for RT-Thread" + default n +if APP_USING_WEBNET + + config PKG_WEBNET_PATH + string + default "/packages/iot/webnet" + + config WEBNET_PORT + int "Server listen port" + default 80 + range 0 65535 + + config WEBNET_CONN_MAX + int "Maximum number of server connections" + default 16 + range 1 100 + + config WEBNET_ROOT + string "Server root directory" + default "/webnet" + + menu "Select supported modules" + + config WEBNET_USING_LOG + bool "LOG: Enable output log support" + default n + + config WEBNET_USING_AUTH + bool "AUTH: Enable basic HTTP authentication support" + default n + + config WEBNET_USING_CGI + bool "CGI: Enable Common Gateway Interface support" + default n + + config WEBNET_USING_ASP + bool "ASP: Enable Active Server Pages support" + default n + + config WEBNET_USING_SSI + bool "SSI: Enable Server Side Includes support" + default n + + config WEBNET_USING_INDEX + bool "INDEX: Enable list all the file in the directory support" + default n + + config WEBNET_USING_ALIAS + bool "ALIAS: Enable alias support" + default n + + config WEBNET_USING_DAV + bool "DAV: Enable Web-based Distributed Authoring and Versioning support" + default n + + config WEBNET_USING_UPLOAD + bool "UPLOAD: Enable upload file support" + default n + + config WEBNET_USING_GZIP + bool "GZIP: Enable compressed file support by GZIP" + default n + + config WEBNET_CACHE_LEVEL + int "CACHE: Configure cache level(0:disable 1:use Last-Modified 2:use Cache-Control)" + default 0 + range 0 2 + + if WEBNET_CACHE_LEVEL = 2 + + config WEBNET_CACHE_MAX_AGE + int "Cache-Control time in seconds" + default 1800 + + endif + + endmenu + + config WEBNET_USING_SAMPLES + bool "Enable webnet samples" + default n + select WEBNET_USING_ASP + select WEBNET_USING_AUTH + select WEBNET_USING_CGI + select WEBNET_USING_INDEX + select WEBNET_USING_ALIAS + select WEBNET_USING_SSI + select WEBNET_USING_UPLOAD +endif + diff --git a/APP_Framework/Applications/webnet/SConscript b/APP_Framework/Applications/webnet/SConscript new file mode 100644 index 000000000..f307e3f70 --- /dev/null +++ b/APP_Framework/Applications/webnet/SConscript @@ -0,0 +1,14 @@ +import os +Import('RTT_ROOT') +from building import * + +cwd = GetCurrentDir() +objs = [] +list = os.listdir(cwd) + +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(path, 'SConscript')) + +Return('objs') diff --git a/APP_Framework/Framework/connection/adapter_agent.c b/APP_Framework/Framework/connection/adapter_agent.c index f5559e0bf..af9948cd8 100755 --- a/APP_Framework/Framework/connection/adapter_agent.c +++ b/APP_Framework/Framework/connection/adapter_agent.c @@ -436,11 +436,13 @@ int DeleteATAgent(ATAgentType agent) PrivMutexDelete(&agent->lock); } #endif - +#ifdef ADD_XIZI_FETURES if (agent->entm_rx_notice) { printf("delete agent entm_rx_notice = %d\n",agent->entm_rx_notice); PrivSemaphoreDelete(&agent->entm_rx_notice); } +#else +#endif #ifdef ADD_XIZI_FETURES if (agent->rsp_sem) { printf("delete agent rsp_sem = %d\n",agent->rsp_sem); diff --git a/APP_Framework/Framework/connection/at_agent.h b/APP_Framework/Framework/connection/at_agent.h index 4ac0b4099..42d589a0c 100755 --- a/APP_Framework/Framework/connection/at_agent.h +++ b/APP_Framework/Framework/connection/at_agent.h @@ -74,7 +74,11 @@ struct ATAgent char entm_recv_buf[ENTM_RECV_MAX]; uint32 entm_recv_len; enum ReceiveMode receive_mode; +#ifdef ADD_XIZI_FETURES int entm_rx_notice; +#else + sem_t entm_rx_notice; +#endif }; typedef struct ATAgent *ATAgentType; diff --git a/APP_Framework/Framework/connection/bluetooth/SConscript b/APP_Framework/Framework/connection/bluetooth/SConscript index 3fecfb61c..4a341d50a 100644 --- a/APP_Framework/Framework/connection/bluetooth/SConscript +++ b/APP_Framework/Framework/connection/bluetooth/SConscript @@ -2,7 +2,8 @@ import os Import('RTT_ROOT') from building import * SOURCES = [] -SOURCES = ['adapter_bluetooth.c'] + SOURCES +if GetDepend(['CONNECTION_ADAPTER_BLUETOOTH']): + SOURCES = ['adapter_bluetooth.c'] + SOURCES objs = [] cwd = GetCurrentDir() path = [cwd] diff --git a/APP_Framework/Framework/connection/ethernet/SConscript b/APP_Framework/Framework/connection/ethernet/SConscript new file mode 100644 index 000000000..872676e5c --- /dev/null +++ b/APP_Framework/Framework/connection/ethernet/SConscript @@ -0,0 +1,19 @@ +import os +Import('RTT_ROOT') +from building import * +SOURCES = [] +if GetDepend(['CONNECTION_ADAPTER_ETHERNET']): + SOURCES = ['adapter_ethernet.c'] + SOURCES +objs = [] +cwd = GetCurrentDir() +path = [cwd] +group = DefineGroup('ethernet', SOURCES, depend = [], CPPPATH = [cwd]) +objs = objs + group +list = os.listdir(cwd) + +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(path, 'SConscript')) + +Return('objs') \ No newline at end of file diff --git a/APP_Framework/Framework/connection/ethernet/adapter_ethernet.c b/APP_Framework/Framework/connection/ethernet/adapter_ethernet.c index 239472e38..d687d0268 100644 --- a/APP_Framework/Framework/connection/ethernet/adapter_ethernet.c +++ b/APP_Framework/Framework/connection/ethernet/adapter_ethernet.c @@ -97,28 +97,33 @@ int AdapterEthernetTest(void) AdapterDeviceSetUp(adapter); - const char *ip = "10.10.100.50"; - const char *port = "12345"; + const char *ip = "192.168.131.26"; + const char *port = "9999"; enum NetRoleType net_role = CLIENT;//SERVER enum IpType ip_type = IPV4; AdapterDeviceConnect(adapter, net_role, ip, port, ip_type); printf("ready to test data transfer\n"); - + PrivTaskDelay(2000); len = strlen(ethernet_msg); for (i = 0;i < 10; i ++) { printf("AdapterEthernetTest send %s\n", ethernet_msg); AdapterDeviceSend(adapter, ethernet_msg, len); PrivTaskDelay(4000); } - + while (1) { AdapterDeviceRecv(adapter, ethernet_recv_msg, 128); printf("AdapterEthernetTest recv %s\n", ethernet_recv_msg); memset(ethernet_recv_msg, 0, 128); } + #endif return 0; } +#ifdef ADD_RTTHREAD_FETURES +MSH_CMD_EXPORT(AdapterEthernetTest,a ethernet adpter sample); +#elif definded ADD_XIZI_FETURES SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0)|SHELL_CMD_DISABLE_RETURN, AdapterEthernetTest, AdapterEthernetTest, show adapter ethernet information); +#endif diff --git a/APP_Framework/Framework/connection/ethernet/hfa21_ethernet/Kconfig b/APP_Framework/Framework/connection/ethernet/hfa21_ethernet/Kconfig index 2efc7a0b2..808272cfa 100644 --- a/APP_Framework/Framework/connection/ethernet/hfa21_ethernet/Kconfig +++ b/APP_Framework/Framework/connection/ethernet/hfa21_ethernet/Kconfig @@ -29,5 +29,7 @@ if ADD_NUTTX_FETURES endif if ADD_RTTHREAD_FETURES - + config ADAPTER_HFA21_DRIVER + string "HFA21 device uart driver path" + default "/dev/uart3" endif diff --git a/APP_Framework/Framework/connection/ethernet/hfa21_ethernet/SConscript b/APP_Framework/Framework/connection/ethernet/hfa21_ethernet/SConscript new file mode 100644 index 000000000..e388a22d4 --- /dev/null +++ b/APP_Framework/Framework/connection/ethernet/hfa21_ethernet/SConscript @@ -0,0 +1,10 @@ +from building import * +import os + +cwd = GetCurrentDir() +src = [] +if GetDepend(['ADAPTER_HFA21_ETHERNET']): + src += ['hfa21_ethernet.c'] +group = DefineGroup('connection ethernet hfa21', src, depend = [], CPPPATH = [cwd]) + +Return('group') \ No newline at end of file diff --git a/APP_Framework/Framework/connection/ethernet/hfa21_ethernet/hfa21_ethernet.c b/APP_Framework/Framework/connection/ethernet/hfa21_ethernet/hfa21_ethernet.c index 07bc3330a..ada295ecc 100644 --- a/APP_Framework/Framework/connection/ethernet/hfa21_ethernet/hfa21_ethernet.c +++ b/APP_Framework/Framework/connection/ethernet/hfa21_ethernet/hfa21_ethernet.c @@ -72,7 +72,7 @@ static int Hfa21EthernetOpen(struct Adapter *adapter) /*step2: init AT agent*/ if (!adapter->agent) { char *agent_name = "ethernet_uart_client"; - if (EOK != InitATAgent(agent_name, adapter->fd, 512)) { + if (0 != InitATAgent(agent_name, adapter->fd, 512)) { printf("at agent init failed !\n"); return -1; } @@ -168,19 +168,20 @@ static int Hfa21EthernetSetUp(struct Adapter *adapter) Hfa21EthernetInitAtCmd(adapter->agent); - /*Step3 : FEPHY enable phy function*/ + /*Step3 : FEPHY enable phy function*/ ret = AtCmdConfigAndCheck(adapter->agent, HFA21_ETHERNET_AT_FEPHY_CMD, HFA21_ETHERNET_OK_REPLY); if (ret < 0) { goto __exit; } + PrivTaskDelay(2000); /*Step4 : FVEW disable WANN function, ethernet work at LANN mode*/ ret = AtCmdConfigAndCheck(adapter->agent, HFA21_ETHERNET_AT_DISABLE_WANN_CMD, HFA21_ETHERNET_OK_REPLY); if (ret < 0) { goto __exit; } - /*Step5 : RELD enable F-AT cmd*/ + PrivTaskDelay(2000); ret = AtCmdConfigAndCheck(adapter->agent, HFA21_ETHERNET_AT_RELD_CMD, HFA21_ETHERNET_OK_REPLY); if (ret < 0) { goto __exit; @@ -195,13 +196,13 @@ static int Hfa21EthernetSetUp(struct Adapter *adapter) if (ret < 0) { goto __exit; } - + PrivTaskDelay(2000); /*Step7 : AT+WANN check if get ip、netmask、gateway*/ ret = AtCmdConfigAndCheck(adapter->agent, HFA21_ETHERNET_AT_WANN_CMD, HFA21_ETHERNET_OK_REPLY); if (ret < 0) { goto __exit; } - + PrivTaskDelay(2000); /*Step8 : AT+Z reboot hfa21 device*/ ret = AtCmdConfigAndCheck(adapter->agent, HFA21_ETHERNET_AT_REBOOT_CMD, HFA21_ETHERNET_OK_REPLY); if (ret < 0) { @@ -209,7 +210,6 @@ static int Hfa21EthernetSetUp(struct Adapter *adapter) } PrivTaskDelay(10000); - return ret; __exit: @@ -365,6 +365,7 @@ static int Hfa21EthernetConnect(struct Adapter *adapter, enum NetRoleType net_ro } adapter->net_role = net_role; + PrivTaskDelay(2000); /*Step3 : AT+Z reboot hfa21 device*/ ret = AtCmdConfigAndCheck(adapter->agent, HFA21_ETHERNET_AT_REBOOT_CMD, HFA21_ETHERNET_OK_REPLY); diff --git a/APP_Framework/Framework/connection/nbiot/SConscript b/APP_Framework/Framework/connection/nbiot/SConscript new file mode 100644 index 000000000..457bee16c --- /dev/null +++ b/APP_Framework/Framework/connection/nbiot/SConscript @@ -0,0 +1,19 @@ +import os +Import('RTT_ROOT') +from building import * +SOURCES = [] +if GetDepend(['CONNECTION_ADAPTER_NB']): + SOURCES = ['adapter_nbiot.c'] + SOURCES +objs = [] +cwd = GetCurrentDir() +path = [cwd] +group = DefineGroup('nb', SOURCES, depend = [], CPPPATH = [cwd]) +objs = objs + group +list = os.listdir(cwd) + +for d in list: + path = os.path.join(cwd, d) + if os.path.isfile(os.path.join(path, 'SConscript')): + objs = objs + SConscript(os.path.join(path, 'SConscript')) + +Return('objs') \ No newline at end of file diff --git a/APP_Framework/Framework/connection/nbiot/adapter_nbiot.c b/APP_Framework/Framework/connection/nbiot/adapter_nbiot.c index 873ff6d1f..952aab005 100644 --- a/APP_Framework/Framework/connection/nbiot/adapter_nbiot.c +++ b/APP_Framework/Framework/connection/nbiot/adapter_nbiot.c @@ -25,6 +25,8 @@ extern AdapterProductInfoType BC28Attach(struct Adapter *adapter); #endif +#define ADAPTER_NBIOT_NAME "nbiot" + static int AdapterNbiotRegister(struct Adapter *adapter) { int ret = 0; @@ -95,7 +97,13 @@ int opennb(void) return 0; } -// SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0)|SHELL_CMD_DISABLE_RETURN, opennb, opennb, show adapter nb information); +#ifdef ADD_RTTHREAD_FETURES +MSH_CMD_EXPORT(opennb,open nb sample); +#endif +#ifdef ADD_XIZI_FETURES +SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0)|SHELL_CMD_DISABLE_RETURN, opennb, opennb, show adapter nb information); +#endif + int closenb(void) { int ret = 0; @@ -113,8 +121,13 @@ int closenb(void) return 0; } -// SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0)|SHELL_CMD_DISABLE_RETURN, closenb, closenb, show adapter nb information); - +#ifdef ADD_RTTHREAD_FETURES +MSH_CMD_EXPORT(closenb,close nb sample); +#endif +#ifdef ADD_XIZI_FETURES +SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0)|SHELL_CMD_DISABLE_RETURN, closenb, closenb, show adapter nb information); +#endif + int connectnb(int argc, char *argv[]) { const char *send_msg = argv[1]; @@ -133,7 +146,12 @@ int closenb(void) return 0; } -// SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN)|SHELL_CMD_PARAM_NUM(2)|SHELL_CMD_DISABLE_RETURN, connectnb, connectnb, show adapter nb information); +#ifdef ADD_RTTHREAD_FETURES +MSH_CMD_EXPORT(connectnb,connect nb test); +#endif +#ifdef ADD_XIZI_FETURES +SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN)|SHELL_CMD_PARAM_NUM(2)|SHELL_CMD_DISABLE_RETURN, connectnb, connectnb, show adapter nb information); +#endif int sendnb(int argc, char *argv[]) { @@ -154,7 +172,12 @@ int closenb(void) return 0; } -// SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN)|SHELL_CMD_PARAM_NUM(2)|SHELL_CMD_DISABLE_RETURN, sendnb, sendnb, show adapter nb information); +#ifdef ADD_RTTHREAD_FETURES +MSH_CMD_EXPORT(sendnb,send nb test); +#endif +#ifdef ADD_XIZI_FETURES +SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN)|SHELL_CMD_PARAM_NUM(2)|SHELL_CMD_DISABLE_RETURN, sendnb, sendnb, show adapter nb information); +#endif int recvnb(void) { @@ -167,5 +190,9 @@ int closenb(void) return 0; } -// SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0)|SHELL_CMD_DISABLE_RETURN, recvnb, recvnb, show adapter nb information); - +#ifdef ADD_RTTHREAD_FETURES +MSH_CMD_EXPORT(recvnb,receive nb test); +#endif +#ifdef ADD_XIZI_FETURES +SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_PARAM_NUM(0)|SHELL_CMD_DISABLE_RETURN, recvnb, recvnb, show adapter nb information); +#endif diff --git a/APP_Framework/Framework/connection/nbiot/bc28/Kconfig b/APP_Framework/Framework/connection/nbiot/bc28/Kconfig index ae773a1d8..dcb7e3d5c 100644 --- a/APP_Framework/Framework/connection/nbiot/bc28/Kconfig +++ b/APP_Framework/Framework/connection/nbiot/bc28/Kconfig @@ -36,5 +36,13 @@ if ADD_NUTTX_FETURES endif if ADD_RTTHREAD_FETURES - + config ADAPTER_BC28_DRIVER + string "BC28 device uart driver path" + default "/dev/uart2" + config ADAPTER_BC28_PIN_DRIVER + string "BC28 device pin driver path" + default "/dev/pin" + config ADAPTER_BC28_RESETPIN + string "BC28 RESET pin number" + default "100" endif diff --git a/APP_Framework/Framework/connection/nbiot/bc28/SConscript b/APP_Framework/Framework/connection/nbiot/bc28/SConscript new file mode 100644 index 000000000..f657dc41a --- /dev/null +++ b/APP_Framework/Framework/connection/nbiot/bc28/SConscript @@ -0,0 +1,10 @@ +from building import * +import os + +cwd = GetCurrentDir() +src = [] +if GetDepend(['ADAPTER_BC28']): + src += ['bc28.c'] +group = DefineGroup('connection nb bc28', src, depend = [], CPPPATH = [cwd]) + +Return('group') \ No newline at end of file diff --git a/APP_Framework/Framework/connection/nbiot/bc28/bc28.c b/APP_Framework/Framework/connection/nbiot/bc28/bc28.c index e9c83ac34..e290172ba 100644 --- a/APP_Framework/Framework/connection/nbiot/bc28/bc28.c +++ b/APP_Framework/Framework/connection/nbiot/bc28/bc28.c @@ -490,7 +490,7 @@ static int BC28Open(struct Adapter *adapter) /*step2: init AT agent*/ if (!adapter->agent) { char *agent_name = "niot_device"; - if (EOK != InitATAgent(agent_name, adapter->fd, 512)) { + if (0 != InitATAgent(agent_name, adapter->fd, 512)) { PrivClose(adapter->fd); PrivMutexDelete(&nbiot_lock); printf("at agent init failed !\n"); diff --git a/APP_Framework/Framework/connection/wifi/SConscript b/APP_Framework/Framework/connection/wifi/SConscript index 49378ad9f..7eb5f670e 100644 --- a/APP_Framework/Framework/connection/wifi/SConscript +++ b/APP_Framework/Framework/connection/wifi/SConscript @@ -2,7 +2,8 @@ import os Import('RTT_ROOT') from building import * SOURCES = [] -SOURCES = ['adapter_wifi.c'] + SOURCES +if GetDepend(['CONNECTION_ADAPTER_WIFI']): + SOURCES = ['adapter_wifi.c'] + SOURCES objs = [] cwd = GetCurrentDir() path = [cwd] diff --git a/APP_Framework/Framework/transform_layer/rtthread/transform.c b/APP_Framework/Framework/transform_layer/rtthread/transform.c index e792184ac..661babf8f 100644 --- a/APP_Framework/Framework/transform_layer/rtthread/transform.c +++ b/APP_Framework/Framework/transform_layer/rtthread/transform.c @@ -195,3 +195,12 @@ void PrivFree(void *pointer) free(pointer); } +/*********************kernel**********************/ +void PrivTaskenterCritical() +{ + rt_enter_critical(); +} +void PrivTaskexitCritical() +{ + rt_exit_critical(); +} diff --git a/APP_Framework/Framework/transform_layer/rtthread/transform.h b/APP_Framework/Framework/transform_layer/rtthread/transform.h index 1210976dc..786302911 100644 --- a/APP_Framework/Framework/transform_layer/rtthread/transform.h +++ b/APP_Framework/Framework/transform_layer/rtthread/transform.h @@ -38,6 +38,7 @@ #include #include #include +#include #ifdef RT_USING_POSIX_TERMIOS #include #endif @@ -60,7 +61,7 @@ #ifdef __cplusplus extern "C" { #endif - +typedef signed char bool; typedef signed char int8; typedef signed short int16; typedef signed int int32; @@ -77,7 +78,7 @@ typedef unsigned long long uint64; #endif #define OPE_INT 0x0000 -#define OPE_CFG 0x0001 +#define OPE_CFG 0x0001 #define NAME_NUM_MAX 32 @@ -96,6 +97,9 @@ typedef unsigned long long uint64; #define SERIAL_RB_BUFSZ 128 #endif +#define TRUE (1) +#define FALSE (0) + struct PinDevIrq { int irq_mode;//< RISING/FALLING/HIGH/LOW @@ -197,6 +201,13 @@ void *PrivCalloc(size_t count, size_t size); void PrivFree(void *pointer); + +/*********************kernel**********************/ +void PrivTaskenterCritical(); +void PrivTaskexitCritical(); + + + #ifdef __cplusplus } #endif diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/aiit-arm32-board/.config b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/aiit-arm32-board/.config index a6863efd4..aa01305c9 100644 --- a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/aiit-arm32-board/.config +++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/aiit-arm32-board/.config @@ -25,14 +25,12 @@ CONFIG_RT_USING_HOOK=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDLE_HOOK_LIST_SIZE=4 CONFIG_IDLE_THREAD_STACK_SIZE=256 -CONFIG_RT_USING_TIMER_SOFT=y -CONFIG_RT_TIMER_THREAD_PRIO=4 -CONFIG_RT_TIMER_THREAD_STACK_SIZE=512 +# CONFIG_RT_USING_TIMER_SOFT is not set # # kservice optimization # -# CONFIG_RT_KSERVICE_USING_STDLIB is not set +CONFIG_RT_KSERVICE_USING_STDLIB=y # CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set # CONFIG_RT_USING_ASM_MEMCPY is not set CONFIG_RT_DEBUG=y @@ -186,9 +184,7 @@ CONFIG_RT_USING_PIN=y # CONFIG_RT_USING_MTD_NOR is not set # CONFIG_RT_USING_MTD_NAND is not set # CONFIG_RT_USING_PM is not set -CONFIG_RT_USING_RTC=y -# CONFIG_RT_USING_ALARM is not set -# CONFIG_RT_USING_SOFT_RTC is not set +# CONFIG_RT_USING_RTC is not set # CONFIG_RT_USING_SDIO is not set CONFIG_RT_USING_SPI=y # CONFIG_RT_USING_QSPI is not set @@ -284,9 +280,9 @@ CONFIG_SOC_STM32F407ZG=y CONFIG_BSP_USING_GPIO=y CONFIG_BSP_USING_UART=y CONFIG_BSP_USING_UART1=y -# CONFIG_BSP_USING_UART2 is not set +CONFIG_BSP_USING_UART2=y CONFIG_BSP_USING_UART3=y -CONFIG_BSP_USING_UART4=y +# CONFIG_BSP_USING_UART4 is not set # CONFIG_BSP_USING_I2C1 is not set # CONFIG_BSP_USING_SPI is not set # CONFIG_BSP_USING_CH438 is not set @@ -330,12 +326,11 @@ CONFIG_CONNECTION_FRAMEWORK_DEBUG=y # CONFIG_CONNECTION_ADAPTER_4G is not set # CONFIG_CONNECTION_ADAPTER_NB is not set # CONFIG_CONNECTION_ADAPTER_WIFI is not set -# CONFIG_CONNECTION_ADAPTER_ETHERNET is not set -CONFIG_CONNECTION_ADAPTER_BLUETOOTH=y -CONFIG_ADAPTER_HC08=y -CONFIG_ADAPTER_BLUETOOTH_HC08="hc08" -CONFIG_ADAPTER_HC08_WORK_ROLE="M" -CONFIG_ADAPTER_HC08_DRIVER="/dev/uart4" +CONFIG_ADAPTER_HFA21_DRIVER="/dev/uart3" +CONFIG_CONNECTION_ADAPTER_ETHERNET=y +CONFIG_ADAPTER_HFA21_ETHERNET=y +CONFIG_ADAPTER_ETHERNET_HFA21="hfa21_ethernet" +# CONFIG_CONNECTION_ADAPTER_BLUETOOTH is not set # CONFIG_CONNECTION_ADAPTER_ZIGBEE is not set # CONFIG_CONNECTION_ADAPTER_5G is not set # CONFIG_SUPPORT_KNOWING_FRAMEWORK is not set @@ -384,6 +379,7 @@ CONFIG_MAIN_KTASK_STACK_SIZE=1024 # # CONFIG_APPLICATION_SENSOR is not set # CONFIG_USING_EMBEDDED_DATABASE_APP is not set +# CONFIG_APP_USING_WEBNET is not set # # lib diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/aiit-arm32-board/rtconfig.h b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/aiit-arm32-board/rtconfig.h index 8d36278d9..e71dc1826 100644 --- a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/aiit-arm32-board/rtconfig.h +++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/aiit-arm32-board/rtconfig.h @@ -21,12 +21,10 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #define IDLE_THREAD_STACK_SIZE 256 -#define RT_USING_TIMER_SOFT -#define RT_TIMER_THREAD_PRIO 4 -#define RT_TIMER_THREAD_STACK_SIZE 512 /* kservice optimization */ +#define RT_KSERVICE_USING_STDLIB #define RT_DEBUG #define RT_DEBUG_COLOR @@ -123,7 +121,6 @@ #define RT_USING_I2C #define RT_USING_I2C_BITOPS #define RT_USING_PIN -#define RT_USING_RTC #define RT_USING_SPI #define RT_USING_SPI_MSD #define RT_USING_SFUD @@ -174,8 +171,8 @@ #define BSP_USING_GPIO #define BSP_USING_UART #define BSP_USING_UART1 +#define BSP_USING_UART2 #define BSP_USING_UART3 -#define BSP_USING_UART4 #define BSP_USING_USB #define BSP_USING_STM32_USBH #define USB_BUS_NAME "usb" @@ -196,11 +193,10 @@ #define ADD_RTTHREAD_FETURES #define SUPPORT_CONNECTION_FRAMEWORK #define CONNECTION_FRAMEWORK_DEBUG -#define CONNECTION_ADAPTER_BLUETOOTH -#define ADAPTER_HC08 -#define ADAPTER_BLUETOOTH_HC08 "hc08" -#define ADAPTER_HC08_WORK_ROLE "M" -#define ADAPTER_HC08_DRIVER "/dev/uart4" +#define ADAPTER_HFA21_DRIVER "/dev/uart3" +#define CONNECTION_ADAPTER_ETHERNET +#define ADAPTER_HFA21_ETHERNET +#define ADAPTER_ETHERNET_HFA21 "hfa21_ethernet" /* Security */