| @ -839,6 +839,7 @@ Section Cross References | |||||
| bsp.o(i.touch_buzzer) refers to bsp.o(.data) for .data | bsp.o(i.touch_buzzer) refers to bsp.o(.data) for .data | ||||
| ota_mcu.o(i.OTA_APP_MCU) refers to memseta.o(.text) for __aeabi_memclr4 | ota_mcu.o(i.OTA_APP_MCU) refers to memseta.o(.text) for __aeabi_memclr4 | ||||
| msg.o(i.receive_wifi_analysis) refers to msg.o(i.comm_message_checksum) for comm_message_checksum | msg.o(i.receive_wifi_analysis) refers to msg.o(i.comm_message_checksum) for comm_message_checksum | ||||
| msg.o(i.receive_wifi_analysis) refers to msg.o(.bss) for .bss | |||||
| msg.o(i.send_mes_mcu) refers to uart.o(i.SendData_SCI1) for SendData_SCI1 | msg.o(i.send_mes_mcu) refers to uart.o(i.SendData_SCI1) for SendData_SCI1 | ||||
| msg.o(i.send_mes_wifi) refers to uart.o(i.SendData_SCI3) for SendData_SCI3 | msg.o(i.send_mes_wifi) refers to uart.o(i.SendData_SCI3) for SendData_SCI3 | ||||
| msg.o(i.send_wifi_package) refers to memseta.o(.text) for __aeabi_memclr | msg.o(i.send_wifi_package) refers to memseta.o(.text) for __aeabi_memclr | ||||
| @ -5576,7 +5577,7 @@ Removing Unused input sections from the image. | |||||
| Removing msg.o(i.comm_message_checksum), (32 bytes). | Removing msg.o(i.comm_message_checksum), (32 bytes). | ||||
| Removing msg.o(i.debug_flag), (2 bytes). | Removing msg.o(i.debug_flag), (2 bytes). | ||||
| Removing msg.o(i.debug_status), (2 bytes). | Removing msg.o(i.debug_status), (2 bytes). | ||||
| Removing msg.o(i.receive_wifi_analysis), (128 bytes). | |||||
| Removing msg.o(i.receive_wifi_analysis), (200 bytes). | |||||
| Removing msg.o(i.recev_mcu_package), (2 bytes). | Removing msg.o(i.recev_mcu_package), (2 bytes). | ||||
| Removing msg.o(i.send_mcu_package), (2 bytes). | Removing msg.o(i.send_mcu_package), (2 bytes). | ||||
| Removing msg.o(i.send_mes_mcu), (28 bytes). | Removing msg.o(i.send_mes_mcu), (28 bytes). | ||||
| @ -6975,7 +6976,7 @@ Removing Unused input sections from the image. | |||||
| Removing dfltl.o(.text), (40 bytes). | Removing dfltl.o(.text), (40 bytes). | ||||
| Removing dfixui.o(.text), (50 bytes). | Removing dfixui.o(.text), (50 bytes). | ||||
| 1445 unused section(s) (total 238088 bytes) removed from the image. | |||||
| 1445 unused section(s) (total 238160 bytes) removed from the image. | |||||
| ============================================================================== | ============================================================================== | ||||
| @ -22,86 +22,86 @@ Dialog DLL: TCM.DLL V1.48.0.0 | |||||
| <h2>Project:</h2> | <h2>Project:</h2> | ||||
| C:\Users\14874\Desktop\720-github\LT7689\LT-7689\LT7689.uvprojx | C:\Users\14874\Desktop\720-github\LT7689\LT-7689\LT7689.uvprojx | ||||
| Project File Date: 03/06/2025 | |||||
| Project File Date: 03/07/2025 | |||||
| <h2>Output:</h2> | <h2>Output:</h2> | ||||
| *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\keil5Mdk\Keil5_MDK\ARM\ARMCC\Bin' | *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\keil5Mdk\Keil5_MDK\ARM\ARMCC\Bin' | ||||
| Rebuild target 'LT7689' | Rebuild target 'LT7689' | ||||
| compiling OTA_mcu.c... | compiling OTA_mcu.c... | ||||
| compiling OTA_P.c... | compiling OTA_P.c... | ||||
| compiling common.c... | |||||
| compiling msg.c... | compiling msg.c... | ||||
| compiling bsp_user.c... | compiling bsp_user.c... | ||||
| compiling common.c... | |||||
| compiling main.c... | compiling main.c... | ||||
| assembling startup_ARMCM4.s... | assembling startup_ARMCM4.s... | ||||
| compiling sys.c... | |||||
| compiling system_ARMCM4.c... | compiling system_ARMCM4.c... | ||||
| compiling adc_drv.c... | |||||
| compiling sys.c... | |||||
| compiling adc_dma.c... | compiling adc_dma.c... | ||||
| compiling adc_drv.c... | |||||
| compiling alg_drv.c... | |||||
| compiling cache_drv.c... | compiling cache_drv.c... | ||||
| compiling ccm_drv.c... | compiling ccm_drv.c... | ||||
| compiling alg_drv.c... | |||||
| compiling cpm_drv.c... | compiling cpm_drv.c... | ||||
| compiling crc_drv.c... | compiling crc_drv.c... | ||||
| compiling dac_drv.c... | compiling dac_drv.c... | ||||
| compiling dmac_drv.c... | |||||
| compiling edma_drv.c... | compiling edma_drv.c... | ||||
| compiling eflash_drv.c... | compiling eflash_drv.c... | ||||
| compiling dmac_drv.c... | |||||
| compiling i2c_drv.c... | compiling i2c_drv.c... | ||||
| compiling ioctrl_drv.c... | compiling ioctrl_drv.c... | ||||
| compiling eport_drv.c... | compiling eport_drv.c... | ||||
| compiling pci_drv.c... | |||||
| compiling pit32_drv.c... | compiling pit32_drv.c... | ||||
| compiling reset_drv.c... | |||||
| compiling pwm_drv.c... | compiling pwm_drv.c... | ||||
| compiling pci_drv.c... | |||||
| compiling rtc_drv.c... | compiling rtc_drv.c... | ||||
| compiling reset_drv.c... | |||||
| compiling spi_drv.c... | compiling spi_drv.c... | ||||
| compiling systick_drv.c... | compiling systick_drv.c... | ||||
| compiling ssi_drv.c... | |||||
| compiling tc_drv.c... | compiling tc_drv.c... | ||||
| compiling ssi_drv.c... | |||||
| compiling trng_drv.c... | compiling trng_drv.c... | ||||
| compiling uart_drv.c... | |||||
| compiling wdt_drv.c... | compiling wdt_drv.c... | ||||
| compiling usb_hid_isr.c... | compiling usb_hid_isr.c... | ||||
| compiling uart_drv.c... | |||||
| compiling usb_hid_control.c... | compiling usb_hid_control.c... | ||||
| compiling usb_drv.c... | compiling usb_drv.c... | ||||
| compiling usbdev_control.c... | |||||
| compiling usbdev_isr.c... | compiling usbdev_isr.c... | ||||
| compiling usb_cdc_config.c... | |||||
| compiling usb_ms_control.c... | |||||
| compiling usbdev_control.c... | |||||
| compiling usb_ms_config.c... | compiling usb_ms_config.c... | ||||
| compiling usb_ms_control.c... | |||||
| compiling usb_cdc_control.c... | compiling usb_cdc_control.c... | ||||
| compiling usb_ccid_contril.c... | |||||
| compiling usb_ccid_config.c... | compiling usb_ccid_config.c... | ||||
| compiling delay.c... | |||||
| compiling usb_cdc_config.c... | |||||
| compiling usb_ccid_contril.c... | |||||
| compiling dac.c... | |||||
| compiling dma.c... | compiling dma.c... | ||||
| compiling iic.c... | |||||
| compiling delay.c... | |||||
| compiling if_port.c... | compiling if_port.c... | ||||
| compiling dac.c... | |||||
| compiling iic.c... | |||||
| compiling pit.c... | compiling pit.c... | ||||
| compiling tp_drv.c... | compiling tp_drv.c... | ||||
| compiling data.c... | |||||
| compiling rtc.c... | compiling rtc.c... | ||||
| compiling uart.c... | compiling uart.c... | ||||
| compiling flash.c... | |||||
| compiling data.c... | |||||
| compiling ctp.c... | compiling ctp.c... | ||||
| compiling flash.c... | |||||
| compiling rtp.c... | |||||
| compiling w25qxx.c... | compiling w25qxx.c... | ||||
| compiling w25n01.c... | compiling w25n01.c... | ||||
| compiling rtp.c... | |||||
| compiling gbk.c... | |||||
| compiling sincostable.c... | |||||
| compiling LT768_Lib.c... | compiling LT768_Lib.c... | ||||
| compiling sincostable.c... | |||||
| compiling LT768.c... | compiling LT768.c... | ||||
| compiling gbk.c... | |||||
| compiling bitstream.c... | compiling bitstream.c... | ||||
| compiling mmask.c... | |||||
| compiling mask.c... | compiling mask.c... | ||||
| compiling mmask.c... | |||||
| compiling mqrspec.c... | compiling mqrspec.c... | ||||
| compiling bsp.c... | |||||
| compiling qrencode.c... | |||||
| compiling QR_Encode.c... | compiling QR_Encode.c... | ||||
| compiling rscode.c... | compiling rscode.c... | ||||
| compiling qrspec.c... | |||||
| compiling qrencode.c... | |||||
| compiling split.c... | compiling split.c... | ||||
| compiling qrspec.c... | |||||
| compiling bsp.c... | |||||
| compiling qrinput.c... | compiling qrinput.c... | ||||
| linking... | linking... | ||||
| Program Size: Code=174096 RO-data=6716 RW-data=708 ZI-data=222980 | Program Size: Code=174096 RO-data=6716 RW-data=708 ZI-data=222980 | ||||
| @ -120,7 +120,7 @@ Package Vendor: ARM | |||||
| D:\keil5Mdk\Keil5_MDK\Packs\ARM\CMSIS\5.7.0\Device\ARM\ARMCM4\Include | D:\keil5Mdk\Keil5_MDK\Packs\ARM\CMSIS\5.7.0\Device\ARM\ARMCM4\Include | ||||
| <h2>Collection of Component Files used:</h2> | <h2>Collection of Component Files used:</h2> | ||||
| Build Time Elapsed: 00:00:13 | |||||
| Build Time Elapsed: 00:00:14 | |||||
| </pre> | </pre> | ||||
| </body> | </body> | ||||
| </html> | </html> | ||||
| @ -6988,8 +6988,8 @@ | |||||
| :105480002F2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A77 | :105480002F2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A77 | ||||
| :105490002A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A6C | :105490002A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A6C | ||||
| :1054A0002A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A5C | :1054A0002A2A2A2A2A2A2A2A2A2A2A2A2A2A2A2A5C | ||||
| :1054B0002A2A2A2F0A00000031363A30383A313889 | |||||
| :1054C000000000004D61722020362032303235005D | |||||
| :1054B0002A2A2A2F0A00000030393A35363A30308D | |||||
| :1054C000000000004D61722020372032303235005C | |||||
| :1054D0002064617465203D2025732C74696D6520FE | :1054D0002064617465203D2025732C74696D6520FE | ||||
| :1054E0003D202573202020200D0A0000204C543739 | :1054E0003D202573202020200D0A0000204C543739 | ||||
| :1054F0003638395F4C6F6164446F776E5F55617207 | :1054F0003638395F4C6F6164446F776E5F55617207 | ||||
| @ -3,7 +3,7 @@ | |||||
| <title>Static Call Graph - [.\OBJ\obj_debug_efm\LT7689.axf]</title></head> | <title>Static Call Graph - [.\OBJ\obj_debug_efm\LT7689.axf]</title></head> | ||||
| <body><HR> | <body><HR> | ||||
| <H1>Static Call Graph for image .\OBJ\obj_debug_efm\LT7689.axf</H1><HR> | <H1>Static Call Graph for image .\OBJ\obj_debug_efm\LT7689.axf</H1><HR> | ||||
| <BR><P>#<CALLGRAPH># ARM Linker, 5060960: Last Updated: Thu Mar 06 16:08:30 2025 | |||||
| <BR><P>#<CALLGRAPH># ARM Linker, 5060960: Last Updated: Fri Mar 07 09:56:12 2025 | |||||
| <BR><P> | <BR><P> | ||||
| <H3>Maximum Stack Usage = 15944 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3> | <H3>Maximum Stack Usage = 15944 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3> | ||||
| Call chain for Maximum Stack Depth:</H3> | Call chain for Maximum Stack Depth:</H3> | ||||
| @ -1,7 +1,7 @@ | |||||
| Dependencies for Project 'LT7689', Target 'LT7689': (DO NOT MODIFY !) | Dependencies for Project 'LT7689', Target 'LT7689': (DO NOT MODIFY !) | ||||
| CompilerVersion: 5060960::V5.06 update 7 (build 960)::.\ARMCC | CompilerVersion: 5060960::V5.06 update 7 (build 960)::.\ARMCC | ||||
| F (.\User\main.c)(0x67C90EFC)(--c99 --gnu -c --cpu Cortex-M4.fp.sp -D__MICROLIB --li -g -W -O1 --apcs=interwork --split_sections -I .\ccore\common -I .\ccore -I .\Function -I .\Function_drv -I .\Levetoplib -I .\MCU_drv\drv\inc -I .\MCU_drv\drv\src -I .\MCU_drv\lib -I .\QRCODE -I .\User -I .\MCU_drv\drv\src\usb -ID:\keil5Mdk\Keil5_MDK\Packs\ARM\CMSIS\5.7.0\Device\ARM\ARMCM4\Include -D__UVISION_VERSION="534" -DARMCM4_FP -DARM_MATH_CM4 -DARM_MATH_MATRIX_CHECK -DARM_MATH_ROUNDING -D__CC_ARM -o .\obj\obj_debug_efm\main.o --omf_browse .\obj\obj_debug_efm\main.crf --depend .\obj\obj_debug_efm\main.d) | F (.\User\main.c)(0x67C90EFC)(--c99 --gnu -c --cpu Cortex-M4.fp.sp -D__MICROLIB --li -g -W -O1 --apcs=interwork --split_sections -I .\ccore\common -I .\ccore -I .\Function -I .\Function_drv -I .\Levetoplib -I .\MCU_drv\drv\inc -I .\MCU_drv\drv\src -I .\MCU_drv\lib -I .\QRCODE -I .\User -I .\MCU_drv\drv\src\usb -ID:\keil5Mdk\Keil5_MDK\Packs\ARM\CMSIS\5.7.0\Device\ARM\ARMCM4\Include -D__UVISION_VERSION="534" -DARMCM4_FP -DARM_MATH_CM4 -DARM_MATH_MATRIX_CHECK -DARM_MATH_ROUNDING -D__CC_ARM -o .\obj\obj_debug_efm\main.o --omf_browse .\obj\obj_debug_efm\main.crf --depend .\obj\obj_debug_efm\main.d) | ||||
| I (User\mes.h)(0x67C955D1) | |||||
| I (User\mes.h)(0x67CA51C7) | |||||
| I (.\ccore\common\type.h)(0x67B2F52B) | I (.\ccore\common\type.h)(0x67B2F52B) | ||||
| I (.\ccore\LT7689_C.h)(0x67B2F52B) | I (.\ccore\LT7689_C.h)(0x67B2F52B) | ||||
| I (.\ccore\core_cm4.h)(0x67B2F52B) | I (.\ccore\core_cm4.h)(0x67B2F52B) | ||||
| @ -177,8 +177,8 @@ I (D:\keil5Mdk\Keil5_MDK\ARM\ARMCC\include\string.h)(0x5E8E3CC2) | |||||
| F (.\User\OTA_P.c)(0x67B59DE2)(--c99 --gnu -c --cpu Cortex-M4.fp.sp -D__MICROLIB --li -g -W -O1 --apcs=interwork --split_sections -I .\ccore\common -I .\ccore -I .\Function -I .\Function_drv -I .\Levetoplib -I .\MCU_drv\drv\inc -I .\MCU_drv\drv\src -I .\MCU_drv\lib -I .\QRCODE -I .\User -I .\MCU_drv\drv\src\usb -ID:\keil5Mdk\Keil5_MDK\Packs\ARM\CMSIS\5.7.0\Device\ARM\ARMCM4\Include -D__UVISION_VERSION="534" -DARMCM4_FP -DARM_MATH_CM4 -DARM_MATH_MATRIX_CHECK -DARM_MATH_ROUNDING -D__CC_ARM -o .\obj\obj_debug_efm\ota_p.o --omf_browse .\obj\obj_debug_efm\ota_p.crf --depend .\obj\obj_debug_efm\ota_p.d) | F (.\User\OTA_P.c)(0x67B59DE2)(--c99 --gnu -c --cpu Cortex-M4.fp.sp -D__MICROLIB --li -g -W -O1 --apcs=interwork --split_sections -I .\ccore\common -I .\ccore -I .\Function -I .\Function_drv -I .\Levetoplib -I .\MCU_drv\drv\inc -I .\MCU_drv\drv\src -I .\MCU_drv\lib -I .\QRCODE -I .\User -I .\MCU_drv\drv\src\usb -ID:\keil5Mdk\Keil5_MDK\Packs\ARM\CMSIS\5.7.0\Device\ARM\ARMCM4\Include -D__UVISION_VERSION="534" -DARMCM4_FP -DARM_MATH_CM4 -DARM_MATH_MATRIX_CHECK -DARM_MATH_ROUNDING -D__CC_ARM -o .\obj\obj_debug_efm\ota_p.o --omf_browse .\obj\obj_debug_efm\ota_p.crf --depend .\obj\obj_debug_efm\ota_p.d) | ||||
| I (User\OTA_H.h)(0x67C80AC4) | I (User\OTA_H.h)(0x67C80AC4) | ||||
| F (.\User\OTA_H.h)(0x67C80AC4)() | F (.\User\OTA_H.h)(0x67C80AC4)() | ||||
| F (.\User\msg.c)(0x67C9575D)(--c99 --gnu -c --cpu Cortex-M4.fp.sp -D__MICROLIB --li -g -W -O1 --apcs=interwork --split_sections -I .\ccore\common -I .\ccore -I .\Function -I .\Function_drv -I .\Levetoplib -I .\MCU_drv\drv\inc -I .\MCU_drv\drv\src -I .\MCU_drv\lib -I .\QRCODE -I .\User -I .\MCU_drv\drv\src\usb -ID:\keil5Mdk\Keil5_MDK\Packs\ARM\CMSIS\5.7.0\Device\ARM\ARMCM4\Include -D__UVISION_VERSION="534" -DARMCM4_FP -DARM_MATH_CM4 -DARM_MATH_MATRIX_CHECK -DARM_MATH_ROUNDING -D__CC_ARM -o .\obj\obj_debug_efm\msg.o --omf_browse .\obj\obj_debug_efm\msg.crf --depend .\obj\obj_debug_efm\msg.d) | |||||
| I (User\mes.h)(0x67C955D1) | |||||
| F (.\User\msg.c)(0x67C961A0)(--c99 --gnu -c --cpu Cortex-M4.fp.sp -D__MICROLIB --li -g -W -O1 --apcs=interwork --split_sections -I .\ccore\common -I .\ccore -I .\Function -I .\Function_drv -I .\Levetoplib -I .\MCU_drv\drv\inc -I .\MCU_drv\drv\src -I .\MCU_drv\lib -I .\QRCODE -I .\User -I .\MCU_drv\drv\src\usb -ID:\keil5Mdk\Keil5_MDK\Packs\ARM\CMSIS\5.7.0\Device\ARM\ARMCM4\Include -D__UVISION_VERSION="534" -DARMCM4_FP -DARM_MATH_CM4 -DARM_MATH_MATRIX_CHECK -DARM_MATH_ROUNDING -D__CC_ARM -o .\obj\obj_debug_efm\msg.o --omf_browse .\obj\obj_debug_efm\msg.crf --depend .\obj\obj_debug_efm\msg.d) | |||||
| I (User\mes.h)(0x67CA51C7) | |||||
| I (.\ccore\common\type.h)(0x67B2F52B) | I (.\ccore\common\type.h)(0x67B2F52B) | ||||
| I (.\ccore\LT7689_C.h)(0x67B2F52B) | I (.\ccore\LT7689_C.h)(0x67B2F52B) | ||||
| I (.\ccore\core_cm4.h)(0x67B2F52B) | I (.\ccore\core_cm4.h)(0x67B2F52B) | ||||
| @ -188,7 +188,7 @@ I (.\ccore\cmsis_armcc.h)(0x67B2F52B) | |||||
| I (.\ccore\core_cmFunc.h)(0x67B2F52B) | I (.\ccore\core_cmFunc.h)(0x67B2F52B) | ||||
| I (.\ccore\core_cmSimd.h)(0x67B2F52B) | I (.\ccore\core_cmSimd.h)(0x67B2F52B) | ||||
| I (.\ccore\system_lt7689.h)(0x67B2F52B) | I (.\ccore\system_lt7689.h)(0x67B2F52B) | ||||
| F (.\User\mes.h)(0x67C955D1)() | |||||
| F (.\User\mes.h)(0x67CA51C7)() | |||||
| F (.\ccore\common\common.c)(0x67C93BC2)(--c99 --gnu -c --cpu Cortex-M4.fp.sp -D__MICROLIB --li -g -W -O1 --apcs=interwork --split_sections -I .\ccore\common -I .\ccore -I .\Function -I .\Function_drv -I .\Levetoplib -I .\MCU_drv\drv\inc -I .\MCU_drv\drv\src -I .\MCU_drv\lib -I .\QRCODE -I .\User -I .\MCU_drv\drv\src\usb -ID:\keil5Mdk\Keil5_MDK\Packs\ARM\CMSIS\5.7.0\Device\ARM\ARMCM4\Include -D__UVISION_VERSION="534" -DARMCM4_FP -DARM_MATH_CM4 -DARM_MATH_MATRIX_CHECK -DARM_MATH_ROUNDING -D__CC_ARM -o .\obj\obj_debug_efm\common.o --omf_browse .\obj\obj_debug_efm\common.crf --depend .\obj\obj_debug_efm\common.d) | F (.\ccore\common\common.c)(0x67C93BC2)(--c99 --gnu -c --cpu Cortex-M4.fp.sp -D__MICROLIB --li -g -W -O1 --apcs=interwork --split_sections -I .\ccore\common -I .\ccore -I .\Function -I .\Function_drv -I .\Levetoplib -I .\MCU_drv\drv\inc -I .\MCU_drv\drv\src -I .\MCU_drv\lib -I .\QRCODE -I .\User -I .\MCU_drv\drv\src\usb -ID:\keil5Mdk\Keil5_MDK\Packs\ARM\CMSIS\5.7.0\Device\ARM\ARMCM4\Include -D__UVISION_VERSION="534" -DARMCM4_FP -DARM_MATH_CM4 -DARM_MATH_MATRIX_CHECK -DARM_MATH_ROUNDING -D__CC_ARM -o .\obj\obj_debug_efm\common.o --omf_browse .\obj\obj_debug_efm\common.crf --depend .\obj\obj_debug_efm\common.d) | ||||
| I (ccore\common\common.h)(0x67B2F52B) | I (ccore\common\common.h)(0x67B2F52B) | ||||
| I (ccore\common\type.h)(0x67B2F52B) | I (ccore\common\type.h)(0x67B2F52B) | ||||
| @ -3,17 +3,39 @@ | |||||
| #include "type.h" | #include "type.h" | ||||
| //掩码 | |||||
| #define SWITCH_MASK_BIT_POWER_ALL 0x03 | |||||
| // 按键、变量 地址 | |||||
| //******按键地址****** | |||||
| #define SWITCH_KEY_ADDRESS //开关 | |||||
| #define MODE_KEY_ADDRESS //模式 | |||||
| #define WIND_SPEED_KEY_ADDRESS //风速 | |||||
| #define DEHUMIDIFICATION_KEY_ADDRESS //除湿 | |||||
| #define SCREEN_OFF_KEY_ADDRESS //熄屏 | |||||
| //******变量地址****** | |||||
| // 打印 标志位以及数据 的时长 | // 打印 标志位以及数据 的时长 | ||||
| #define DEBUG_STATUS_TIME 15 | |||||
| #define DEBUG_FLAG_TIME 10 | |||||
| #define DEBUG_STATUS_TIME 15 | |||||
| #define DEBUG_FLAG_TIME 10 | |||||
| //*******************模组数据包************************** | //*******************模组数据包************************** | ||||
| #if 1 | |||||
| #define WIFI_PACKAGE_HEAD 0xa55a | |||||
| #if 0 | |||||
| #define WIFI_PACKAGE_HEAD 0xa55a | |||||
| #endif | #endif | ||||
| // 接收wifi配置数据包的数据偏移 | |||||
| #define WIFI_CONTROL_DATA_OFFSET 8 | |||||
| //包头 | //包头 | ||||
| #define SEND_WIFI_PACKAGE_HEAD_FIRST 0xa5 | #define SEND_WIFI_PACKAGE_HEAD_FIRST 0xa5 | ||||
| #define SEND_WIFI_PACKAGE_HEAD_SECOND 0x5a | #define SEND_WIFI_PACKAGE_HEAD_SECOND 0x5a | ||||
| @ -28,7 +50,7 @@ | |||||
| //消息类型 | //消息类型 | ||||
| #define RECEIVE_WIFI_PACKAGE_CONFIGURATION 0x01 | #define RECEIVE_WIFI_PACKAGE_CONFIGURATION 0x01 | ||||
| #define RECEIVE_WIFI_PACKAGE_REQUEST 0x02 | #define RECEIVE_WIFI_PACKAGE_REQUEST 0x02 | ||||
| #define PACKAGE_ACK 0x03 | |||||
| #define PACKAGE_ACK 0x03 | |||||
| #define SEND_WIFI_PACKAGE_TYPE_UPDATE 0x04 | #define SEND_WIFI_PACKAGE_TYPE_UPDATE 0x04 | ||||
| @ -98,12 +98,13 @@ int send_wifi_package(uint8_t * buf ,uint8_t type, uint8_t cmd, uint8_t subCmd | |||||
| int receive_wifi_analysis(uint8_t * receive_wifi_buf,uint8_t length) | int receive_wifi_analysis(uint8_t * receive_wifi_buf,uint8_t length) | ||||
| { | { | ||||
| uint8_t pkg_seq = receive_wifi_buf[3]; | uint8_t pkg_seq = receive_wifi_buf[3]; | ||||
| uint8_t msg_type = receive_wifi_buf[4]; | uint8_t msg_type = receive_wifi_buf[4]; | ||||
| uint8_t data_length = receive_wifi_buf[5]; | uint8_t data_length = receive_wifi_buf[5]; | ||||
| uint8_t cmd = receive_wifi_buf[6]; | uint8_t cmd = receive_wifi_buf[6]; | ||||
| uint8_t sub_cmd = receive_wifi_buf[7]; | uint8_t sub_cmd = receive_wifi_buf[7]; | ||||
| uint8_t set_status =0; | |||||
| //判断是否合法 | //判断是否合法 | ||||
| if( (receive_wifi_buf[0] == RECEIVE_WIFI_PACKAGE_HEAD_FIRST) && (receive_wifi_buf[1] == RECEIVE_WIFI_PACKAGE_HEAD_SECOND) &&(receive_wifi_buf[2]) ==RECEIVE_WIFI_PACKAGE_VERSION) | if( (receive_wifi_buf[0] == RECEIVE_WIFI_PACKAGE_HEAD_FIRST) && (receive_wifi_buf[1] == RECEIVE_WIFI_PACKAGE_HEAD_SECOND) &&(receive_wifi_buf[2]) ==RECEIVE_WIFI_PACKAGE_VERSION) | ||||
| { | { | ||||
| @ -119,7 +120,7 @@ int receive_wifi_analysis(uint8_t * receive_wifi_buf,uint8_t length) | |||||
| } | } | ||||
| //判断校验 | //判断校验 | ||||
| if(comm_message_checksum(receive_wifi_buf,length)!=receive_wifi_buf[length-1]) | |||||
| if(comm_message_checksum(receive_wifi_buf,length) != receive_wifi_buf[length-1]) | |||||
| { | { | ||||
| //校验码错误!! | //校验码错误!! | ||||
| return -2; | return -2; | ||||
| @ -142,7 +143,7 @@ int receive_wifi_analysis(uint8_t * receive_wifi_buf,uint8_t length) | |||||
| if(msg_type==RECEIVE_WIFI_PACKAGE_CONFIGURATION) | if(msg_type==RECEIVE_WIFI_PACKAGE_CONFIGURATION) | ||||
| { | { | ||||
| // 心跳包 | |||||
| //***心跳包*** | |||||
| if(cmd==WIFI_HEARTBEAT_COMMAND ) | if(cmd==WIFI_HEARTBEAT_COMMAND ) | ||||
| { | { | ||||
| if(sub_cmd==WIFI_HEARTBEAT_SUB_COMMAND) | if(sub_cmd==WIFI_HEARTBEAT_SUB_COMMAND) | ||||
| @ -157,66 +158,164 @@ int receive_wifi_analysis(uint8_t * receive_wifi_buf,uint8_t length) | |||||
| } | } | ||||
| } | } | ||||
| // 控制包 | |||||
| //***控制包*** | |||||
| if(cmd==REVEIVE_WIFI_COMMAND) | if(cmd==REVEIVE_WIFI_COMMAND) | ||||
| { | { | ||||
| //开关 | //开关 | ||||
| if(sub_cmd==SWITH_SUB_COMMAND) | if(sub_cmd==SWITH_SUB_COMMAND) | ||||
| { | { | ||||
| device_working_status_buff.power_switch_t = receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET] & SWITCH_MASK_BIT_POWER_ALL; | |||||
| //UI | |||||
| //上报MCU | |||||
| } | } | ||||
| //模式 | //模式 | ||||
| else if(sub_cmd==MODE_SUB_COMMAND) | else if(sub_cmd==MODE_SUB_COMMAND) | ||||
| { | { | ||||
| device_working_status_buff.mode_t = receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET]; | |||||
| //UI | |||||
| //上报MCU | |||||
| } | } | ||||
| //童锁 | //童锁 | ||||
| else if(sub_cmd==CHILD_LOCK_SUB_COMMAND) | else if(sub_cmd==CHILD_LOCK_SUB_COMMAND) | ||||
| { | { | ||||
| device_working_status_buff.childlock_switch_t = receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET]; | |||||
| //UI | |||||
| //上报MCU | |||||
| } | } | ||||
| //除菌 uv | //除菌 uv | ||||
| else if(sub_cmd==UV_SUB_COMMAND) | else if(sub_cmd==UV_SUB_COMMAND) | ||||
| { | { | ||||
| device_working_status_buff.uv_switch_t = receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET]; | |||||
| //UI | |||||
| //上报MCU | |||||
| } | } | ||||
| //负离子 | //负离子 | ||||
| else if(sub_cmd==NEGATIVE_ION_SUB_COMMAND) | else if(sub_cmd==NEGATIVE_ION_SUB_COMMAND) | ||||
| { | { | ||||
| device_working_status_buff.anion_switch_t = receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET]; | |||||
| //UI | |||||
| //上报MCU | |||||
| } | } | ||||
| //熄屏 | //熄屏 | ||||
| else if(sub_cmd==SCREEN_OFF_SUB_COMMAND) | else if(sub_cmd==SCREEN_OFF_SUB_COMMAND) | ||||
| { | { | ||||
| device_working_status_buff.screen_switch_t = receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET]; | |||||
| //UI | |||||
| //上报MCU | |||||
| } | } | ||||
| //按键音 | //按键音 | ||||
| else if(sub_cmd==KEY_TONE_SUB_COMMAND) | else if(sub_cmd==KEY_TONE_SUB_COMMAND) | ||||
| { | { | ||||
| device_working_status_buff.keytone_switch_t = receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET]; | |||||
| //UI | |||||
| //上报MCU | |||||
| } | } | ||||
| //按滤芯状态 | //按滤芯状态 | ||||
| else if(sub_cmd==FILTER_STATUS) | else if(sub_cmd==FILTER_STATUS) | ||||
| { | { | ||||
| device_working_status_buff.filter1_alarm_t = receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET]; | |||||
| //判断是否 合法 | |||||
| if( (0<=receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET+1]) && (100>=receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET+1]) ) | |||||
| { | |||||
| device_working_status_buff.filter1_life_t = receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET+1]; | |||||
| } | |||||
| else | |||||
| { | |||||
| //打印!! 清空缓存 | |||||
| return -3; | |||||
| } | |||||
| //UI | |||||
| //上报MCU | |||||
| } | } | ||||
| //蜂鸣器 | //蜂鸣器 | ||||
| else if(sub_cmd==BUZZER_SUB_COMMAND) | else if(sub_cmd==BUZZER_SUB_COMMAND) | ||||
| { | { | ||||
| //直接发送给mcu 蜂鸣 | |||||
| //UI | |||||
| //上报MCU | |||||
| } | } | ||||
| //档位 | //档位 | ||||
| else if(sub_cmd==GEAR_SUB_COMMAND) | else if(sub_cmd==GEAR_SUB_COMMAND) | ||||
| { | { | ||||
| device_working_status_buff.fan_gear_t = receive_wifi_buf[WIFI_CONTROL_DATA_OFFSET]; | |||||
| //UI | |||||
| //上报MCU | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| //打印失败!! | //打印失败!! | ||||
| //清空缓存{********} | //清空缓存{********} | ||||
| return -3; | return -3; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @ -226,7 +325,8 @@ int receive_wifi_analysis(uint8_t * receive_wifi_buf,uint8_t length) | |||||
| } | } | ||||
| //清空缓存 考虑是否打印!!!! | |||||
| return 0; | return 0; | ||||
| } | } | ||||