network mode, red/green swing issue

This commit is contained in:
YunHorn Technology 2022-09-21 13:20:52 +08:00
parent b16a153081
commit 99e42d04ab
17 changed files with 2829 additions and 355 deletions

View File

@ -100,6 +100,7 @@ uint32_t MCU_UID(void);
#define senddataport 10U //STS_O1 SEND DATA PORT
#define sendhtbtport 5U //STS_O2 send heart beat port
#define cmdreplyport 13U // presence sensor parameter change feedback data port
enum Work_Mode {
Network_Mode =0,// Mode = 0, Network/Cloud control mode

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,77 @@
<html>
<body>
<pre>
<h1>µVision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: ¦ÌVision V5.33.0.0
Copyright (C) 2020 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: dp lenovo, yunhorn, LIC=NQQMA-19ZCY-KP3ZY-IMEF3-G09Q9-GVNGQ
Tool Versions:
Toolchain: MDK-ARM Plus Version: 5.33.0.0
Toolchain Path: D:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 7 (build 960)
Assembler: Armasm.exe V5.06 update 7 (build 960)
Linker/Locator: ArmLink.exe V5.06 update 7 (build 960)
Library Manager: ArmAr.exe V5.06 update 7 (build 960)
Hex Converter: FromElf.exe V5.06 update 7 (build 960)
CPU DLL: SARMCM3.DLL V5.33.0.0
Dialog DLL: DCM.DLL V1.17.3.0
Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.8.0
Dialog DLL: TCM.DLL V1.48.0.0
<h2>Project:</h2>
D:\ONEDRIVE\GIT\STS_IOT\STS_OO\MDK-ARM\LED_M100C_WS2812.uvprojx
Project File Date: 04/11/2022
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'LED_M100C_WS2812'
assembling startup_stm32f103xb.s...
compiling stm32f1xx_ll_exti.c...
compiling stm32f1xx_ll_pwr.c...
compiling stm32f1xx_ll_rcc.c...
compiling stm32f1xx_ll_dma.c...
compiling stm32f1xx_ll_utils.c...
compiling stm32f1xx_ll_gpio.c...
compiling stm32f1xx_ll_usart.c...
compiling stm32f1xx_ll_tim.c...
compiling sys.c...
compiling dma.c...
compiling tim.c...
compiling main.c...
compiling iwdg.c...
compiling gpio.c...
compiling usart.c...
compiling stm32f1xx_it.c...
compiling system_stm32f1xx.c...
linking...
Program Size: Code=10992 RO-data=428 RW-data=224 ZI-data=1344
FromELF: creating hex file...
"LED_M100C_WS2812\LED_M100C_WS2812.axf" - 0 Error(s), 0 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
http://www.keil.com/pack/ARM.CMSIS.5.7.0.pack
ARM.CMSIS.5.7.0
CMSIS (Cortex Microcontroller Software Interface Standard)
* Component: CORE Version: 5.4.0
Package Vendor: Keil
http://www.keil.com/pack/Keil.STM32F1xx_DFP.2.3.0.pack
Keil.STM32F1xx_DFP.2.3.0
STMicroelectronics STM32F1 Series Device Support, Drivers and Examples
<h2>Collection of Component include folders:</h2>
.\RTE\_LED_M100C_WS2812
D:\Users\lenovo\AppData\Local\Arm\Packs\ARM\CMSIS\5.7.0\CMSIS\Core\Include
D:\Users\lenovo\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.3.0\Device\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.4.0
Build Time Elapsed: 00:00:02
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
--cpu Cortex-M3
"led_m100c_ws2812\startup_stm32f103xb.o"
"led_m100c_ws2812\main.o"
"led_m100c_ws2812\gpio.o"
"led_m100c_ws2812\dma.o"
"led_m100c_ws2812\iwdg.o"
"led_m100c_ws2812\tim.o"
"led_m100c_ws2812\usart.o"
"led_m100c_ws2812\stm32f1xx_it.o"
"led_m100c_ws2812\sys.o"
"led_m100c_ws2812\stm32f1xx_ll_gpio.o"
"led_m100c_ws2812\stm32f1xx_ll_dma.o"
"led_m100c_ws2812\stm32f1xx_ll_rcc.o"
"led_m100c_ws2812\stm32f1xx_ll_utils.o"
"led_m100c_ws2812\stm32f1xx_ll_exti.o"
"led_m100c_ws2812\stm32f1xx_ll_pwr.o"
"led_m100c_ws2812\stm32f1xx_ll_tim.o"
"led_m100c_ws2812\stm32f1xx_ll_usart.o"
"led_m100c_ws2812\system_stm32f1xx.o"
--library_type=microlib --strict --scatter "LED_M100C_WS2812\LED_M100C_WS2812.sct"
--summary_stderr --info summarysizes --map --load_addr_map_info --xref --callgraph --symbols
--info sizes --info totals --info unused --info veneers
--list "LED_M100C_WS2812.map" -o LED_M100C_WS2812\LED_M100C_WS2812.axf

View File

@ -936,89 +936,89 @@ Image Symbol Table
i.Reed_Working 0x08001ad0 Section 0 main.o(i.Reed_Working)
i.SVC_Handler 0x08001b50 Section 0 stm32f1xx_it.o(i.SVC_Handler)
i.Set_PCR_Parameter 0x08001b54 Section 0 usart.o(i.Set_PCR_Parameter)
i.SysTick_Handler 0x08001db0 Section 0 stm32f1xx_it.o(i.SysTick_Handler)
i.SystemClock_Config 0x08001db4 Section 0 main.o(i.SystemClock_Config)
i.SystemInit 0x08001efc Section 0 system_stm32f1xx.o(i.SystemInit)
i.TIM2_DMA_Config 0x08001f54 Section 0 tim.o(i.TIM2_DMA_Config)
i.TIM2_IRQHandler 0x08001ff4 Section 0 stm32f1xx_it.o(i.TIM2_IRQHandler)
i.TIM3_IRQHandler 0x08001ff8 Section 0 stm32f1xx_it.o(i.TIM3_IRQHandler)
i.USART1_IRQHandler 0x08002044 Section 0 stm32f1xx_it.o(i.USART1_IRQHandler)
i.USART3_IRQHandler 0x080020dc Section 0 stm32f1xx_it.o(i.USART3_IRQHandler)
i.UsageFault_Handler 0x080020fc Section 0 stm32f1xx_it.o(i.UsageFault_Handler)
i.Usart_SendByte 0x08002100 Section 0 usart.o(i.Usart_SendByte)
i.Usart_SendString 0x0800211c Section 0 usart.o(i.Usart_SendString)
i.WS2812_Data_Transfer 0x08002144 Section 0 tim.o(i.WS2812_Data_Transfer)
i.WS2812_Light_All 0x080021a8 Section 0 tim.o(i.WS2812_Light_All)
i.WS2812_Light_Custom 0x08002248 Section 0 tim.o(i.WS2812_Light_Custom)
i.WS2812_Light_One_By_One 0x08002298 Section 0 tim.o(i.WS2812_Light_One_By_One)
i.__0printf$8 0x080022d8 Section 0 printf8.o(i.__0printf$8)
i.__0sprintf$8 0x080022f8 Section 0 printf8.o(i.__0sprintf$8)
i.__NVIC_EnableIRQ 0x08002320 Section 0 dma.o(i.__NVIC_EnableIRQ)
__NVIC_EnableIRQ 0x08002321 Thumb Code 26 dma.o(i.__NVIC_EnableIRQ)
i.__NVIC_EnableIRQ 0x0800233a Section 0 tim.o(i.__NVIC_EnableIRQ)
__NVIC_EnableIRQ 0x0800233b Thumb Code 26 tim.o(i.__NVIC_EnableIRQ)
i.__NVIC_EnableIRQ 0x08002354 Section 0 usart.o(i.__NVIC_EnableIRQ)
__NVIC_EnableIRQ 0x08002355 Thumb Code 26 usart.o(i.__NVIC_EnableIRQ)
i.__NVIC_GetPriorityGrouping 0x08002370 Section 0 dma.o(i.__NVIC_GetPriorityGrouping)
__NVIC_GetPriorityGrouping 0x08002371 Thumb Code 10 dma.o(i.__NVIC_GetPriorityGrouping)
i.__NVIC_GetPriorityGrouping 0x08002380 Section 0 tim.o(i.__NVIC_GetPriorityGrouping)
__NVIC_GetPriorityGrouping 0x08002381 Thumb Code 10 tim.o(i.__NVIC_GetPriorityGrouping)
i.__NVIC_GetPriorityGrouping 0x08002390 Section 0 usart.o(i.__NVIC_GetPriorityGrouping)
__NVIC_GetPriorityGrouping 0x08002391 Thumb Code 10 usart.o(i.__NVIC_GetPriorityGrouping)
i.__NVIC_SetPriority 0x080023a0 Section 0 dma.o(i.__NVIC_SetPriority)
__NVIC_SetPriority 0x080023a1 Thumb Code 32 dma.o(i.__NVIC_SetPriority)
i.__NVIC_SetPriority 0x080023c8 Section 0 tim.o(i.__NVIC_SetPriority)
__NVIC_SetPriority 0x080023c9 Thumb Code 32 tim.o(i.__NVIC_SetPriority)
i.__NVIC_SetPriority 0x080023f0 Section 0 usart.o(i.__NVIC_SetPriority)
__NVIC_SetPriority 0x080023f1 Thumb Code 32 usart.o(i.__NVIC_SetPriority)
i.__scatterload_copy 0x08002418 Section 14 handlers.o(i.__scatterload_copy)
i.__scatterload_null 0x08002426 Section 2 handlers.o(i.__scatterload_null)
i.__scatterload_zeroinit 0x08002428 Section 14 handlers.o(i.__scatterload_zeroinit)
i._printf_core 0x08002438 Section 0 printf8.o(i._printf_core)
_printf_core 0x08002439 Thumb Code 984 printf8.o(i._printf_core)
i._printf_post_padding 0x0800283c Section 0 printf8.o(i._printf_post_padding)
_printf_post_padding 0x0800283d Thumb Code 36 printf8.o(i._printf_post_padding)
i._printf_pre_padding 0x08002860 Section 0 printf8.o(i._printf_pre_padding)
_printf_pre_padding 0x08002861 Thumb Code 46 printf8.o(i._printf_pre_padding)
i._sputc 0x0800288e Section 0 printf8.o(i._sputc)
_sputc 0x0800288f Thumb Code 10 printf8.o(i._sputc)
i.fputc 0x08002898 Section 0 usart.o(i.fputc)
i.hex2int 0x080028bc Section 0 usart.o(i.hex2int)
hex2int 0x080028bd Thumb Code 48 usart.o(i.hex2int)
i.hex2str 0x080028ec Section 0 usart.o(i.hex2str)
i.main 0x0800293c Section 0 main.o(i.main)
.constdata 0x08002bc4 Section 42 tim.o(.constdata)
CHANNEL_OFFSET_TAB 0x08002bc4 Data 7 tim.o(.constdata)
OFFSET_TAB_CCMRx 0x08002bcb Data 7 tim.o(.constdata)
SHIFT_TAB_OCxx 0x08002bd2 Data 7 tim.o(.constdata)
SHIFT_TAB_ICxx 0x08002bd9 Data 7 tim.o(.constdata)
SHIFT_TAB_CCxP 0x08002be0 Data 7 tim.o(.constdata)
SHIFT_TAB_OISx 0x08002be7 Data 7 tim.o(.constdata)
.constdata 0x08002bee Section 42 usart.o(.constdata)
CHANNEL_OFFSET_TAB 0x08002bee Data 7 usart.o(.constdata)
OFFSET_TAB_CCMRx 0x08002bf5 Data 7 usart.o(.constdata)
SHIFT_TAB_OCxx 0x08002bfc Data 7 usart.o(.constdata)
SHIFT_TAB_ICxx 0x08002c03 Data 7 usart.o(.constdata)
SHIFT_TAB_CCxP 0x08002c0a Data 7 usart.o(.constdata)
SHIFT_TAB_OISx 0x08002c11 Data 7 usart.o(.constdata)
.constdata 0x08002c18 Section 42 stm32f1xx_it.o(.constdata)
CHANNEL_OFFSET_TAB 0x08002c18 Data 7 stm32f1xx_it.o(.constdata)
OFFSET_TAB_CCMRx 0x08002c1f Data 7 stm32f1xx_it.o(.constdata)
SHIFT_TAB_OCxx 0x08002c26 Data 7 stm32f1xx_it.o(.constdata)
SHIFT_TAB_ICxx 0x08002c2d Data 7 stm32f1xx_it.o(.constdata)
SHIFT_TAB_CCxP 0x08002c34 Data 7 stm32f1xx_it.o(.constdata)
SHIFT_TAB_OISx 0x08002c3b Data 7 stm32f1xx_it.o(.constdata)
.constdata 0x08002c42 Section 7 stm32f1xx_ll_dma.o(.constdata)
CHANNEL_OFFSET_TAB 0x08002c42 Data 7 stm32f1xx_ll_dma.o(.constdata)
.constdata 0x08002c49 Section 24 system_stm32f1xx.o(.constdata)
.data 0x20000000 Section 9 main.o(.data)
.data 0x20000009 Section 193 tim.o(.data)
.data 0x200000ca Section 10 usart.o(.data)
Motion_Changed_Flag 0x200000d1 Data 1 usart.o(.data)
numerator 0x200000d2 Data 1 usart.o(.data)
denominator 0x200000d3 Data 1 usart.o(.data)
.data 0x200000d4 Section 2 stm32f1xx_it.o(.data)
Second 0x200000d4 Data 2 stm32f1xx_it.o(.data)
i.SysTick_Handler 0x08001db4 Section 0 stm32f1xx_it.o(i.SysTick_Handler)
i.SystemClock_Config 0x08001db8 Section 0 main.o(i.SystemClock_Config)
i.SystemInit 0x08001f00 Section 0 system_stm32f1xx.o(i.SystemInit)
i.TIM2_DMA_Config 0x08001f58 Section 0 tim.o(i.TIM2_DMA_Config)
i.TIM2_IRQHandler 0x08001ff8 Section 0 stm32f1xx_it.o(i.TIM2_IRQHandler)
i.TIM3_IRQHandler 0x08001ffc Section 0 stm32f1xx_it.o(i.TIM3_IRQHandler)
i.USART1_IRQHandler 0x08002048 Section 0 stm32f1xx_it.o(i.USART1_IRQHandler)
i.USART3_IRQHandler 0x080020e0 Section 0 stm32f1xx_it.o(i.USART3_IRQHandler)
i.UsageFault_Handler 0x08002100 Section 0 stm32f1xx_it.o(i.UsageFault_Handler)
i.Usart_SendByte 0x08002104 Section 0 usart.o(i.Usart_SendByte)
i.Usart_SendString 0x08002120 Section 0 usart.o(i.Usart_SendString)
i.WS2812_Data_Transfer 0x08002148 Section 0 tim.o(i.WS2812_Data_Transfer)
i.WS2812_Light_All 0x080021ac Section 0 tim.o(i.WS2812_Light_All)
i.WS2812_Light_Custom 0x0800224c Section 0 tim.o(i.WS2812_Light_Custom)
i.WS2812_Light_One_By_One 0x0800229c Section 0 tim.o(i.WS2812_Light_One_By_One)
i.__0printf$8 0x080022dc Section 0 printf8.o(i.__0printf$8)
i.__0sprintf$8 0x080022fc Section 0 printf8.o(i.__0sprintf$8)
i.__NVIC_EnableIRQ 0x08002324 Section 0 dma.o(i.__NVIC_EnableIRQ)
__NVIC_EnableIRQ 0x08002325 Thumb Code 26 dma.o(i.__NVIC_EnableIRQ)
i.__NVIC_EnableIRQ 0x0800233e Section 0 tim.o(i.__NVIC_EnableIRQ)
__NVIC_EnableIRQ 0x0800233f Thumb Code 26 tim.o(i.__NVIC_EnableIRQ)
i.__NVIC_EnableIRQ 0x08002358 Section 0 usart.o(i.__NVIC_EnableIRQ)
__NVIC_EnableIRQ 0x08002359 Thumb Code 26 usart.o(i.__NVIC_EnableIRQ)
i.__NVIC_GetPriorityGrouping 0x08002374 Section 0 dma.o(i.__NVIC_GetPriorityGrouping)
__NVIC_GetPriorityGrouping 0x08002375 Thumb Code 10 dma.o(i.__NVIC_GetPriorityGrouping)
i.__NVIC_GetPriorityGrouping 0x08002384 Section 0 tim.o(i.__NVIC_GetPriorityGrouping)
__NVIC_GetPriorityGrouping 0x08002385 Thumb Code 10 tim.o(i.__NVIC_GetPriorityGrouping)
i.__NVIC_GetPriorityGrouping 0x08002394 Section 0 usart.o(i.__NVIC_GetPriorityGrouping)
__NVIC_GetPriorityGrouping 0x08002395 Thumb Code 10 usart.o(i.__NVIC_GetPriorityGrouping)
i.__NVIC_SetPriority 0x080023a4 Section 0 dma.o(i.__NVIC_SetPriority)
__NVIC_SetPriority 0x080023a5 Thumb Code 32 dma.o(i.__NVIC_SetPriority)
i.__NVIC_SetPriority 0x080023cc Section 0 tim.o(i.__NVIC_SetPriority)
__NVIC_SetPriority 0x080023cd Thumb Code 32 tim.o(i.__NVIC_SetPriority)
i.__NVIC_SetPriority 0x080023f4 Section 0 usart.o(i.__NVIC_SetPriority)
__NVIC_SetPriority 0x080023f5 Thumb Code 32 usart.o(i.__NVIC_SetPriority)
i.__scatterload_copy 0x0800241c Section 14 handlers.o(i.__scatterload_copy)
i.__scatterload_null 0x0800242a Section 2 handlers.o(i.__scatterload_null)
i.__scatterload_zeroinit 0x0800242c Section 14 handlers.o(i.__scatterload_zeroinit)
i._printf_core 0x0800243c Section 0 printf8.o(i._printf_core)
_printf_core 0x0800243d Thumb Code 984 printf8.o(i._printf_core)
i._printf_post_padding 0x08002840 Section 0 printf8.o(i._printf_post_padding)
_printf_post_padding 0x08002841 Thumb Code 36 printf8.o(i._printf_post_padding)
i._printf_pre_padding 0x08002864 Section 0 printf8.o(i._printf_pre_padding)
_printf_pre_padding 0x08002865 Thumb Code 46 printf8.o(i._printf_pre_padding)
i._sputc 0x08002892 Section 0 printf8.o(i._sputc)
_sputc 0x08002893 Thumb Code 10 printf8.o(i._sputc)
i.fputc 0x0800289c Section 0 usart.o(i.fputc)
i.hex2int 0x080028c0 Section 0 usart.o(i.hex2int)
hex2int 0x080028c1 Thumb Code 48 usart.o(i.hex2int)
i.hex2str 0x080028f0 Section 0 usart.o(i.hex2str)
i.main 0x08002940 Section 0 main.o(i.main)
.constdata 0x08002bdc Section 42 tim.o(.constdata)
CHANNEL_OFFSET_TAB 0x08002bdc Data 7 tim.o(.constdata)
OFFSET_TAB_CCMRx 0x08002be3 Data 7 tim.o(.constdata)
SHIFT_TAB_OCxx 0x08002bea Data 7 tim.o(.constdata)
SHIFT_TAB_ICxx 0x08002bf1 Data 7 tim.o(.constdata)
SHIFT_TAB_CCxP 0x08002bf8 Data 7 tim.o(.constdata)
SHIFT_TAB_OISx 0x08002bff Data 7 tim.o(.constdata)
.constdata 0x08002c06 Section 42 usart.o(.constdata)
CHANNEL_OFFSET_TAB 0x08002c06 Data 7 usart.o(.constdata)
OFFSET_TAB_CCMRx 0x08002c0d Data 7 usart.o(.constdata)
SHIFT_TAB_OCxx 0x08002c14 Data 7 usart.o(.constdata)
SHIFT_TAB_ICxx 0x08002c1b Data 7 usart.o(.constdata)
SHIFT_TAB_CCxP 0x08002c22 Data 7 usart.o(.constdata)
SHIFT_TAB_OISx 0x08002c29 Data 7 usart.o(.constdata)
.constdata 0x08002c30 Section 42 stm32f1xx_it.o(.constdata)
CHANNEL_OFFSET_TAB 0x08002c30 Data 7 stm32f1xx_it.o(.constdata)
OFFSET_TAB_CCMRx 0x08002c37 Data 7 stm32f1xx_it.o(.constdata)
SHIFT_TAB_OCxx 0x08002c3e Data 7 stm32f1xx_it.o(.constdata)
SHIFT_TAB_ICxx 0x08002c45 Data 7 stm32f1xx_it.o(.constdata)
SHIFT_TAB_CCxP 0x08002c4c Data 7 stm32f1xx_it.o(.constdata)
SHIFT_TAB_OISx 0x08002c53 Data 7 stm32f1xx_it.o(.constdata)
.constdata 0x08002c5a Section 7 stm32f1xx_ll_dma.o(.constdata)
CHANNEL_OFFSET_TAB 0x08002c5a Data 7 stm32f1xx_ll_dma.o(.constdata)
.constdata 0x08002c61 Section 24 system_stm32f1xx.o(.constdata)
.data 0x20000000 Section 11 main.o(.data)
.data 0x2000000b Section 193 tim.o(.data)
.data 0x200000cc Section 10 usart.o(.data)
Motion_Changed_Flag 0x200000d3 Data 1 usart.o(.data)
numerator 0x200000d4 Data 1 usart.o(.data)
denominator 0x200000d5 Data 1 usart.o(.data)
.data 0x200000d6 Section 2 stm32f1xx_it.o(.data)
Second 0x200000d6 Data 2 stm32f1xx_it.o(.data)
.data 0x200000d8 Section 4 system_stm32f1xx.o(.data)
.data 0x200000dc Section 4 stdout.o(.data)
.bss 0x200000e0 Section 24 tim.o(.bss)
@ -1188,51 +1188,52 @@ Image Symbol Table
Radar_Filtering_clutter 0x080019e5 Thumb Code 206 usart.o(i.Radar_Filtering_clutter)
Reed_Working 0x08001ad1 Thumb Code 116 main.o(i.Reed_Working)
SVC_Handler 0x08001b51 Thumb Code 2 stm32f1xx_it.o(i.SVC_Handler)
Set_PCR_Parameter 0x08001b55 Thumb Code 454 usart.o(i.Set_PCR_Parameter)
SysTick_Handler 0x08001db1 Thumb Code 2 stm32f1xx_it.o(i.SysTick_Handler)
SystemClock_Config 0x08001db5 Thumb Code 314 main.o(i.SystemClock_Config)
SystemInit 0x08001efd Thumb Code 70 system_stm32f1xx.o(i.SystemInit)
TIM2_DMA_Config 0x08001f55 Thumb Code 142 tim.o(i.TIM2_DMA_Config)
TIM2_IRQHandler 0x08001ff5 Thumb Code 2 stm32f1xx_it.o(i.TIM2_IRQHandler)
TIM3_IRQHandler 0x08001ff9 Thumb Code 60 stm32f1xx_it.o(i.TIM3_IRQHandler)
USART1_IRQHandler 0x08002045 Thumb Code 132 stm32f1xx_it.o(i.USART1_IRQHandler)
USART3_IRQHandler 0x080020dd Thumb Code 24 stm32f1xx_it.o(i.USART3_IRQHandler)
UsageFault_Handler 0x080020fd Thumb Code 4 stm32f1xx_it.o(i.UsageFault_Handler)
Usart_SendByte 0x08002101 Thumb Code 28 usart.o(i.Usart_SendByte)
Usart_SendString 0x0800211d Thumb Code 40 usart.o(i.Usart_SendString)
WS2812_Data_Transfer 0x08002145 Thumb Code 94 tim.o(i.WS2812_Data_Transfer)
WS2812_Light_All 0x080021a9 Thumb Code 160 tim.o(i.WS2812_Light_All)
WS2812_Light_Custom 0x08002249 Thumb Code 74 tim.o(i.WS2812_Light_Custom)
WS2812_Light_One_By_One 0x08002299 Thumb Code 58 tim.o(i.WS2812_Light_One_By_One)
__0printf$8 0x080022d9 Thumb Code 22 printf8.o(i.__0printf$8)
__1printf$8 0x080022d9 Thumb Code 0 printf8.o(i.__0printf$8)
__2printf 0x080022d9 Thumb Code 0 printf8.o(i.__0printf$8)
__0sprintf$8 0x080022f9 Thumb Code 34 printf8.o(i.__0sprintf$8)
__1sprintf$8 0x080022f9 Thumb Code 0 printf8.o(i.__0sprintf$8)
__2sprintf 0x080022f9 Thumb Code 0 printf8.o(i.__0sprintf$8)
__scatterload_copy 0x08002419 Thumb Code 14 handlers.o(i.__scatterload_copy)
__scatterload_null 0x08002427 Thumb Code 2 handlers.o(i.__scatterload_null)
__scatterload_zeroinit 0x08002429 Thumb Code 14 handlers.o(i.__scatterload_zeroinit)
fputc 0x08002899 Thumb Code 30 usart.o(i.fputc)
hex2str 0x080028ed Thumb Code 78 usart.o(i.hex2str)
main 0x0800293d Thumb Code 592 main.o(i.main)
AHBPrescTable 0x08002c49 Data 16 system_stm32f1xx.o(.constdata)
APBPrescTable 0x08002c59 Data 8 system_stm32f1xx.o(.constdata)
Region$$Table$$Base 0x08002c64 Number 0 anon$$obj.o(Region$$Table)
Region$$Table$$Limit 0x08002c84 Number 0 anon$$obj.o(Region$$Table)
Set_PCR_Parameter 0x08001b55 Thumb Code 458 usart.o(i.Set_PCR_Parameter)
SysTick_Handler 0x08001db5 Thumb Code 2 stm32f1xx_it.o(i.SysTick_Handler)
SystemClock_Config 0x08001db9 Thumb Code 314 main.o(i.SystemClock_Config)
SystemInit 0x08001f01 Thumb Code 70 system_stm32f1xx.o(i.SystemInit)
TIM2_DMA_Config 0x08001f59 Thumb Code 142 tim.o(i.TIM2_DMA_Config)
TIM2_IRQHandler 0x08001ff9 Thumb Code 2 stm32f1xx_it.o(i.TIM2_IRQHandler)
TIM3_IRQHandler 0x08001ffd Thumb Code 60 stm32f1xx_it.o(i.TIM3_IRQHandler)
USART1_IRQHandler 0x08002049 Thumb Code 132 stm32f1xx_it.o(i.USART1_IRQHandler)
USART3_IRQHandler 0x080020e1 Thumb Code 24 stm32f1xx_it.o(i.USART3_IRQHandler)
UsageFault_Handler 0x08002101 Thumb Code 4 stm32f1xx_it.o(i.UsageFault_Handler)
Usart_SendByte 0x08002105 Thumb Code 28 usart.o(i.Usart_SendByte)
Usart_SendString 0x08002121 Thumb Code 40 usart.o(i.Usart_SendString)
WS2812_Data_Transfer 0x08002149 Thumb Code 94 tim.o(i.WS2812_Data_Transfer)
WS2812_Light_All 0x080021ad Thumb Code 160 tim.o(i.WS2812_Light_All)
WS2812_Light_Custom 0x0800224d Thumb Code 74 tim.o(i.WS2812_Light_Custom)
WS2812_Light_One_By_One 0x0800229d Thumb Code 58 tim.o(i.WS2812_Light_One_By_One)
__0printf$8 0x080022dd Thumb Code 22 printf8.o(i.__0printf$8)
__1printf$8 0x080022dd Thumb Code 0 printf8.o(i.__0printf$8)
__2printf 0x080022dd Thumb Code 0 printf8.o(i.__0printf$8)
__0sprintf$8 0x080022fd Thumb Code 34 printf8.o(i.__0sprintf$8)
__1sprintf$8 0x080022fd Thumb Code 0 printf8.o(i.__0sprintf$8)
__2sprintf 0x080022fd Thumb Code 0 printf8.o(i.__0sprintf$8)
__scatterload_copy 0x0800241d Thumb Code 14 handlers.o(i.__scatterload_copy)
__scatterload_null 0x0800242b Thumb Code 2 handlers.o(i.__scatterload_null)
__scatterload_zeroinit 0x0800242d Thumb Code 14 handlers.o(i.__scatterload_zeroinit)
fputc 0x0800289d Thumb Code 30 usart.o(i.fputc)
hex2str 0x080028f1 Thumb Code 78 usart.o(i.hex2str)
main 0x08002941 Thumb Code 608 main.o(i.main)
AHBPrescTable 0x08002c61 Data 16 system_stm32f1xx.o(.constdata)
APBPrescTable 0x08002c71 Data 8 system_stm32f1xx.o(.constdata)
Region$$Table$$Base 0x08002c7c Number 0 anon$$obj.o(Region$$Table)
Region$$Table$$Limit 0x08002c9c Number 0 anon$$obj.o(Region$$Table)
Work_Mode 0x20000000 Data 1 main.o(.data)
Joined_Mode 0x20000001 Data 1 main.o(.data)
puColor 0x20000002 Data 1 main.o(.data)
Door_Changed_Flag 0x20000003 Data 1 main.o(.data)
Heart_Beat_Flag 0x20000004 Data 1 main.o(.data)
Radar_Data_Flag 0x20000005 Data 1 main.o(.data)
Heart_Beat_Period 0x20000006 Data 2 main.o(.data)
Occupancy_Status 0x20000008 Data 1 main.o(.data)
WS2812B_CRR_Value 0x20000009 Data 193 tim.o(.data)
Accept_Finished_Flag 0x200000ca Data 1 usart.o(.data)
Buffer_INDEX 0x200000cc Data 2 usart.o(.data)
Previous_INDEX 0x200000ce Data 2 usart.o(.data)
Motion_Flag 0x200000d0 Data 1 usart.o(.data)
netColor 0x20000003 Data 1 main.o(.data)
Door_Changed_Flag 0x20000004 Data 1 main.o(.data)
Heart_Beat_Flag 0x20000005 Data 1 main.o(.data)
Radar_Data_Flag 0x20000006 Data 1 main.o(.data)
Heart_Beat_Period 0x20000008 Data 2 main.o(.data)
Occupancy_Status 0x2000000a Data 1 main.o(.data)
WS2812B_CRR_Value 0x2000000b Data 193 tim.o(.data)
Accept_Finished_Flag 0x200000cc Data 1 usart.o(.data)
Buffer_INDEX 0x200000ce Data 2 usart.o(.data)
Previous_INDEX 0x200000d0 Data 2 usart.o(.data)
Motion_Flag 0x200000d2 Data 1 usart.o(.data)
SystemCoreClock 0x200000d8 Data 4 system_stm32f1xx.o(.data)
__stdout 0x200000dc Data 4 stdout.o(.data)
WS2812B_DATA 0x200000e0 Data 24 tim.o(.bss)
@ -1248,9 +1249,9 @@ Memory Map of the image
Image Entry point : 0x080000ed
Load Region LR_IROM1 (Base: 0x08000000, Size: 0x00002d64, Max: 0x00010000, ABSOLUTE)
Load Region LR_IROM1 (Base: 0x08000000, Size: 0x00002d7c, Max: 0x00010000, ABSOLUTE)
Execution Region ER_IROM1 (Exec base: 0x08000000, Load base: 0x08000000, Size: 0x00002c84, Max: 0x00010000, ABSOLUTE)
Execution Region ER_IROM1 (Exec base: 0x08000000, Load base: 0x08000000, Size: 0x00002c9c, Max: 0x00010000, ABSOLUTE)
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
@ -1374,72 +1375,71 @@ Memory Map of the image
0x08001ad0 0x08001ad0 0x00000080 Code RO 17 i.Reed_Working main.o
0x08001b50 0x08001b50 0x00000002 Code RO 732 i.SVC_Handler stm32f1xx_it.o
0x08001b52 0x08001b52 0x00000002 PAD
0x08001b54 0x08001b54 0x0000025c Code RO 469 i.Set_PCR_Parameter usart.o
0x08001db0 0x08001db0 0x00000002 Code RO 733 i.SysTick_Handler stm32f1xx_it.o
0x08001db2 0x08001db2 0x00000002 PAD
0x08001db4 0x08001db4 0x00000148 Code RO 18 i.SystemClock_Config main.o
0x08001efc 0x08001efc 0x00000058 Code RO 1495 i.SystemInit system_stm32f1xx.o
0x08001f54 0x08001f54 0x000000a0 Code RO 322 i.TIM2_DMA_Config tim.o
0x08001ff4 0x08001ff4 0x00000002 Code RO 734 i.TIM2_IRQHandler stm32f1xx_it.o
0x08001ff6 0x08001ff6 0x00000002 PAD
0x08001ff8 0x08001ff8 0x0000004c Code RO 735 i.TIM3_IRQHandler stm32f1xx_it.o
0x08002044 0x08002044 0x00000098 Code RO 736 i.USART1_IRQHandler stm32f1xx_it.o
0x080020dc 0x080020dc 0x00000020 Code RO 737 i.USART3_IRQHandler stm32f1xx_it.o
0x080020fc 0x080020fc 0x00000004 Code RO 738 i.UsageFault_Handler stm32f1xx_it.o
0x08002100 0x08002100 0x0000001c Code RO 471 i.Usart_SendByte usart.o
0x0800211c 0x0800211c 0x00000028 Code RO 472 i.Usart_SendString usart.o
0x08002144 0x08002144 0x00000064 Code RO 323 i.WS2812_Data_Transfer tim.o
0x080021a8 0x080021a8 0x000000a0 Code RO 324 i.WS2812_Light_All tim.o
0x08002248 0x08002248 0x00000050 Code RO 325 i.WS2812_Light_Custom tim.o
0x08002298 0x08002298 0x00000040 Code RO 326 i.WS2812_Light_One_By_One tim.o
0x080022d8 0x080022d8 0x00000020 Code RO 1746 i.__0printf$8 mc_w.l(printf8.o)
0x080022f8 0x080022f8 0x00000028 Code RO 1748 i.__0sprintf$8 mc_w.l(printf8.o)
0x08002320 0x08002320 0x0000001a Code RO 223 i.__NVIC_EnableIRQ dma.o
0x0800233a 0x0800233a 0x0000001a Code RO 327 i.__NVIC_EnableIRQ tim.o
0x08002354 0x08002354 0x0000001a Code RO 473 i.__NVIC_EnableIRQ usart.o
0x0800236e 0x0800236e 0x00000002 PAD
0x08002370 0x08002370 0x00000010 Code RO 224 i.__NVIC_GetPriorityGrouping dma.o
0x08002380 0x08002380 0x00000010 Code RO 328 i.__NVIC_GetPriorityGrouping tim.o
0x08002390 0x08002390 0x00000010 Code RO 474 i.__NVIC_GetPriorityGrouping usart.o
0x080023a0 0x080023a0 0x00000028 Code RO 225 i.__NVIC_SetPriority dma.o
0x080023c8 0x080023c8 0x00000028 Code RO 329 i.__NVIC_SetPriority tim.o
0x080023f0 0x080023f0 0x00000028 Code RO 475 i.__NVIC_SetPriority usart.o
0x08002418 0x08002418 0x0000000e Code RO 1844 i.__scatterload_copy mc_w.l(handlers.o)
0x08002426 0x08002426 0x00000002 Code RO 1845 i.__scatterload_null mc_w.l(handlers.o)
0x08002428 0x08002428 0x0000000e Code RO 1846 i.__scatterload_zeroinit mc_w.l(handlers.o)
0x08002436 0x08002436 0x00000002 PAD
0x08002438 0x08002438 0x00000404 Code RO 1753 i._printf_core mc_w.l(printf8.o)
0x0800283c 0x0800283c 0x00000024 Code RO 1754 i._printf_post_padding mc_w.l(printf8.o)
0x08002860 0x08002860 0x0000002e Code RO 1755 i._printf_pre_padding mc_w.l(printf8.o)
0x0800288e 0x0800288e 0x0000000a Code RO 1757 i._sputc mc_w.l(printf8.o)
0x08002898 0x08002898 0x00000024 Code RO 476 i.fputc usart.o
0x080028bc 0x080028bc 0x00000030 Code RO 477 i.hex2int usart.o
0x080028ec 0x080028ec 0x0000004e Code RO 478 i.hex2str usart.o
0x0800293a 0x0800293a 0x00000002 PAD
0x0800293c 0x0800293c 0x00000288 Code RO 19 i.main main.o
0x08002bc4 0x08002bc4 0x0000002a Data RO 331 .constdata tim.o
0x08002bee 0x08002bee 0x0000002a Data RO 480 .constdata usart.o
0x08002c18 0x08002c18 0x0000002a Data RO 739 .constdata stm32f1xx_it.o
0x08002c42 0x08002c42 0x00000007 Data RO 956 .constdata stm32f1xx_ll_dma.o
0x08002c49 0x08002c49 0x00000018 Data RO 1496 .constdata system_stm32f1xx.o
0x08002c61 0x08002c61 0x00000003 PAD
0x08002c64 0x08002c64 0x00000020 Data RO 1842 Region$$Table anon$$obj.o
0x08001b54 0x08001b54 0x00000260 Code RO 469 i.Set_PCR_Parameter usart.o
0x08001db4 0x08001db4 0x00000002 Code RO 733 i.SysTick_Handler stm32f1xx_it.o
0x08001db6 0x08001db6 0x00000002 PAD
0x08001db8 0x08001db8 0x00000148 Code RO 18 i.SystemClock_Config main.o
0x08001f00 0x08001f00 0x00000058 Code RO 1495 i.SystemInit system_stm32f1xx.o
0x08001f58 0x08001f58 0x000000a0 Code RO 322 i.TIM2_DMA_Config tim.o
0x08001ff8 0x08001ff8 0x00000002 Code RO 734 i.TIM2_IRQHandler stm32f1xx_it.o
0x08001ffa 0x08001ffa 0x00000002 PAD
0x08001ffc 0x08001ffc 0x0000004c Code RO 735 i.TIM3_IRQHandler stm32f1xx_it.o
0x08002048 0x08002048 0x00000098 Code RO 736 i.USART1_IRQHandler stm32f1xx_it.o
0x080020e0 0x080020e0 0x00000020 Code RO 737 i.USART3_IRQHandler stm32f1xx_it.o
0x08002100 0x08002100 0x00000004 Code RO 738 i.UsageFault_Handler stm32f1xx_it.o
0x08002104 0x08002104 0x0000001c Code RO 471 i.Usart_SendByte usart.o
0x08002120 0x08002120 0x00000028 Code RO 472 i.Usart_SendString usart.o
0x08002148 0x08002148 0x00000064 Code RO 323 i.WS2812_Data_Transfer tim.o
0x080021ac 0x080021ac 0x000000a0 Code RO 324 i.WS2812_Light_All tim.o
0x0800224c 0x0800224c 0x00000050 Code RO 325 i.WS2812_Light_Custom tim.o
0x0800229c 0x0800229c 0x00000040 Code RO 326 i.WS2812_Light_One_By_One tim.o
0x080022dc 0x080022dc 0x00000020 Code RO 1746 i.__0printf$8 mc_w.l(printf8.o)
0x080022fc 0x080022fc 0x00000028 Code RO 1748 i.__0sprintf$8 mc_w.l(printf8.o)
0x08002324 0x08002324 0x0000001a Code RO 223 i.__NVIC_EnableIRQ dma.o
0x0800233e 0x0800233e 0x0000001a Code RO 327 i.__NVIC_EnableIRQ tim.o
0x08002358 0x08002358 0x0000001a Code RO 473 i.__NVIC_EnableIRQ usart.o
0x08002372 0x08002372 0x00000002 PAD
0x08002374 0x08002374 0x00000010 Code RO 224 i.__NVIC_GetPriorityGrouping dma.o
0x08002384 0x08002384 0x00000010 Code RO 328 i.__NVIC_GetPriorityGrouping tim.o
0x08002394 0x08002394 0x00000010 Code RO 474 i.__NVIC_GetPriorityGrouping usart.o
0x080023a4 0x080023a4 0x00000028 Code RO 225 i.__NVIC_SetPriority dma.o
0x080023cc 0x080023cc 0x00000028 Code RO 329 i.__NVIC_SetPriority tim.o
0x080023f4 0x080023f4 0x00000028 Code RO 475 i.__NVIC_SetPriority usart.o
0x0800241c 0x0800241c 0x0000000e Code RO 1844 i.__scatterload_copy mc_w.l(handlers.o)
0x0800242a 0x0800242a 0x00000002 Code RO 1845 i.__scatterload_null mc_w.l(handlers.o)
0x0800242c 0x0800242c 0x0000000e Code RO 1846 i.__scatterload_zeroinit mc_w.l(handlers.o)
0x0800243a 0x0800243a 0x00000002 PAD
0x0800243c 0x0800243c 0x00000404 Code RO 1753 i._printf_core mc_w.l(printf8.o)
0x08002840 0x08002840 0x00000024 Code RO 1754 i._printf_post_padding mc_w.l(printf8.o)
0x08002864 0x08002864 0x0000002e Code RO 1755 i._printf_pre_padding mc_w.l(printf8.o)
0x08002892 0x08002892 0x0000000a Code RO 1757 i._sputc mc_w.l(printf8.o)
0x0800289c 0x0800289c 0x00000024 Code RO 476 i.fputc usart.o
0x080028c0 0x080028c0 0x00000030 Code RO 477 i.hex2int usart.o
0x080028f0 0x080028f0 0x0000004e Code RO 478 i.hex2str usart.o
0x0800293e 0x0800293e 0x00000002 PAD
0x08002940 0x08002940 0x0000029c Code RO 19 i.main main.o
0x08002bdc 0x08002bdc 0x0000002a Data RO 331 .constdata tim.o
0x08002c06 0x08002c06 0x0000002a Data RO 480 .constdata usart.o
0x08002c30 0x08002c30 0x0000002a Data RO 739 .constdata stm32f1xx_it.o
0x08002c5a 0x08002c5a 0x00000007 Data RO 956 .constdata stm32f1xx_ll_dma.o
0x08002c61 0x08002c61 0x00000018 Data RO 1496 .constdata system_stm32f1xx.o
0x08002c79 0x08002c79 0x00000003 PAD
0x08002c7c 0x08002c7c 0x00000020 Data RO 1842 Region$$Table anon$$obj.o
Execution Region RW_IRAM1 (Exec base: 0x20000000, Load base: 0x08002c84, Size: 0x00000620, Max: 0x00005000, ABSOLUTE)
Execution Region RW_IRAM1 (Exec base: 0x20000000, Load base: 0x08002c9c, Size: 0x00000620, Max: 0x00005000, ABSOLUTE)
Exec Addr Load Addr Size Type Attr Idx E Section Name Object
0x20000000 0x08002c84 0x00000009 Data RW 21 .data main.o
0x20000009 0x08002c8d 0x000000c1 Data RW 332 .data tim.o
0x200000ca 0x08002d4e 0x0000000a Data RW 481 .data usart.o
0x200000d4 0x08002d58 0x00000002 Data RW 740 .data stm32f1xx_it.o
0x200000d6 0x08002d5a 0x00000002 PAD
0x200000d8 0x08002d5c 0x00000004 Data RW 1497 .data system_stm32f1xx.o
0x200000dc 0x08002d60 0x00000004 Data RW 1816 .data mc_w.l(stdout.o)
0x20000000 0x08002c9c 0x0000000b Data RW 21 .data main.o
0x2000000b 0x08002ca7 0x000000c1 Data RW 332 .data tim.o
0x200000cc 0x08002d68 0x0000000a Data RW 481 .data usart.o
0x200000d6 0x08002d72 0x00000002 Data RW 740 .data stm32f1xx_it.o
0x200000d8 0x08002d74 0x00000004 Data RW 1497 .data system_stm32f1xx.o
0x200000dc 0x08002d78 0x00000004 Data RW 1816 .data mc_w.l(stdout.o)
0x200000e0 - 0x00000018 Zero RW 330 .bss tim.o
0x200000f8 - 0x00000123 Zero RW 479 .bss usart.o
0x2000021b 0x08002d64 0x00000005 PAD
0x2000021b 0x08002d7c 0x00000005 PAD
0x20000220 - 0x00000400 Zero RW 1 STACK startup_stm32f103xb.o
@ -1453,7 +1453,7 @@ Image component sizes
270 20 0 0 0 38001 dma.o
388 24 0 0 0 46342 gpio.o
80 6 0 0 0 2431 iwdg.o
1196 90 0 9 0 436352 main.o
1216 94 0 11 0 436401 main.o
36 8 236 0 1024 780 startup_stm32f103xb.o
410 58 42 2 0 58654 stm32f1xx_it.o
120 6 7 0 0 14394 stm32f1xx_ll_dma.o
@ -1465,12 +1465,12 @@ Image component sizes
80 6 0 0 0 5297 stm32f1xx_ll_utils.o
88 18 24 4 0 1091 system_stm32f1xx.o
1494 106 42 193 24 46299 tim.o
3370 516 42 10 291 79159 usart.o
3374 516 42 10 291 79159 usart.o
----------------------------------------------------------------------
9418 984 428 220 1344 808750 Object Totals
9442 988 428 220 1344 808799 Object Totals
0 0 32 0 0 0 (incl. Generated)
22 0 3 2 5 0 (incl. Padding)
22 0 3 0 5 0 (incl. Padding)
----------------------------------------------------------------------
@ -1517,15 +1517,15 @@ Image component sizes
Code (inc. data) RO Data RW Data ZI Data Debug
10968 1060 428 224 1344 803430 Grand Totals
10968 1060 428 224 1344 803430 ELF Image Totals
10968 1060 428 224 0 0 ROM Totals
10992 1064 428 224 1344 803479 Grand Totals
10992 1064 428 224 1344 803479 ELF Image Totals
10992 1064 428 224 0 0 ROM Totals
==============================================================================
Total RO Size (Code + RO Data) 11396 ( 11.13kB)
Total RO Size (Code + RO Data) 11420 ( 11.15kB)
Total RW Size (RW Data + ZI Data) 1568 ( 1.53kB)
Total ROM Size (Code + RO Data + RW Data) 11620 ( 11.35kB)
Total ROM Size (Code + RO Data + RW Data) 11644 ( 11.37kB)
==============================================================================

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -54,6 +54,7 @@ volatile uint8_t Work_Mode = Reed_Radar_Dual_Mode; // STS_O1 Work_Mode
volatile uint8_t Joined_Mode = 0;
volatile uint8_t puColor = 0;
volatile uint8_t netColor = 0; //Cloud instructed color change 2022-09-21 sundp
volatile uint8_t Door_Changed_Flag = 1;
volatile uint8_t Heart_Beat_Flag = 0;
volatile uint8_t Radar_Data_Flag = 0; // STS_O1 radar data flag
@ -147,72 +148,70 @@ int main(void)
if(Joined_Mode == 1)
{
Online_Data_Analysis(&puColor);
Online_Data_Analysis(&netColor); // received puColor and work mode from cloud
if(Work_Mode == Network_Mode) //Network_Mode, cloud control
{
WS2812_Light_All(puColor);
puColor = netColor; // color code from cloud "OR" logic with secondary presence sensor
WS2812_Light_All(puColor);
// ************** change for TWSC Dual occupancy sensor 2022-05-24 ********************
if (Radar_Data_Flag == 1) // STS_O1 if any of status changed, door or presence sensor
{
{
Radar_Filtering_clutter(&puColor); // STS_O1 For Radar
// puColor = Red;
// puColor = Red;
if (puColor == Red)
WS2812_Light_All(puColor); // STS_O1 For Radar
Radar_Data_Flag = 0; // STS_O1 For Radar
}
// } else if (Door_Changed_Flag == 1)
// {
// puColor = (Door_Status==1? Red:Green);
// WS2812_Light_All(puColor);
// Door_Changed_Flag = 0;
// }
}
// } else if (Door_Changed_Flag == 1)
// {
// puColor = (Door_Status==1? Red:Green);
// WS2812_Light_All(puColor);
// Door_Changed_Flag = 0;
// }
// ************** change for TWSC Dual occupancy sensor 2022-05-24 ********************
}
// if(Work_Mode == Reed_Mode && Door_Changed_Flag == 1) //Reedswitch or Hall Element mode
// {
// Door_Changed_Flag = 0;
// WS2812_Light_All(puColor);
// Reed_Working();
// }
// if(Work_Mode == Reed_Mode && Door_Changed_Flag == 1) //Reedswitch or Hall Element mode
// {
// Door_Changed_Flag = 0;
// WS2812_Light_All(puColor);
// Reed_Working();
// }
if(Work_Mode == Reed_Mode) //Reedswitch or Hall Element mode
if(Work_Mode == Reed_Mode) //Reedswitch or Hall Element mode
{
if(Door_Changed_Flag == 1)
{
// WS2812_Light_All(puColor);
//Reed_Working();
WS2812_Light_Custom( Light_Level,0,0 );
puColor = Red;
// Door_Changed_Flag = 0;
// WS2812_Light_All(puColor);
//Reed_Working();
WS2812_Light_Custom( Light_Level,0,0 );
puColor = Red;
// Door_Changed_Flag = 0;
}
}
if(Work_Mode == Radar_Mode) // STS_O1 For Radar
if(Work_Mode == Radar_Mode) // STS_O1 For Radar
{
if(Radar_Data_Flag == 1) // STS_O1 For Radar
{
Radar_Filtering_clutter(&puColor); // STS_O1 For Radar
WS2812_Light_All(puColor); // STS_O1 For Radar
Radar_Data_Flag = 0; // STS_O1 For Radar
}
}
}
if (Work_Mode == Reed_Radar_Dual_Mode) // Dual mode of Reed & Radar
if (Work_Mode == Reed_Radar_Dual_Mode) // Dual mode of Reed & Radar
{
if (Radar_Data_Flag == 1) // STS_O1 if any of status changed, door or presence sensor
{
Radar_Filtering_clutter(&puColor); // STS_O1 For Radar
// puColor = Red;
// puColor = Red;
WS2812_Light_All(puColor); // STS_O1 For Radar
Radar_Data_Flag = 0; // STS_O1 For Radar
@ -223,43 +222,44 @@ int main(void)
Door_Changed_Flag = 0;
}
}
if(Heart_Beat_Flag == 1)
{
Heart_Beat_Flag = 0;
if (Work_Mode != Network_Mode) {
if ((Occupancy_Status == 0) && (Door_Status) )
if (Work_Mode != Network_Mode)
{
puColor = 1; // green
Node_Send_Data(sendhtbtport,UnConfirmed, puColor, Work_Mode, Door_Status, Occupancy_Status);
if ((Occupancy_Status == 0) && (Door_Status) )
{
puColor = 1; // green
Node_Send_Data(sendhtbtport,UnConfirmed, puColor, Work_Mode, Door_Status, Occupancy_Status);
} else if ((Occupancy_Status == 1) || (Door_Status == 0))
{
puColor = 2; // red
Node_Send_Data(sendhtbtport,UnConfirmed, puColor, Work_Mode, Door_Status, Occupancy_Status);
} else
if ((Occupancy_Status == 1) || (Door_Status == 0))
{
puColor = 2; // red
Node_Send_Data(sendhtbtport,UnConfirmed, puColor, Work_Mode, Door_Status, Occupancy_Status);
}
WS2812_Light_All(puColor);
// M100C_Send_HeartBeat(puColor,Work_Mode); // STS_O1 upload current color LED and Work_Mode
// Node_Send_Data(senddataport,UnConfirmed, puColor, Work_Mode, Door_Status, Radar_Data_Flag);
// Node_Send_Data(sendhtbtport,UnConfirmed, puColor, Work_Mode, Door_Status, Occupancy_Status);
}
WS2812_Light_All(puColor);
// M100C_Send_HeartBeat(puColor,Work_Mode); // STS_O1 upload current color LED and Work_Mode
// Node_Send_Data(senddataport,UnConfirmed, puColor, Work_Mode, Door_Status, Radar_Data_Flag);
// Node_Send_Data(sendhtbtport,UnConfirmed, puColor, Work_Mode, Door_Status, Occupancy_Status);
} else {
Node_Send_Data(sendhtbtport,UnConfirmed, puColor, Work_Mode, Door_Status, Occupancy_Status);
}
} else
{
Node_Send_Data(sendhtbtport,UnConfirmed, puColor, Work_Mode, Door_Status, Occupancy_Status);
}
}
}
} /* if joined_mode */
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
} /* while (1) */
/* USER CODE END 3 */
}
} /* main */
/**
* @brief System Clock Configuration

View File

@ -275,14 +275,14 @@ void Online_Data_Analysis(volatile uint8_t *Color) // Cloud command parsing fr
hex2str(hex_str , char_str);
/* 工作模式 */
//网络控制 0
//有线控制 1
//磁铁控制 2
//雷达控制 3
//Dual Mode 双模式控制 4
/* 工作模式 */
/* 工作模式 */
//网络控制 0
//有线控制 1
//磁铁控制 2
//雷达控制 3
// Dual Mode 控制 4
/* 工作模式 */
if(char_str[0] == '0') // Config work Mode="0,1,2,3,4" or Config Radar Parameter="P"
{
Work_Mode = char_str[0] - '0'; // Config work Mode = {0} Network_Mode
@ -342,10 +342,7 @@ void Online_Data_Analysis(volatile uint8_t *Color) // Cloud command parsing fr
// {
// Set_PCR_Parameter((char *)&USART1_RX_Buffer[index+3]);
// }
memset(USART1_RX_Buffer,0,sizeof(USART1_RX_Buffer));
}
@ -427,9 +424,9 @@ void Set_PCR_Parameter(char *str,uint8_t len)
LL_mDelay(500);
// printf("AT+LRSEND=10,0,2,<4F4B\r\n"); "OK" printf("AT+LRSEND=%d,%d,%d,<00\r\n",port,confirm,1); break; }
printf("AT+LRSEND=13,0,7,<%04x%04x%04x%02x\r\n",
printf("AT+LRSEND=%d,0,7,<%04x%04x%04x%02x\r\n",cmdreplyport, /* change to port 13= cmdreplyport to align with other config 2022-09-21 sundp */
PCR_parameter.Start,PCR_parameter.End,PCR_parameter.Threshold,PCR_parameter.Gain);
//change to port 13 to align with other config
//change to port 13= cmdreplyport to align with other config /* 2022-09-21 sundp */
PCR PCR_parameter;
printf("Set Start=%dmm\r\n",PCR_parameter.Start);
printf("Set end=%dmm\r\n",PCR_parameter.End);