From b203904468f9c319395a9987292fec553aee8374 Mon Sep 17 00:00:00 2001 From: jiejietop Date: Thu, 18 Jun 2020 20:28:37 +0800 Subject: [PATCH] update GoKit3_STM32F103C8T6 board mqtt client demo ... --- board/GoKit3_STM32F103C8T6/BSP/Inc/tos_at.h | 23 +- .../mqttclient/GoKit3_STM32F103C8T6.uvoptx | 1450 ----------------- .../mqttclient/GoKit3_STM32F103C8T6.uvprojx | 44 +- .../TOS-CONFIG/mqtt_config.h | 42 +- 4 files changed, 63 insertions(+), 1496 deletions(-) delete mode 100644 board/GoKit3_STM32F103C8T6/KEIL/mqttclient/GoKit3_STM32F103C8T6.uvoptx diff --git a/board/GoKit3_STM32F103C8T6/BSP/Inc/tos_at.h b/board/GoKit3_STM32F103C8T6/BSP/Inc/tos_at.h index 70a67e79..7bed6bd6 100644 --- a/board/GoKit3_STM32F103C8T6/BSP/Inc/tos_at.h +++ b/board/GoKit3_STM32F103C8T6/BSP/Inc/tos_at.h @@ -93,6 +93,7 @@ typedef struct at_echo_st { size_t __w_idx; int __is_expecting; k_sem_t __expect_notify; + int __is_fuzzy_match; } at_echo_t; typedef void (*at_event_callback_t)(void); @@ -113,7 +114,7 @@ typedef struct at_agent_st { k_task_t parser; at_cache_t recv_cache; - at_timer_t timer; + k_stopwatch_t timer; k_mutex_t global_lock; @@ -268,7 +269,7 @@ __API__ int tos_at_init(hal_uart_port_t uart_port, at_event_t *event_table, size * * @attention None * - * @return + * @return None */ __API__ void tos_at_deinit(void); @@ -289,6 +290,22 @@ __API__ void tos_at_deinit(void); */ __API__ int tos_at_echo_create(at_echo_t *echo, char *buffer, size_t buffer_size, char *echo_expect); +/** + * @brief Create a echo struct with fuzzy matching for expected echo. + * + * @attention None + * + * @param[in] echo pointer to the echo struct. + * @param[out] buffer buffer to hold the received message from the module. + * @param[in] buffer_size size of the buffer. + * @param[in] echo_expect_contains if the echo message contains echo_expect_contains, it is a matching. + * + * @return errcode + * @retval -1 create failed(error). + * @retval 0 create successfully. + */ +__API__ int tos_at_echo_fuzzy_matching_create(at_echo_t *echo, char *buffer, size_t buffer_size, char *echo_expect_contains); + /** * @brief Execute an at command. * @@ -456,5 +473,5 @@ __API__ const char *tos_at_agent_channel_ip_get(int channel_id); */ __API__ const char *tos_at_agent_channel_port_get(int channel_id); -#endif /* __AT_AGENT_H_ */ +#endif /* _TOS_AT_H_ */ diff --git a/board/GoKit3_STM32F103C8T6/KEIL/mqttclient/GoKit3_STM32F103C8T6.uvoptx b/board/GoKit3_STM32F103C8T6/KEIL/mqttclient/GoKit3_STM32F103C8T6.uvoptx deleted file mode 100644 index 816b7e0d..00000000 --- a/board/GoKit3_STM32F103C8T6/KEIL/mqttclient/GoKit3_STM32F103C8T6.uvoptx +++ /dev/null @@ -1,1450 +0,0 @@ - - - - 1.0 - -
### uVision Project, (C) Keil Software
- - - *.c - *.s*; *.src; *.a* - *.obj; *.o - *.lib - *.txt; *.h; *.inc - *.plm - *.cpp - 0 - - - - 0 - 0 - - - - GoKit3_STM32F103C8T6 - 0x4 - ARM-ADS - - 72000000 - - 1 - 1 - 0 - 1 - 0 - - - 1 - 65535 - 0 - 0 - 0 - - - 79 - 66 - 8 - - - - 1 - 1 - 1 - 0 - 1 - 1 - 0 - 1 - 0 - 0 - 0 - 0 - - - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - - - 1 - 0 - 1 - - 18 - - 0 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - 0 - 3 - - - - - - - - - - - BIN\CMSIS_AGDI.dll - - - - 0 - CMSIS_AGDI - -X"Any" -UAny -O206 -S8 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL020000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM) - - - 0 - ARMRTXEVENTFLAGS - -L70 -Z18 -C0 -M0 -T1 - - - 0 - DLGTARM - (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0) - - - 0 - ARMDBGFLAGS - - - - 0 - DLGUARM - - - - 0 - UL2CM3 - UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM)) - - - 0 - ST-LINKIII-KEIL_SWO - -U303030303030303030303031 -O10446 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO131090 -TC10000000 -TP21 -TDS8000 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC800 -FN1 -FF0STM32F10x_128.FLM -FS08000000 -FL010000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM) - - - - - 0 - 0 - 926 - 1 -
134236382
- 0 - 0 - 0 - 0 - 0 - 1 - ..\..\..\..\components\connectivity\mqttclient\mqttclient\mqttclient.c - - \\GoKit3_STM32F103C8T6\../../../../components/connectivity/mqttclient/mqttclient/mqttclient.c\926 -
-
- - 0 - - - 0 - 1 - 1 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - 0 - 0 - 0 - - - - - - - - - - 1 - 0 - 0 - 2 - 10000000 - -
-
- - - Application/MDK-ARM - 0 - 0 - 0 - 0 - - 1 - 1 - 2 - 0 - 0 - 0 - startup_stm32f103xb.s - startup_stm32f103xb.s - 0 - 0 - - - - - Application/User - 0 - 0 - 0 - 0 - - 2 - 2 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\stm32f1xx_hal_msp.c - stm32f1xx_hal_msp.c - 0 - 0 - - - 2 - 3 - 1 - 0 - 0 - 0 - .\stm32f1xx_it.c - stm32f1xx_it.c - 0 - 0 - - - - - Application/Bsp - 0 - 0 - 0 - 0 - - 3 - 4 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\bsp_dwt.c - bsp_dwt.c - 0 - 0 - - - 3 - 5 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\bsp_init.c - bsp_init.c - 0 - 0 - - - 3 - 6 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\bsp_led.c - bsp_led.c - 0 - 0 - - - 3 - 7 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\bsp_motor.c - bsp_motor.c - 0 - 0 - - - 3 - 8 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\bsp_usart.c - bsp_usart.c - 0 - 0 - - - - - examples - 0 - 0 - 0 - 0 - - 4 - 9 - 1 - 0 - 0 - 0 - ..\..\..\..\examples\mqttclient\gokit3_mqttclient.c - gokit3_mqttclient.c - 0 - 0 - - - - - Drivers/STM32F1xx_HAL_Driver - 0 - 0 - 0 - 0 - - 5 - 10 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal.c - stm32f1xx_hal.c - 0 - 0 - - - 5 - 11 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_cortex.c - stm32f1xx_hal_cortex.c - 0 - 0 - - - 5 - 12 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_dma.c - stm32f1xx_hal_dma.c - 0 - 0 - - - 5 - 13 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_exti.c - stm32f1xx_hal_exti.c - 0 - 0 - - - 5 - 14 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash.c - stm32f1xx_hal_flash.c - 0 - 0 - - - 5 - 15 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_flash_ex.c - stm32f1xx_hal_flash_ex.c - 0 - 0 - - - 5 - 16 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio.c - stm32f1xx_hal_gpio.c - 0 - 0 - - - 5 - 17 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio_ex.c - stm32f1xx_hal_gpio_ex.c - 0 - 0 - - - 5 - 18 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pcd.c - stm32f1xx_hal_pcd.c - 0 - 0 - - - 5 - 19 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pcd_ex.c - stm32f1xx_hal_pcd_ex.c - 0 - 0 - - - 5 - 20 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pwr.c - stm32f1xx_hal_pwr.c - 0 - 0 - - - 5 - 21 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc.c - stm32f1xx_hal_rcc.c - 0 - 0 - - - 5 - 22 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc_ex.c - stm32f1xx_hal_rcc_ex.c - 0 - 0 - - - 5 - 23 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim.c - stm32f1xx_hal_tim.c - 0 - 0 - - - 5 - 24 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_tim_ex.c - stm32f1xx_hal_tim_ex.c - 0 - 0 - - - 5 - 25 - 1 - 0 - 0 - 0 - ..\..\..\..\platform\vendor_bsp\st\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_uart.c - stm32f1xx_hal_uart.c - 0 - 0 - - - - - Drivers/CMSIS - 0 - 0 - 0 - 0 - - 6 - 26 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\system_stm32f1xx.c - system_stm32f1xx.c - 0 - 0 - - - - - tos/arch - 0 - 0 - 0 - 0 - - 7 - 27 - 1 - 0 - 0 - 0 - ..\..\..\..\arch\arm\arm-v7m\common\tos_cpu.c - tos_cpu.c - 0 - 0 - - - 7 - 28 - 1 - 0 - 0 - 0 - ..\..\..\..\arch\arm\arm-v7m\cortex-m3\armcc\port_c.c - port_c.c - 0 - 0 - - - 7 - 29 - 2 - 0 - 0 - 0 - ..\..\..\..\arch\arm\arm-v7m\cortex-m3\armcc\port_s.S - port_s.S - 0 - 0 - - - - - tos/kernel - 0 - 0 - 0 - 0 - - 8 - 30 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_binary_heap.c - tos_binary_heap.c - 0 - 0 - - - 8 - 31 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_char_fifo.c - tos_char_fifo.c - 0 - 0 - - - 8 - 32 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_completion.c - tos_completion.c - 0 - 0 - - - 8 - 33 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_countdownlatch.c - tos_countdownlatch.c - 0 - 0 - - - 8 - 34 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_event.c - tos_event.c - 0 - 0 - - - 8 - 35 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_global.c - tos_global.c - 0 - 0 - - - 8 - 36 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_mail_queue.c - tos_mail_queue.c - 0 - 0 - - - 8 - 37 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_message_queue.c - tos_message_queue.c - 0 - 0 - - - 8 - 38 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_mmblk.c - tos_mmblk.c - 0 - 0 - - - 8 - 39 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_mmheap.c - tos_mmheap.c - 0 - 0 - - - 8 - 40 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_mutex.c - tos_mutex.c - 0 - 0 - - - 8 - 41 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_pend.c - tos_pend.c - 0 - 0 - - - 8 - 42 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_priority_mail_queue.c - tos_priority_mail_queue.c - 0 - 0 - - - 8 - 43 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_priority_message_queue.c - tos_priority_message_queue.c - 0 - 0 - - - 8 - 44 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_priority_queue.c - tos_priority_queue.c - 0 - 0 - - - 8 - 45 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_ring_queue.c - tos_ring_queue.c - 0 - 0 - - - 8 - 46 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_robin.c - tos_robin.c - 0 - 0 - - - 8 - 47 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_sched.c - tos_sched.c - 0 - 0 - - - 8 - 48 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_sem.c - tos_sem.c - 0 - 0 - - - 8 - 49 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_sys.c - tos_sys.c - 0 - 0 - - - 8 - 50 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_task.c - tos_task.c - 0 - 0 - - - 8 - 51 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_tick.c - tos_tick.c - 0 - 0 - - - 8 - 52 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_time.c - tos_time.c - 0 - 0 - - - 8 - 53 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_timer.c - tos_timer.c - 0 - 0 - - - 8 - 54 - 1 - 0 - 0 - 0 - ..\..\..\..\kernel\core\tos_stopwatch.c - tos_stopwatch.c - 0 - 0 - - - - - tos/cmsis - 0 - 0 - 0 - 0 - - 9 - 55 - 1 - 0 - 0 - 0 - ..\..\..\..\osal\cmsis_os\cmsis_os.c - cmsis_os.c - 0 - 0 - - - - - tos/at - 0 - 0 - 0 - 0 - - 10 - 56 - 1 - 0 - 0 - 0 - ..\..\..\..\net\at\src\tos_at.c - tos_at.c - 0 - 0 - - - - - tos/sal - 0 - 0 - 0 - 0 - - 11 - 57 - 1 - 0 - 0 - 0 - ..\..\..\..\net\sal_module_wrapper\sal_module_wrapper.c - sal_module_wrapper.c - 0 - 0 - - - - - tos/hal - 0 - 0 - 0 - 0 - - 12 - 58 - 1 - 0 - 0 - 0 - ..\..\BSP\Src\tos_hal_uart.c - tos_hal_uart.c - 0 - 0 - - - - - tos/devices - 0 - 0 - 0 - 0 - - 13 - 59 - 1 - 0 - 0 - 0 - ..\..\..\..\devices\esp8266\esp8266.c - esp8266.c - 0 - 0 - - - - - mqttclient - 0 - 0 - 0 - 0 - - 14 - 60 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\mqttclient\mqttclient.c - mqttclient.c - 0 - 0 - - - - - mqttclient/mqtt - 0 - 0 - 0 - 0 - - 15 - 61 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\mqtt\MQTTConnectClient.c - MQTTConnectClient.c - 0 - 0 - - - 15 - 62 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\mqtt\MQTTConnectServer.c - MQTTConnectServer.c - 0 - 0 - - - 15 - 63 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\mqtt\MQTTDeserializePublish.c - MQTTDeserializePublish.c - 0 - 0 - - - 15 - 64 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\mqtt\MQTTFormat.c - MQTTFormat.c - 0 - 0 - - - 15 - 65 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\mqtt\MQTTPacket.c - MQTTPacket.c - 0 - 0 - - - 15 - 66 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\mqtt\MQTTSerializePublish.c - MQTTSerializePublish.c - 0 - 0 - - - 15 - 67 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\mqtt\MQTTSubscribeClient.c - MQTTSubscribeClient.c - 0 - 0 - - - 15 - 68 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\mqtt\MQTTSubscribeServer.c - MQTTSubscribeServer.c - 0 - 0 - - - 15 - 69 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\mqtt\MQTTUnsubscribeClient.c - MQTTUnsubscribeClient.c - 0 - 0 - - - 15 - 70 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\mqtt\MQTTUnsubscribeServer.c - MQTTUnsubscribeServer.c - 0 - 0 - - - - - mqttclient/salof - 0 - 0 - 0 - 0 - - 16 - 71 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\common\log\fifo.c - fifo.c - 0 - 0 - - - 16 - 72 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\common\log\format.c - format.c - 0 - 0 - - - 16 - 73 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\common\log\salof.c - salof.c - 0 - 0 - - - 16 - 74 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\common\log\arch\tencentos-tiny\arch.c - arch.c - 0 - 0 - - - 16 - 75 - 5 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\common\log\salof_config.h - salof_config.h - 0 - 0 - - - - - mqttclient/common - 0 - 0 - 0 - 0 - - 17 - 76 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\common\list.c - list.c - 0 - 0 - - - 17 - 77 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\common\random.c - random.c - 0 - 0 - - - 17 - 78 - 5 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\common\log.h - log.h - 0 - 0 - - - 17 - 79 - 5 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\common\error.h - error.h - 0 - 0 - - - - - mqttclient/network - 0 - 0 - 0 - 0 - - 18 - 80 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\network\network.c - network.c - 0 - 0 - - - - - mqttclient/platform - 0 - 0 - 0 - 0 - - 19 - 81 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_memory.c - platform_memory.c - 0 - 0 - - - 19 - 82 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_mutex.c - platform_mutex.c - 0 - 0 - - - 19 - 83 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_net_socket.c - platform_net_socket.c - 0 - 0 - - - 19 - 84 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_nettype_tcp.c - platform_nettype_tcp.c - 0 - 0 - - - 19 - 85 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_nettype_tls.c - platform_nettype_tls.c - 0 - 0 - - - 19 - 86 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_thread.c - platform_thread.c - 0 - 0 - - - 19 - 87 - 1 - 0 - 0 - 0 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_timer.c - platform_timer.c - 0 - 0 - - - - - mqttclient/config - 0 - 0 - 0 - 0 - - 20 - 88 - 5 - 0 - 0 - 0 - ..\..\TOS-CONFIG\mqtt_config.h - mqtt_config.h - 0 - 0 - - - - - ::CMSIS - 0 - 0 - 0 - 1 - - -
diff --git a/board/GoKit3_STM32F103C8T6/KEIL/mqttclient/GoKit3_STM32F103C8T6.uvprojx b/board/GoKit3_STM32F103C8T6/KEIL/mqttclient/GoKit3_STM32F103C8T6.uvprojx index 032d14bd..0ab690b8 100644 --- a/board/GoKit3_STM32F103C8T6/KEIL/mqttclient/GoKit3_STM32F103C8T6.uvprojx +++ b/board/GoKit3_STM32F103C8T6/KEIL/mqttclient/GoKit3_STM32F103C8T6.uvprojx @@ -16,7 +16,7 @@ STM32F103C8 STMicroelectronics - Keil.STM32F1xx_DFP.2.2.0 + Keil.STM32F1xx_DFP.2.3.0 http://www.keil.com/pack/ IRAM(0x20000000-0x20004FFF) IROM(0x8000000-0x800FFFF) CLOCK(8000000) CPUTYPE("Cortex-M3") @@ -54,7 +54,7 @@ 0 0 1 - 0 + 1 1 0 @@ -837,25 +837,25 @@ mqttclient/common - - list.c - 1 - ..\..\..\..\components\connectivity\mqttclient\common\list.c - random.c 1 ..\..\..\..\components\connectivity\mqttclient\common\random.c - log.h - 5 - ..\..\..\..\components\connectivity\mqttclient\common\log.h + mqtt_list.c + 1 + ..\..\..\..\components\connectivity\mqttclient\common\mqtt_list.c - error.h + mqtt_log.h 5 - ..\..\..\..\components\connectivity\mqttclient\common\error.h + ..\..\..\..\components\connectivity\mqttclient\common\mqtt_log.h + + + mqtt_error.h + 5 + ..\..\..\..\components\connectivity\mqttclient\common\mqtt_error.h @@ -867,6 +867,16 @@ 1 ..\..\..\..\components\connectivity\mqttclient\network\network.c + + nettype_tcp.c + 1 + ..\..\..\..\components\connectivity\mqttclient\network\nettype_tcp.c + + + nettype_tls.c + 1 + ..\..\..\..\components\connectivity\mqttclient\network\nettype_tls.c + @@ -887,16 +897,6 @@ 1 ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_net_socket.c - - platform_nettype_tcp.c - 1 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_nettype_tcp.c - - - platform_nettype_tls.c - 1 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_nettype_tls.c - platform_thread.c 1 diff --git a/board/GoKit3_STM32F103C8T6/TOS-CONFIG/mqtt_config.h b/board/GoKit3_STM32F103C8T6/TOS-CONFIG/mqtt_config.h index c2caeb53..2e953d69 100644 --- a/board/GoKit3_STM32F103C8T6/TOS-CONFIG/mqtt_config.h +++ b/board/GoKit3_STM32F103C8T6/TOS-CONFIG/mqtt_config.h @@ -1,48 +1,48 @@ /* * @Author: jiejie * @Github: https://github.com/jiejieTop - * @Date: 2019-12-15 00:42:16 - * @LastEditTime: 2020-02-25 09:25:35 + * @LastEditTime: 2020-06-17 19:31:41 * @Description: the code belongs to jiejie, please keep the author information and source code according to the license. */ #ifndef _MQTT_CONFIG_H_ #define _MQTT_CONFIG_H_ -//#define LOG_IS_SALOF +//#define MQTT_LOG_IS_SALOF -#define LOG_LEVEL DEBUG_LEVEL //WARN_LEVEL DEBUG_LEVEL +#define MQTT_NETSOCKET_USING_AT -#ifdef LOG_IS_SALOF - #define USE_LOG (1U) - #define USE_SALOF (1U) - #define SALOF_OS USE_TENCENTOS - #define USE_IDLE_HOOK (0U) - #define LOG_COLOR (0U) - #define LOG_TS (0U) - #define LOG_TAR (0U) - #define SALOF_BUFF_SIZE (512U) - #define SALOF_FIFO_SIZE (1024U) - #define SALOF_TASK_STACK_SIZE (1024U) - #define SALOF_TASK_TICK (50U) +#define MQTT_LOG_LEVEL MQTT_LOG_DEBUG_LEVEL //MQTT_LOG_WARN_LEVEL MQTT_LOG_DEBUG_LEVEL + +#ifdef MQTT_LOG_IS_SALOF + #define SALOF_USING_LOG (1U) + #define SALOF_USING_SALOF (1U) + #define SALOF_LOG_LEVEL MQTT_LOG_LEVEL + #define SALOF_OS SALOF_USING_TENCENTOS + #define SALOF_USING_IDLE_HOOK (0U) + #define SALOF_LOG_COLOR (1U) + #define SALOF_LOG_TS (0U) + #define SALOF_LOG_TAR (0U) + #define SALOF_BUFF_SIZE 512 + #define SALOF_FIFO_SIZE 4096 + #define SALOF_TASK_STACK_SIZE 1024 + #define SALOF_TASK_TICK 50 #endif - #define MQTT_MAX_PACKET_ID (0xFFFF - 1) #define MQTT_TOPIC_LEN_MAX 64 #define MQTT_ACK_HANDLER_NUM_MAX 64 #define MQTT_DEFAULT_BUF_SIZE 1024 -#define MQTT_DEFAULT_CMD_TIMEOUT 4000 +#define MQTT_DEFAULT_CMD_TIMEOUT 5000 #define MQTT_MAX_CMD_TIMEOUT 20000 #define MQTT_MIN_CMD_TIMEOUT 1000 -#define MQTT_KEEP_ALIVE_INTERVAL 100 // unit: second +#define MQTT_KEEP_ALIVE_INTERVAL 50 // unit: second #define MQTT_VERSION 4 // 4 is mqtt 3.1.1 #define MQTT_RECONNECT_DEFAULT_DURATION 1000 #define MQTT_THREAD_STACK_SIZE 2048 #define MQTT_THREAD_PRIO 5 #define MQTT_THREAD_TICK 50 -#define MQTT_NETSOCKET_USE_AT -//#define MQTT_NETWORK_TYPE_TLS +#define MQTT_NETWORK_TYPE_NO_TLS #endif /* _MQTT_CONFIG_H_ */