diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index f381d33..4f9b8ef 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
@@ -17,7 +17,7 @@
-
+
diff --git a/Debug/SW_APPs/APP_KEYBOARD.cyclo b/Debug/SW_APPs/APP_KEYBOARD.cyclo
new file mode 100644
index 0000000..f259703
--- /dev/null
+++ b/Debug/SW_APPs/APP_KEYBOARD.cyclo
@@ -0,0 +1,2 @@
+../SW_APPs/APP_KEYBOARD.c:12:6:APP_KEYBOARD_init 1
+../SW_APPs/APP_KEYBOARD.c:16:6:APP_KEYBOARD_loop 1
diff --git a/Debug/SW_APPs/APP_KEYBOARD.d b/Debug/SW_APPs/APP_KEYBOARD.d
new file mode 100644
index 0000000..d90ee0f
--- /dev/null
+++ b/Debug/SW_APPs/APP_KEYBOARD.d
@@ -0,0 +1,63 @@
+SW_APPs/APP_KEYBOARD.o: ../SW_APPs/APP_KEYBOARD.c \
+ ../SW_APPs/APP_keyboard.h ../Core/Inc/main.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h
+../SW_APPs/APP_keyboard.h:
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../SW_APPs/windows.h:
+C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
diff --git a/Debug/SW_APPs/APP_KEYBOARD.su b/Debug/SW_APPs/APP_KEYBOARD.su
new file mode 100644
index 0000000..acb253e
--- /dev/null
+++ b/Debug/SW_APPs/APP_KEYBOARD.su
@@ -0,0 +1,2 @@
+../SW_APPs/APP_KEYBOARD.c:12:6:APP_KEYBOARD_init 16 static
+../SW_APPs/APP_KEYBOARD.c:16:6:APP_KEYBOARD_loop 4 static
diff --git a/Debug/SW_APPs/APP_colorcontrol.cyclo b/Debug/SW_APPs/APP_colorcontrol.cyclo
new file mode 100644
index 0000000..0701502
--- /dev/null
+++ b/Debug/SW_APPs/APP_colorcontrol.cyclo
@@ -0,0 +1,2 @@
+../SW_APPs/APP_colorcontrol.c:5:6:APP_COLORCONTROL_init 1
+../SW_APPs/APP_colorcontrol.c:9:6:APP_COLORCONTROL_loop 1
diff --git a/Debug/SW_APPs/APP_colorcontrol.d b/Debug/SW_APPs/APP_colorcontrol.d
new file mode 100644
index 0000000..d270a9b
--- /dev/null
+++ b/Debug/SW_APPs/APP_colorcontrol.d
@@ -0,0 +1,63 @@
+SW_APPs/APP_colorcontrol.o: ../SW_APPs/APP_colorcontrol.c \
+ ../SW_APPs/APP_colorcontrol.h ../Core/Inc/main.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h \
+ ../Core/Inc/stm32f1xx_hal_conf.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h \
+ ../Drivers/CMSIS/Include/core_cm3.h \
+ ../Drivers/CMSIS/Include/cmsis_version.h \
+ ../Drivers/CMSIS/Include/cmsis_compiler.h \
+ ../Drivers/CMSIS/Include/cmsis_gcc.h \
+ ../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h \
+ ../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h \
+ ../SW_APPs/windows.h C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h
+../SW_APPs/APP_colorcontrol.h:
+../Core/Inc/main.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:
+../Core/Inc/stm32f1xx_hal_conf.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f1xx.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/stm32f103xe.h:
+../Drivers/CMSIS/Include/core_cm3.h:
+../Drivers/CMSIS/Include/cmsis_version.h:
+../Drivers/CMSIS/Include/cmsis_compiler.h:
+../Drivers/CMSIS/Include/cmsis_gcc.h:
+../Drivers/CMSIS/Device/ST/STM32F1xx/Include/system_stm32f1xx.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_gpio_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_exti.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_dma_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_cortex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_flash_ex.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_sram.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_fsmc.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_i2c.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_pwr.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_spi.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim.h:
+../Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_tim_ex.h:
+../SW_APPs/windows.h:
+C:/Users/wuwen/m3s_stm32/HW_Devices/lcd.h:
diff --git a/Debug/SW_APPs/APP_colorcontrol.su b/Debug/SW_APPs/APP_colorcontrol.su
new file mode 100644
index 0000000..3ed08df
--- /dev/null
+++ b/Debug/SW_APPs/APP_colorcontrol.su
@@ -0,0 +1,2 @@
+../SW_APPs/APP_colorcontrol.c:5:6:APP_COLORCONTROL_init 16 static
+../SW_APPs/APP_colorcontrol.c:9:6:APP_COLORCONTROL_loop 4 static
diff --git a/Debug/SW_APPs/Main_APP.cyclo b/Debug/SW_APPs/Main_APP.cyclo
index ecc9252..b205b01 100644
--- a/Debug/SW_APPs/Main_APP.cyclo
+++ b/Debug/SW_APPs/Main_APP.cyclo
@@ -1 +1 @@
-../SW_APPs/Main_APP.c:23:6:main_app 3
+../SW_APPs/Main_APP.c:26:6:main_app 3
diff --git a/Debug/SW_APPs/Main_APP.d b/Debug/SW_APPs/Main_APP.d
index 1d1014a..2d657f4 100644
--- a/Debug/SW_APPs/Main_APP.d
+++ b/Debug/SW_APPs/Main_APP.d
@@ -32,7 +32,8 @@ SW_APPs/Main_APP.o: ../SW_APPs/Main_APP.c ../SW_APPs/Main_APP.h \
C:/Users/wuwen/m3s_stm32/HW_Devices/touch.h \
C:/Users/wuwen/m3s_stm32/HW_Devices/eeprom.h \
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h \
- C:/Users/wuwen/m3s_stm32/HW_Devices/buzzer.h
+ C:/Users/wuwen/m3s_stm32/HW_Devices/buzzer.h \
+ ../SW_APPs/APP_colorcontrol.h ../SW_APPs/APP_keyboard.h
../SW_APPs/Main_APP.h:
C:/Users/wuwen/m3s_stm32/HW_Devices/LCD.h:
../Core/Inc/main.h:
@@ -70,3 +71,5 @@ C:/Users/wuwen/m3s_stm32/HW_Devices/touch.h:
C:/Users/wuwen/m3s_stm32/HW_Devices/eeprom.h:
C:/Users/wuwen/m3s_stm32/HW_Devices/key.h:
C:/Users/wuwen/m3s_stm32/HW_Devices/buzzer.h:
+../SW_APPs/APP_colorcontrol.h:
+../SW_APPs/APP_keyboard.h:
diff --git a/Debug/SW_APPs/Main_APP.su b/Debug/SW_APPs/Main_APP.su
index 1ae0d71..ebf5a78 100644
--- a/Debug/SW_APPs/Main_APP.su
+++ b/Debug/SW_APPs/Main_APP.su
@@ -1 +1 @@
-../SW_APPs/Main_APP.c:23:6:main_app 96 static
+../SW_APPs/Main_APP.c:26:6:main_app 96 static
diff --git a/Debug/SW_APPs/subdir.mk b/Debug/SW_APPs/subdir.mk
index d41648b..563e8cf 100644
--- a/Debug/SW_APPs/subdir.mk
+++ b/Debug/SW_APPs/subdir.mk
@@ -6,21 +6,27 @@
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../SW_APPs/APP_IDcard.c \
+../SW_APPs/APP_KEYBOARD.c \
../SW_APPs/APP_blood.c \
+../SW_APPs/APP_colorcontrol.c \
../SW_APPs/APP_morsecode.c \
../SW_APPs/Main_APP.c \
../SW_APPs/windows.c
OBJS += \
./SW_APPs/APP_IDcard.o \
+./SW_APPs/APP_KEYBOARD.o \
./SW_APPs/APP_blood.o \
+./SW_APPs/APP_colorcontrol.o \
./SW_APPs/APP_morsecode.o \
./SW_APPs/Main_APP.o \
./SW_APPs/windows.o
C_DEPS += \
./SW_APPs/APP_IDcard.d \
+./SW_APPs/APP_KEYBOARD.d \
./SW_APPs/APP_blood.d \
+./SW_APPs/APP_colorcontrol.d \
./SW_APPs/APP_morsecode.d \
./SW_APPs/Main_APP.d \
./SW_APPs/windows.d
@@ -33,7 +39,7 @@ SW_APPs/%.o SW_APPs/%.su SW_APPs/%.cyclo: ../SW_APPs/%.c SW_APPs/subdir.mk
clean: clean-SW_APPs
clean-SW_APPs:
- -$(RM) ./SW_APPs/APP_IDcard.cyclo ./SW_APPs/APP_IDcard.d ./SW_APPs/APP_IDcard.o ./SW_APPs/APP_IDcard.su ./SW_APPs/APP_blood.cyclo ./SW_APPs/APP_blood.d ./SW_APPs/APP_blood.o ./SW_APPs/APP_blood.su ./SW_APPs/APP_morsecode.cyclo ./SW_APPs/APP_morsecode.d ./SW_APPs/APP_morsecode.o ./SW_APPs/APP_morsecode.su ./SW_APPs/Main_APP.cyclo ./SW_APPs/Main_APP.d ./SW_APPs/Main_APP.o ./SW_APPs/Main_APP.su ./SW_APPs/windows.cyclo ./SW_APPs/windows.d ./SW_APPs/windows.o ./SW_APPs/windows.su
+ -$(RM) ./SW_APPs/APP_IDcard.cyclo ./SW_APPs/APP_IDcard.d ./SW_APPs/APP_IDcard.o ./SW_APPs/APP_IDcard.su ./SW_APPs/APP_KEYBOARD.cyclo ./SW_APPs/APP_KEYBOARD.d ./SW_APPs/APP_KEYBOARD.o ./SW_APPs/APP_KEYBOARD.su ./SW_APPs/APP_blood.cyclo ./SW_APPs/APP_blood.d ./SW_APPs/APP_blood.o ./SW_APPs/APP_blood.su ./SW_APPs/APP_colorcontrol.cyclo ./SW_APPs/APP_colorcontrol.d ./SW_APPs/APP_colorcontrol.o ./SW_APPs/APP_colorcontrol.su ./SW_APPs/APP_morsecode.cyclo ./SW_APPs/APP_morsecode.d ./SW_APPs/APP_morsecode.o ./SW_APPs/APP_morsecode.su ./SW_APPs/Main_APP.cyclo ./SW_APPs/Main_APP.d ./SW_APPs/Main_APP.o ./SW_APPs/Main_APP.su ./SW_APPs/windows.cyclo ./SW_APPs/windows.d ./SW_APPs/windows.o ./SW_APPs/windows.su
.PHONY: clean-SW_APPs
diff --git a/Debug/m3s.list b/Debug/m3s.list
index 8934992..1dca65e 100644
--- a/Debug/m3s.list
+++ b/Debug/m3s.list
@@ -5,47 +5,47 @@ Sections:
Idx Name Size VMA LMA File off Algn
0 .isr_vector 000001e4 08000000 08000000 00010000 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 1 .text 0000a464 080001e8 080001e8 000101e8 2**3
+ 1 .text 00009db4 080001e8 080001e8 000101e8 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
- 2 .rodata 00000f64 0800a650 0800a650 0001a650 2**3
+ 2 .rodata 00000ed4 08009fa0 08009fa0 00019fa0 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
- 3 .ARM.extab 00000000 0800b5b4 0800b5b4 000201d4 2**0
+ 3 .ARM.extab 00000000 0800ae74 0800ae74 000201d4 2**0
CONTENTS
- 4 .ARM 00000000 0800b5b4 0800b5b4 000201d4 2**0
+ 4 .ARM 00000000 0800ae74 0800ae74 000201d4 2**0
CONTENTS
- 5 .preinit_array 00000000 0800b5b4 0800b5b4 000201d4 2**0
+ 5 .preinit_array 00000000 0800ae74 0800ae74 000201d4 2**0
CONTENTS, ALLOC, LOAD, DATA
- 6 .init_array 00000004 0800b5b4 0800b5b4 0001b5b4 2**2
+ 6 .init_array 00000004 0800ae74 0800ae74 0001ae74 2**2
CONTENTS, ALLOC, LOAD, DATA
- 7 .fini_array 00000004 0800b5b8 0800b5b8 0001b5b8 2**2
+ 7 .fini_array 00000004 0800ae78 0800ae78 0001ae78 2**2
CONTENTS, ALLOC, LOAD, DATA
- 8 .data 000001d4 20000000 0800b5bc 00020000 2**2
+ 8 .data 000001d4 20000000 0800ae7c 00020000 2**2
CONTENTS, ALLOC, LOAD, DATA
- 9 .bss 00002530 200001d4 0800b790 000201d4 2**2
+ 9 .bss 0000248c 200001d4 0800b050 000201d4 2**2
ALLOC
- 10 ._user_heap_stack 00000c04 20002704 0800b790 00022704 2**0
+ 10 ._user_heap_stack 00000c00 20002660 0800b050 00022660 2**0
ALLOC
11 .ARM.attributes 00000029 00000000 00000000 000201d4 2**0
CONTENTS, READONLY
12 .comment 00000043 00000000 00000000 000201fd 2**0
CONTENTS, READONLY
- 13 .debug_info 00012ee9 00000000 00000000 00020240 2**0
+ 13 .debug_info 00012aec 00000000 00000000 00020240 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 14 .debug_abbrev 00003828 00000000 00000000 00033129 2**0
+ 14 .debug_abbrev 0000375d 00000000 00000000 00032d2c 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 15 .debug_aranges 00001370 00000000 00000000 00036958 2**3
+ 15 .debug_aranges 00001390 00000000 00000000 00036490 2**3
CONTENTS, READONLY, DEBUGGING, OCTETS
- 16 .debug_rnglists 00000f35 00000000 00000000 00037cc8 2**0
+ 16 .debug_rnglists 00000f2f 00000000 00000000 00037820 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 17 .debug_macro 0001da39 00000000 00000000 00038bfd 2**0
+ 17 .debug_macro 0001dcbd 00000000 00000000 0003874f 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 18 .debug_line 00019dbb 00000000 00000000 00056636 2**0
+ 18 .debug_line 0001a37a 00000000 00000000 0005640c 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 19 .debug_str 000a0bf7 00000000 00000000 000703f1 2**0
+ 19 .debug_str 000a0af5 00000000 00000000 00070786 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
- 20 .debug_frame 000062ac 00000000 00000000 00110fe8 2**2
+ 20 .debug_frame 000062d4 00000000 00000000 0011127c 2**2
CONTENTS, READONLY, DEBUGGING, OCTETS
- 21 .debug_line_str 00000047 00000000 00000000 00117294 2**0
+ 21 .debug_line_str 00000047 00000000 00000000 00117550 2**0
CONTENTS, READONLY, DEBUGGING, OCTETS
Disassembly of section .text:
@@ -64,7 +64,7 @@ Disassembly of section .text:
80001fe: bd10 pop {r4, pc}
8000200: 200001d4 .word 0x200001d4
8000204: 00000000 .word 0x00000000
- 8000208: 0800a634 .word 0x0800a634
+ 8000208: 08009f84 .word 0x08009f84
0800020c :
800020c: b508 push {r3, lr}
@@ -76,7 +76,7 @@ Disassembly of section .text:
800021a: bd08 pop {r3, pc}
800021c: 00000000 .word 0x00000000
8000220: 200001d8 .word 0x200001d8
- 8000224: 0800a634 .word 0x0800a634
+ 8000224: 08009f84 .word 0x08009f84
08000228 :
8000228: 4603 mov r3, r0
@@ -1527,7 +1527,7 @@ int main(void)
80011f0: f000 f8ac bl 800134c
/* USER CODE BEGIN 2 */
main_app();
- 80011f4: f005 ffea bl 80071cc
+ 80011f4: f005 fc82 bl 8006afc
/* USER CODE END 2 */
/* Infinite loop */
@@ -1550,7 +1550,7 @@ void SystemClock_Config(void)
8001204: 2228 movs r2, #40 ; 0x28
8001206: 2100 movs r1, #0
8001208: 4618 mov r0, r3
- 800120a: f007 fa71 bl 80086f0
+ 800120a: f006 ff1b bl 8008044
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
800120e: 1d3b adds r3, r7, #4
8001210: 2200 movs r2, #0
@@ -3283,7 +3283,7 @@ int _kill(int pid, int sig)
8001b20: 6078 str r0, [r7, #4]
8001b22: 6039 str r1, [r7, #0]
errno = EINVAL;
- 8001b24: f006 fe46 bl 80087b4 <__errno>
+ 8001b24: f006 faf0 bl 8008108 <__errno>
8001b28: 4603 mov r3, r0
8001b2a: 2216 movs r2, #22
8001b2c: 601a str r2, [r3, #0]
@@ -3481,7 +3481,7 @@ void *_sbrk(ptrdiff_t incr)
8001c16: d207 bcs.n 8001c28 <_sbrk+0x40>
{
errno = ENOMEM;
- 8001c18: f006 fdcc bl 80087b4 <__errno>
+ 8001c18: f006 fa76 bl 8008108 <__errno>
8001c1c: 4603 mov r3, r0
8001c1e: 220c movs r2, #12
8001c20: 601a str r2, [r3, #0]
@@ -3512,7 +3512,7 @@ void *_sbrk(ptrdiff_t incr)
8001c44: 20010000 .word 0x20010000
8001c48: 00000800 .word 0x00000800
8001c4c: 20000378 .word 0x20000378
- 8001c50: 20002708 .word 0x20002708
+ 8001c50: 20002660 .word 0x20002660
08001c54 :
* @note This function should be used only after reset.
@@ -3602,7 +3602,7 @@ LoopFillZerobss:
8001c86: f7ff ffe5 bl 8001c54
/* Call static constructors */
bl __libc_init_array
- 8001c8a: f006 fd99 bl 80087c0 <__libc_init_array>
+ 8001c8a: f006 fa43 bl 8008114 <__libc_init_array>
/* Call the application's entry point.*/
bl main
8001c8e: f7ff fa9f bl 80011d0
@@ -3613,11 +3613,11 @@ LoopFillZerobss:
ldr r1, =_edata
8001c98: 200001d4 .word 0x200001d4
ldr r2, =_sidata
- 8001c9c: 0800b5bc .word 0x0800b5bc
+ 8001c9c: 0800ae7c .word 0x0800ae7c
ldr r2, =_sbss
8001ca0: 200001d4 .word 0x200001d4
ldr r4, =_ebss
- 8001ca4: 20002704 .word 0x20002704
+ 8001ca4: 20002660 .word 0x20002660
08001ca8 :
* @retval : None
@@ -8745,7 +8745,7 @@ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK
8003a1e: bf00 nop
8003a20: 40022000 .word 0x40022000
8003a24: 40021000 .word 0x40021000
- 8003a28: 0800a754 .word 0x0800a754
+ 8003a28: 0800a084 .word 0x0800a084
8003a2c: 20000000 .word 0x20000000
8003a30: 20000004 .word 0x20000004
@@ -8893,7 +8893,7 @@ uint32_t HAL_RCC_GetSysClockFreq(void)
8003ada: bc90 pop {r4, r7}
8003adc: 4770 bx lr
8003ade: bf00 nop
- 8003ae0: 0800a650 .word 0x0800a650
+ 8003ae0: 08009fa0 .word 0x08009fa0
8003ae4: 40021000 .word 0x40021000
8003ae8: 007a1200 .word 0x007a1200
8003aec: 003d0900 .word 0x003d0900
@@ -8941,7 +8941,7 @@ uint32_t HAL_RCC_GetPCLK1Freq(void)
8003b20: 4618 mov r0, r3
8003b22: bd80 pop {r7, pc}
8003b24: 40021000 .word 0x40021000
- 8003b28: 0800a764 .word 0x0800a764
+ 8003b28: 0800a094 .word 0x0800a094
08003b2c :
* @brief This function provides delay (in milliseconds) based on CPU cycles method.
@@ -10104,7 +10104,7 @@ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)
#else
HAL_TIM_PeriodElapsedCallback(htim);
80041a6: 6878 ldr r0, [r7, #4]
- 80041a8: f002 fc70 bl 8006a8c
+ 80041a8: f002 fc44 bl 8006a34
#endif /* USE_HAL_TIM_REGISTER_CALLBACKS */
}
}
@@ -14240,8 +14240,8 @@ void LCD_ShowChar(uint16_t x,uint16_t y,uint8_t num,uint8_t size,uint16_t bg,uin
8005a1a: 3714 adds r7, #20
8005a1c: 46bd mov sp, r7
8005a1e: bd90 pop {r4, r7, pc}
- 8005a20: 0800a76c .word 0x0800a76c
- 8005a24: 0800abe0 .word 0x0800abe0
+ 8005a20: 0800a09c .word 0x0800a09c
+ 8005a24: 0800a510 .word 0x0800a510
8005a28: 20000380 .word 0x20000380
08005a2c :
@@ -14386,9468 +14386,8396 @@ TIM4->ARR = (uint32_t)((72000000/freq)-1);TIM4->CCR3 = (uint32_t)(((72000000/fr
8005b10: 40000800 .word 0x40000800
8005b14: 42c80000 .word 0x42c80000
-08005b18 :
-
-
-
-void add_a_note(uint16_t freq,uint8_t duty,uint16_t deley)//添加一个音符
-{
- 8005b18: b580 push {r7, lr}
- 8005b1a: b084 sub sp, #16
- 8005b1c: af00 add r7, sp, #0
- 8005b1e: 4603 mov r3, r0
- 8005b20: 80fb strh r3, [r7, #6]
- 8005b22: 460b mov r3, r1
- 8005b24: 717b strb r3, [r7, #5]
- 8005b26: 4613 mov r3, r2
- 8005b28: 807b strh r3, [r7, #2]
-struct notes* buff;
-buff = (struct notes*)malloc(sizeof(struct notes));
- 8005b2a: 200c movs r0, #12
- 8005b2c: f001 ff0c bl 8007948
- 8005b30: 4603 mov r3, r0
- 8005b32: 60bb str r3, [r7, #8]
-if (buff != NULL)
- 8005b34: 68bb ldr r3, [r7, #8]
- 8005b36: 2b00 cmp r3, #0
- 8005b38: d021 beq.n 8005b7e
-{
-buff->freq = freq;
- 8005b3a: 68bb ldr r3, [r7, #8]
- 8005b3c: 88fa ldrh r2, [r7, #6]
- 8005b3e: 801a strh r2, [r3, #0]
-buff->duty = duty;
- 8005b40: 68bb ldr r3, [r7, #8]
- 8005b42: 797a ldrb r2, [r7, #5]
- 8005b44: 709a strb r2, [r3, #2]
-buff->deley = deley;
- 8005b46: 68bb ldr r3, [r7, #8]
- 8005b48: 887a ldrh r2, [r7, #2]
- 8005b4a: 809a strh r2, [r3, #4]
-buff->next_note = NULL;
- 8005b4c: 68bb ldr r3, [r7, #8]
- 8005b4e: 2200 movs r2, #0
- 8005b50: 609a str r2, [r3, #8]
-
-if (notes == NULL)
- 8005b52: 4b0d ldr r3, [pc, #52] ; (8005b88 )
- 8005b54: 681b ldr r3, [r3, #0]
- 8005b56: 2b00 cmp r3, #0
- 8005b58: d103 bne.n 8005b62
-{
-notes = buff;
- 8005b5a: 4a0b ldr r2, [pc, #44] ; (8005b88 )
- 8005b5c: 68bb ldr r3, [r7, #8]
- 8005b5e: 6013 str r3, [r2, #0]
-}
-t->next_note = buff;
-}
+08005b18 :
}
}
- 8005b60: e00d b.n 8005b7e
-struct notes *t = notes;
- 8005b62: 4b09 ldr r3, [pc, #36] ; (8005b88 )
- 8005b64: 681b ldr r3, [r3, #0]
- 8005b66: 60fb str r3, [r7, #12]
-while (t->next_note != NULL)
- 8005b68: e002 b.n 8005b70
-t = t->next_note;
- 8005b6a: 68fb ldr r3, [r7, #12]
- 8005b6c: 689b ldr r3, [r3, #8]
- 8005b6e: 60fb str r3, [r7, #12]
-while (t->next_note != NULL)
- 8005b70: 68fb ldr r3, [r7, #12]
- 8005b72: 689b ldr r3, [r3, #8]
- 8005b74: 2b00 cmp r3, #0
- 8005b76: d1f8 bne.n 8005b6a
-t->next_note = buff;
- 8005b78: 68fb ldr r3, [r7, #12]
- 8005b7a: 68ba ldr r2, [r7, #8]
- 8005b7c: 609a str r2, [r3, #8]
-}
- 8005b7e: bf00 nop
- 8005b80: 3710 adds r7, #16
- 8005b82: 46bd mov sp, r7
- 8005b84: bd80 pop {r7, pc}
- 8005b86: bf00 nop
- 8005b88: 2000038c .word 0x2000038c
-
-08005b8c :
void delhead() //删除第一个音符 一般用户不需要调用
{
- 8005b8c: b580 push {r7, lr}
- 8005b8e: b082 sub sp, #8
- 8005b90: af00 add r7, sp, #0
+ 8005b18: b580 push {r7, lr}
+ 8005b1a: b082 sub sp, #8
+ 8005b1c: af00 add r7, sp, #0
if (notes == NULL)
- 8005b92: 4b11 ldr r3, [pc, #68] ; (8005bd8 )
- 8005b94: 681b ldr r3, [r3, #0]
- 8005b96: 2b00 cmp r3, #0
- 8005b98: d019 beq.n 8005bce
+ 8005b1e: 4b11 ldr r3, [pc, #68] ; (8005b64 )
+ 8005b20: 681b ldr r3, [r3, #0]
+ 8005b22: 2b00 cmp r3, #0
+ 8005b24: d019 beq.n 8005b5a
{
return;
}
if (notes->next_note == NULL)
- 8005b9a: 4b0f ldr r3, [pc, #60] ; (8005bd8 )
- 8005b9c: 681b ldr r3, [r3, #0]
- 8005b9e: 689b ldr r3, [r3, #8]
- 8005ba0: 2b00 cmp r3, #0
- 8005ba2: d108 bne.n 8005bb6
+ 8005b26: 4b0f ldr r3, [pc, #60] ; (8005b64 )
+ 8005b28: 681b ldr r3, [r3, #0]
+ 8005b2a: 689b ldr r3, [r3, #8]
+ 8005b2c: 2b00 cmp r3, #0
+ 8005b2e: d108 bne.n 8005b42
{
free(notes);
- 8005ba4: 4b0c ldr r3, [pc, #48] ; (8005bd8 )
- 8005ba6: 681b ldr r3, [r3, #0]
- 8005ba8: 4618 mov r0, r3
- 8005baa: f001 fed5 bl 8007958
+ 8005b30: 4b0c ldr r3, [pc, #48] ; (8005b64 )
+ 8005b32: 681b ldr r3, [r3, #0]
+ 8005b34: 4618 mov r0, r3
+ 8005b36: f001 fbb9 bl 80072ac
notes = NULL;
- 8005bae: 4b0a ldr r3, [pc, #40] ; (8005bd8 )
- 8005bb0: 2200 movs r2, #0
- 8005bb2: 601a str r2, [r3, #0]
- 8005bb4: e00c b.n 8005bd0
+ 8005b3a: 4b0a ldr r3, [pc, #40] ; (8005b64 )
+ 8005b3c: 2200 movs r2, #0
+ 8005b3e: 601a str r2, [r3, #0]
+ 8005b40: e00c b.n 8005b5c
}
else
{
struct notes *t = notes;
- 8005bb6: 4b08 ldr r3, [pc, #32] ; (8005bd8 )
- 8005bb8: 681b ldr r3, [r3, #0]
- 8005bba: 607b str r3, [r7, #4]
+ 8005b42: 4b08 ldr r3, [pc, #32] ; (8005b64 )
+ 8005b44: 681b ldr r3, [r3, #0]
+ 8005b46: 607b str r3, [r7, #4]
notes = notes->next_note;
- 8005bbc: 4b06 ldr r3, [pc, #24] ; (8005bd8 )
- 8005bbe: 681b ldr r3, [r3, #0]
- 8005bc0: 689b ldr r3, [r3, #8]
- 8005bc2: 4a05 ldr r2, [pc, #20] ; (8005bd8 )
- 8005bc4: 6013 str r3, [r2, #0]
+ 8005b48: 4b06 ldr r3, [pc, #24] ; (8005b64 )
+ 8005b4a: 681b ldr r3, [r3, #0]
+ 8005b4c: 689b ldr r3, [r3, #8]
+ 8005b4e: 4a05 ldr r2, [pc, #20] ; (8005b64 )
+ 8005b50: 6013 str r3, [r2, #0]
free(t);
- 8005bc6: 6878 ldr r0, [r7, #4]
- 8005bc8: f001 fec6 bl 8007958
- 8005bcc: e000 b.n 8005bd0
+ 8005b52: 6878 ldr r0, [r7, #4]
+ 8005b54: f001 fbaa bl 80072ac
+ 8005b58: e000 b.n 8005b5c
return;
- 8005bce: bf00 nop
+ 8005b5a: bf00 nop
}
}
- 8005bd0: 3708 adds r7, #8
- 8005bd2: 46bd mov sp, r7
- 8005bd4: bd80 pop {r7, pc}
- 8005bd6: bf00 nop
- 8005bd8: 2000038c .word 0x2000038c
+ 8005b5c: 3708 adds r7, #8
+ 8005b5e: 46bd mov sp, r7
+ 8005b60: bd80 pop {r7, pc}
+ 8005b62: bf00 nop
+ 8005b64: 2000038c .word 0x2000038c
-08005bdc :
+08005b68 :
char buzzer_play_server() //放在主循环 只有有音符添加进来就会播放,播放完自动释放
{
- 8005bdc: b580 push {r7, lr}
- 8005bde: af00 add r7, sp, #0
+ 8005b68: b580 push {r7, lr}
+ 8005b6a: af00 add r7, sp, #0
static char busy_flag=0;
static uint32_t play_delay;
if(notes == NULL)
- 8005be0: 4b18 ldr r3, [pc, #96] ; (8005c44 )
- 8005be2: 681b ldr r3, [r3, #0]
- 8005be4: 2b00 cmp r3, #0
- 8005be6: d029 beq.n 8005c3c
+ 8005b6c: 4b18 ldr r3, [pc, #96] ; (8005bd0 )
+ 8005b6e: 681b ldr r3, [r3, #0]
+ 8005b70: 2b00 cmp r3, #0
+ 8005b72: d029 beq.n 8005bc8
{
//play_ones(0,0);
}else
{
if(busy_flag==0)
- 8005be8: 4b17 ldr r3, [pc, #92] ; (8005c48 )
- 8005bea: 781b ldrb r3, [r3, #0]
- 8005bec: 2b00 cmp r3, #0
- 8005bee: d115 bne.n 8005c1c
+ 8005b74: 4b17 ldr r3, [pc, #92] ; (8005bd4 )
+ 8005b76: 781b ldrb r3, [r3, #0]
+ 8005b78: 2b00 cmp r3, #0
+ 8005b7a: d115 bne.n 8005ba8
{
busy_flag=1;
- 8005bf0: 4b15 ldr r3, [pc, #84] ; (8005c48 )
- 8005bf2: 2201 movs r2, #1
- 8005bf4: 701a strb r2, [r3, #0]
+ 8005b7c: 4b15 ldr r3, [pc, #84] ; (8005bd4 )
+ 8005b7e: 2201 movs r2, #1
+ 8005b80: 701a strb r2, [r3, #0]
play_delay=HAL_GetTick()+notes->deley;
- 8005bf6: f7fc f8b1 bl 8001d5c
- 8005bfa: 4602 mov r2, r0
- 8005bfc: 4b11 ldr r3, [pc, #68] ; (8005c44 )
- 8005bfe: 681b ldr r3, [r3, #0]
- 8005c00: 889b ldrh r3, [r3, #4]
- 8005c02: 4413 add r3, r2
- 8005c04: 4a11 ldr r2, [pc, #68] ; (8005c4c )
- 8005c06: 6013 str r3, [r2, #0]
+ 8005b82: f7fc f8eb bl 8001d5c
+ 8005b86: 4602 mov r2, r0
+ 8005b88: 4b11 ldr r3, [pc, #68] ; (8005bd0 )
+ 8005b8a: 681b ldr r3, [r3, #0]
+ 8005b8c: 889b ldrh r3, [r3, #4]
+ 8005b8e: 4413 add r3, r2
+ 8005b90: 4a11 ldr r2, [pc, #68] ; (8005bd8 )
+ 8005b92: 6013 str r3, [r2, #0]
play_ones(notes->freq,notes->duty);
- 8005c08: 4b0e ldr r3, [pc, #56] ; (8005c44 )
- 8005c0a: 681b ldr r3, [r3, #0]
- 8005c0c: 881a ldrh r2, [r3, #0]
- 8005c0e: 4b0d ldr r3, [pc, #52] ; (8005c44 )
- 8005c10: 681b ldr r3, [r3, #0]
- 8005c12: 789b ldrb r3, [r3, #2]
- 8005c14: 4619 mov r1, r3
- 8005c16: 4610 mov r0, r2
- 8005c18: f7ff ff46 bl 8005aa8
+ 8005b94: 4b0e ldr r3, [pc, #56] ; (8005bd0 )
+ 8005b96: 681b ldr r3, [r3, #0]
+ 8005b98: 881a ldrh r2, [r3, #0]
+ 8005b9a: 4b0d ldr r3, [pc, #52] ; (8005bd0 )
+ 8005b9c: 681b ldr r3, [r3, #0]
+ 8005b9e: 789b ldrb r3, [r3, #2]
+ 8005ba0: 4619 mov r1, r3
+ 8005ba2: 4610 mov r0, r2
+ 8005ba4: f7ff ff80 bl 8005aa8
}
if(busy_flag==1)
- 8005c1c: 4b0a ldr r3, [pc, #40] ; (8005c48 )
- 8005c1e: 781b ldrb r3, [r3, #0]
- 8005c20: 2b01 cmp r3, #1
- 8005c22: d10b bne.n 8005c3c
+ 8005ba8: 4b0a ldr r3, [pc, #40] ; (8005bd4 )
+ 8005baa: 781b ldrb r3, [r3, #0]
+ 8005bac: 2b01 cmp r3, #1
+ 8005bae: d10b bne.n 8005bc8
{
if(HAL_GetTick()>play_delay)
- 8005c24: f7fc f89a bl 8001d5c
- 8005c28: 4602 mov r2, r0
- 8005c2a: 4b08 ldr r3, [pc, #32] ; (8005c4c )
- 8005c2c: 681b ldr r3, [r3, #0]
- 8005c2e: 429a cmp r2, r3
- 8005c30: d904 bls.n 8005c3c
+ 8005bb0: f7fc f8d4 bl 8001d5c
+ 8005bb4: 4602 mov r2, r0
+ 8005bb6: 4b08 ldr r3, [pc, #32] ; (8005bd8 )
+ 8005bb8: 681b ldr r3, [r3, #0]
+ 8005bba: 429a cmp r2, r3
+ 8005bbc: d904 bls.n 8005bc8
{
busy_flag=0;
- 8005c32: 4b05 ldr r3, [pc, #20] ; (8005c48 )
- 8005c34: 2200 movs r2, #0
- 8005c36: 701a strb r2, [r3, #0]
+ 8005bbe: 4b05 ldr r3, [pc, #20] ; (8005bd4 )
+ 8005bc0: 2200 movs r2, #0
+ 8005bc2: 701a strb r2, [r3, #0]
delhead();
- 8005c38: f7ff ffa8 bl 8005b8c
+ 8005bc4: f7ff ffa8 bl 8005b18
}
}
return busy_flag;
- 8005c3c: 4b02 ldr r3, [pc, #8] ; (8005c48 )
- 8005c3e: 781b ldrb r3, [r3, #0]
+ 8005bc8: 4b02 ldr r3, [pc, #8] ; (8005bd4 )
+ 8005bca: 781b ldrb r3, [r3, #0]
}
- 8005c40: 4618 mov r0, r3
- 8005c42: bd80 pop {r7, pc}
- 8005c44: 2000038c .word 0x2000038c
- 8005c48: 20000390 .word 0x20000390
- 8005c4c: 20000394 .word 0x20000394
+ 8005bcc: 4618 mov r0, r3
+ 8005bce: bd80 pop {r7, pc}
+ 8005bd0: 2000038c .word 0x2000038c
+ 8005bd4: 20000390 .word 0x20000390
+ 8005bd8: 20000394 .word 0x20000394
-08005c50 :
+08005bdc :
//因为eeprom芯片的写入速度有限,每写入一个字符都需要等待一段时间才能完成写入
//整个系统不可能等它一个的,传统的解决方法可以使用定时器中断或者多线程开辟子任务在后台保存,
//这里的解决方法是使用状态机,通过一个链表将要保存的数据串起来,再通过状态循环一个个保存,保存延时等于循环用时。
eeprom_write_buff_info eeprom_write_buffer; //创建链表
void EPPROM_SLOWWRITE_INIT() //初始化链表
{
- 8005c50: b480 push {r7}
- 8005c52: af00 add r7, sp, #0
+ 8005bdc: b480 push {r7}
+ 8005bde: af00 add r7, sp, #0
eeprom_write_buffer.buff=NULL;
- 8005c54: 4b0a ldr r3, [pc, #40] ; (8005c80 )
- 8005c56: 2200 movs r2, #0
- 8005c58: 601a str r2, [r3, #0]
+ 8005be0: 4b0a ldr r3, [pc, #40] ; (8005c0c )
+ 8005be2: 2200 movs r2, #0
+ 8005be4: 601a str r2, [r3, #0]
eeprom_write_buffer.end=NULL;
- 8005c5a: 4b09 ldr r3, [pc, #36] ; (8005c80 )
- 8005c5c: 2200 movs r2, #0
- 8005c5e: 609a str r2, [r3, #8]
+ 8005be6: 4b09 ldr r3, [pc, #36] ; (8005c0c )
+ 8005be8: 2200 movs r2, #0
+ 8005bea: 609a str r2, [r3, #8]
eeprom_write_buffer.head=NULL;
- 8005c60: 4b07 ldr r3, [pc, #28] ; (8005c80 )
- 8005c62: 2200 movs r2, #0
- 8005c64: 605a str r2, [r3, #4]
+ 8005bec: 4b07 ldr r3, [pc, #28] ; (8005c0c )
+ 8005bee: 2200 movs r2, #0
+ 8005bf0: 605a str r2, [r3, #4]
eeprom_write_buffer.save_timeout=5; //避免状态机循环过快导致的保存失败,这个是最少延时。(感觉没必要写在这里,太浪费空间了)
- 8005c66: 4b06 ldr r3, [pc, #24] ; (8005c80 )
- 8005c68: 2205 movs r2, #5
- 8005c6a: 741a strb r2, [r3, #16]
+ 8005bf2: 4b06 ldr r3, [pc, #24] ; (8005c0c )
+ 8005bf4: 2205 movs r2, #5
+ 8005bf6: 741a strb r2, [r3, #16]
eeprom_write_buffer.save_busy=0; //最小延时内为忙状态
- 8005c6c: 4a04 ldr r2, [pc, #16] ; (8005c80 )
- 8005c6e: 7c53 ldrb r3, [r2, #17]
- 8005c70: f36f 0300 bfc r3, #0, #1
- 8005c74: 7453 strb r3, [r2, #17]
+ 8005bf8: 4a04 ldr r2, [pc, #16] ; (8005c0c )
+ 8005bfa: 7c53 ldrb r3, [r2, #17]
+ 8005bfc: f36f 0300 bfc r3, #0, #1
+ 8005c00: 7453 strb r3, [r2, #17]
}
- 8005c76: bf00 nop
- 8005c78: 46bd mov sp, r7
- 8005c7a: bc80 pop {r7}
- 8005c7c: 4770 bx lr
- 8005c7e: bf00 nop
- 8005c80: 20000398 .word 0x20000398
+ 8005c02: bf00 nop
+ 8005c04: 46bd mov sp, r7
+ 8005c06: bc80 pop {r7}
+ 8005c08: 4770 bx lr
+ 8005c0a: bf00 nop
+ 8005c0c: 20000398 .word 0x20000398
-08005c84 :
+08005c10 :
//循环保存服务,检查链表头是否有数据是否忙。
void EEPROM_SLOWWRITE_SERVER()
{
- 8005c84: b580 push {r7, lr}
- 8005c86: b082 sub sp, #8
- 8005c88: af00 add r7, sp, #0
+ 8005c10: b580 push {r7, lr}
+ 8005c12: b082 sub sp, #8
+ 8005c14: af00 add r7, sp, #0
eeprom_write_buff *buff;
char data;
if(eeprom_write_buffer.save_busy)
- 8005c8a: 4b20 ldr r3, [pc, #128] ; (8005d0c )
- 8005c8c: 7c5b ldrb r3, [r3, #17]
- 8005c8e: f003 0301 and.w r3, r3, #1
- 8005c92: b2db uxtb r3, r3
- 8005c94: 2b00 cmp r3, #0
- 8005c96: d00c beq.n 8005cb2
+ 8005c16: 4b20 ldr r3, [pc, #128] ; (8005c98 )
+ 8005c18: 7c5b ldrb r3, [r3, #17]
+ 8005c1a: f003 0301 and.w r3, r3, #1
+ 8005c1e: b2db uxtb r3, r3
+ 8005c20: 2b00 cmp r3, #0
+ 8005c22: d00c beq.n 8005c3e
{
if(HAL_GetTick()>eeprom_write_buffer.save_time)
- 8005c98: f7fc f860 bl 8001d5c
- 8005c9c: 4602 mov r2, r0
- 8005c9e: 4b1b ldr r3, [pc, #108] ; (8005d0c )
- 8005ca0: 68db ldr r3, [r3, #12]
- 8005ca2: 429a cmp r2, r3
- 8005ca4: d92e bls.n 8005d04
+ 8005c24: f7fc f89a bl 8001d5c
+ 8005c28: 4602 mov r2, r0
+ 8005c2a: 4b1b ldr r3, [pc, #108] ; (8005c98 )
+ 8005c2c: 68db ldr r3, [r3, #12]
+ 8005c2e: 429a cmp r2, r3
+ 8005c30: d92e bls.n 8005c90
{
eeprom_write_buffer.save_busy=0;
- 8005ca6: 4a19 ldr r2, [pc, #100] ; (8005d0c )
- 8005ca8: 7c53 ldrb r3, [r2, #17]
- 8005caa: f36f 0300 bfc r3, #0, #1
- 8005cae: 7453 strb r3, [r2, #17]
+ 8005c32: 4a19 ldr r2, [pc, #100] ; (8005c98 )
+ 8005c34: 7c53 ldrb r3, [r2, #17]
+ 8005c36: f36f 0300 bfc r3, #0, #1
+ 8005c3a: 7453 strb r3, [r2, #17]
free(eeprom_write_buffer.head);
eeprom_write_buffer.head=buff;
}
}
}
- 8005cb0: e028 b.n 8005d04
+ 8005c3c: e028 b.n 8005c90
if(eeprom_write_buffer.head!=NULL)
- 8005cb2: 4b16 ldr r3, [pc, #88] ; (8005d0c )
- 8005cb4: 685b ldr r3, [r3, #4]
- 8005cb6: 2b00 cmp r3, #0
- 8005cb8: d024 beq.n 8005d04
+ 8005c3e: 4b16 ldr r3, [pc, #88] ; (8005c98 )
+ 8005c40: 685b ldr r3, [r3, #4]
+ 8005c42: 2b00 cmp r3, #0
+ 8005c44: d024 beq.n 8005c90
eeprom_write_buffer.save_busy=1;
- 8005cba: 4a14 ldr r2, [pc, #80] ; (8005d0c )
- 8005cbc: 7c53 ldrb r3, [r2, #17]
- 8005cbe: f043 0301 orr.w r3, r3, #1
- 8005cc2: 7453 strb r3, [r2, #17]
+ 8005c46: 4a14 ldr r2, [pc, #80] ; (8005c98 )
+ 8005c48: 7c53 ldrb r3, [r2, #17]
+ 8005c4a: f043 0301 orr.w r3, r3, #1
+ 8005c4e: 7453 strb r3, [r2, #17]
eeprom_write_buffer.save_time=HAL_GetTick()+eeprom_write_buffer.save_timeout;
- 8005cc4: f7fc f84a bl 8001d5c
- 8005cc8: 4603 mov r3, r0
- 8005cca: 4a10 ldr r2, [pc, #64] ; (8005d0c )
- 8005ccc: 7c12 ldrb r2, [r2, #16]
- 8005cce: 4413 add r3, r2
- 8005cd0: 4a0e ldr r2, [pc, #56] ; (8005d0c )
- 8005cd2: 60d3 str r3, [r2, #12]
+ 8005c50: f7fc f884 bl 8001d5c
+ 8005c54: 4603 mov r3, r0
+ 8005c56: 4a10 ldr r2, [pc, #64] ; (8005c98 )
+ 8005c58: 7c12 ldrb r2, [r2, #16]
+ 8005c5a: 4413 add r3, r2
+ 8005c5c: 4a0e ldr r2, [pc, #56] ; (8005c98 )
+ 8005c5e: 60d3 str r3, [r2, #12]
buff=eeprom_write_buffer.head->next;
- 8005cd4: 4b0d ldr r3, [pc, #52] ; (8005d0c )
- 8005cd6: 685b ldr r3, [r3, #4]
- 8005cd8: 681b ldr r3, [r3, #0]
- 8005cda: 607b str r3, [r7, #4]
+ 8005c60: 4b0d ldr r3, [pc, #52] ; (8005c98 )
+ 8005c62: 685b ldr r3, [r3, #4]
+ 8005c64: 681b ldr r3, [r3, #0]
+ 8005c66: 607b str r3, [r7, #4]
data=eeprom_write_buffer.head->date;
- 8005cdc: 4b0b ldr r3, [pc, #44] ; (8005d0c )
- 8005cde: 685b ldr r3, [r3, #4]
- 8005ce0: 799b ldrb r3, [r3, #6]
- 8005ce2: 70fb strb r3, [r7, #3]
+ 8005c68: 4b0b ldr r3, [pc, #44] ; (8005c98 )
+ 8005c6a: 685b ldr r3, [r3, #4]
+ 8005c6c: 799b ldrb r3, [r3, #6]
+ 8005c6e: 70fb strb r3, [r7, #3]
IIC_SAND_DATE(EEPROM_ADDRESS,eeprom_write_buffer.head->add,&data,1);
- 8005ce4: 4b09 ldr r3, [pc, #36] ; (8005d0c )
- 8005ce6: 685b ldr r3, [r3, #4]
- 8005ce8: 8899 ldrh r1, [r3, #4]
- 8005cea: 1cfa adds r2, r7, #3
- 8005cec: 2301 movs r3, #1
- 8005cee: 20a0 movs r0, #160 ; 0xa0
- 8005cf0: f000 f866 bl 8005dc0
+ 8005c70: 4b09 ldr r3, [pc, #36] ; (8005c98 )
+ 8005c72: 685b ldr r3, [r3, #4]
+ 8005c74: 8899 ldrh r1, [r3, #4]
+ 8005c76: 1cfa adds r2, r7, #3
+ 8005c78: 2301 movs r3, #1
+ 8005c7a: 20a0 movs r0, #160 ; 0xa0
+ 8005c7c: f000 f866 bl 8005d4c
free(eeprom_write_buffer.head);
- 8005cf4: 4b05 ldr r3, [pc, #20] ; (8005d0c )
- 8005cf6: 685b ldr r3, [r3, #4]
- 8005cf8: 4618 mov r0, r3
- 8005cfa: f001 fe2d bl 8007958
+ 8005c80: 4b05 ldr r3, [pc, #20] ; (8005c98 )
+ 8005c82: 685b ldr r3, [r3, #4]
+ 8005c84: 4618 mov r0, r3
+ 8005c86: f001 fb11 bl 80072ac
eeprom_write_buffer.head=buff;
- 8005cfe: 4a03 ldr r2, [pc, #12] ; (8005d0c )
- 8005d00: 687b ldr r3, [r7, #4]
- 8005d02: 6053 str r3, [r2, #4]
+ 8005c8a: 4a03 ldr r2, [pc, #12] ; (8005c98 )
+ 8005c8c: 687b ldr r3, [r7, #4]
+ 8005c8e: 6053 str r3, [r2, #4]
}
- 8005d04: bf00 nop
- 8005d06: 3708 adds r7, #8
- 8005d08: 46bd mov sp, r7
- 8005d0a: bd80 pop {r7, pc}
- 8005d0c: 20000398 .word 0x20000398
+ 8005c90: bf00 nop
+ 8005c92: 3708 adds r7, #8
+ 8005c94: 46bd mov sp, r7
+ 8005c96: bd80 pop {r7, pc}
+ 8005c98: 20000398 .word 0x20000398
-08005d10 :
+08005c9c :
//从eeprom读取数据
void EEPROM_READ_BATY(uint16_t IN_DEVICE_ADD,char *DATAS,uint16_t LONG)
{
- 8005d10: b580 push {r7, lr}
- 8005d12: b082 sub sp, #8
- 8005d14: af00 add r7, sp, #0
- 8005d16: 4603 mov r3, r0
- 8005d18: 6039 str r1, [r7, #0]
- 8005d1a: 80fb strh r3, [r7, #6]
- 8005d1c: 4613 mov r3, r2
- 8005d1e: 80bb strh r3, [r7, #4]
+ 8005c9c: b580 push {r7, lr}
+ 8005c9e: b082 sub sp, #8
+ 8005ca0: af00 add r7, sp, #0
+ 8005ca2: 4603 mov r3, r0
+ 8005ca4: 6039 str r1, [r7, #0]
+ 8005ca6: 80fb strh r3, [r7, #6]
+ 8005ca8: 4613 mov r3, r2
+ 8005caa: 80bb strh r3, [r7, #4]
IIC_READ_DATE(EEPROM_ADDRESS,IN_DEVICE_ADD,DATAS,LONG);
- 8005d20: 88bb ldrh r3, [r7, #4]
- 8005d22: 88f9 ldrh r1, [r7, #6]
- 8005d24: 683a ldr r2, [r7, #0]
- 8005d26: 20a0 movs r0, #160 ; 0xa0
- 8005d28: f000 f868 bl 8005dfc
+ 8005cac: 88bb ldrh r3, [r7, #4]
+ 8005cae: 88f9 ldrh r1, [r7, #6]
+ 8005cb0: 683a ldr r2, [r7, #0]
+ 8005cb2: 20a0 movs r0, #160 ; 0xa0
+ 8005cb4: f000 f868 bl 8005d88
}
- 8005d2c: bf00 nop
- 8005d2e: 3708 adds r7, #8
- 8005d30: 46bd mov sp, r7
- 8005d32: bd80 pop {r7, pc}
+ 8005cb8: bf00 nop
+ 8005cba: 3708 adds r7, #8
+ 8005cbc: 46bd mov sp, r7
+ 8005cbe: bd80 pop {r7, pc}
-08005d34 :
+08005cc0 :
//向eeprom写入数据
void EEPROM_WRITE_BATY(uint16_t IN_DEVICE_ADD,char *DATAS,uint16_t LONG)
{
- 8005d34: b580 push {r7, lr}
- 8005d36: b086 sub sp, #24
- 8005d38: af00 add r7, sp, #0
- 8005d3a: 4603 mov r3, r0
- 8005d3c: 6039 str r1, [r7, #0]
- 8005d3e: 80fb strh r3, [r7, #6]
- 8005d40: 4613 mov r3, r2
- 8005d42: 80bb strh r3, [r7, #4]
+ 8005cc0: b580 push {r7, lr}
+ 8005cc2: b086 sub sp, #24
+ 8005cc4: af00 add r7, sp, #0
+ 8005cc6: 4603 mov r3, r0
+ 8005cc8: 6039 str r1, [r7, #0]
+ 8005cca: 80fb strh r3, [r7, #6]
+ 8005ccc: 4613 mov r3, r2
+ 8005cce: 80bb strh r3, [r7, #4]
//IIC_SAND_DATE(EEPROM_ADDRESS,IN_DEVICE_ADD,DATAS,LONG);
uint16_t addoffset=0;
- 8005d44: 2300 movs r3, #0
- 8005d46: 82fb strh r3, [r7, #22]
+ 8005cd0: 2300 movs r3, #0
+ 8005cd2: 82fb strh r3, [r7, #22]
eeprom_write_buff *buff;
eeprom_write_buff *buff2;
while(LONG--)
- 8005d48: e02d b.n 8005da6
+ 8005cd4: e02d b.n 8005d32
{
buff =(eeprom_write_buff*)malloc(sizeof(eeprom_write_buff));
- 8005d4a: 2008 movs r0, #8
- 8005d4c: f001 fdfc bl 8007948
- 8005d50: 4603 mov r3, r0
- 8005d52: 613b str r3, [r7, #16]
+ 8005cd6: 2008 movs r0, #8
+ 8005cd8: f001 fae0 bl 800729c
+ 8005cdc: 4603 mov r3, r0
+ 8005cde: 613b str r3, [r7, #16]
if(buff!=NULL)
- 8005d54: 693b ldr r3, [r7, #16]
- 8005d56: 2b00 cmp r3, #0
- 8005d58: d02b beq.n 8005db2
+ 8005ce0: 693b ldr r3, [r7, #16]
+ 8005ce2: 2b00 cmp r3, #0
+ 8005ce4: d02b beq.n 8005d3e
{
buff->add=IN_DEVICE_ADD+addoffset;
- 8005d5a: 88fa ldrh r2, [r7, #6]
- 8005d5c: 8afb ldrh r3, [r7, #22]
- 8005d5e: 4413 add r3, r2
- 8005d60: b29a uxth r2, r3
- 8005d62: 693b ldr r3, [r7, #16]
- 8005d64: 809a strh r2, [r3, #4]
+ 8005ce6: 88fa ldrh r2, [r7, #6]
+ 8005ce8: 8afb ldrh r3, [r7, #22]
+ 8005cea: 4413 add r3, r2
+ 8005cec: b29a uxth r2, r3
+ 8005cee: 693b ldr r3, [r7, #16]
+ 8005cf0: 809a strh r2, [r3, #4]
buff->date=DATAS[addoffset];
- 8005d66: 8afb ldrh r3, [r7, #22]
- 8005d68: 683a ldr r2, [r7, #0]
- 8005d6a: 4413 add r3, r2
- 8005d6c: 781a ldrb r2, [r3, #0]
- 8005d6e: 693b ldr r3, [r7, #16]
- 8005d70: 719a strb r2, [r3, #6]
+ 8005cf2: 8afb ldrh r3, [r7, #22]
+ 8005cf4: 683a ldr r2, [r7, #0]
+ 8005cf6: 4413 add r3, r2
+ 8005cf8: 781a ldrb r2, [r3, #0]
+ 8005cfa: 693b ldr r3, [r7, #16]
+ 8005cfc: 719a strb r2, [r3, #6]
buff->next=NULL;
- 8005d72: 693b ldr r3, [r7, #16]
- 8005d74: 2200 movs r2, #0
- 8005d76: 601a str r2, [r3, #0]
+ 8005cfe: 693b ldr r3, [r7, #16]
+ 8005d00: 2200 movs r2, #0
+ 8005d02: 601a str r2, [r3, #0]
}else{return ;}
if(eeprom_write_buffer.head==NULL)
- 8005d78: 4b10 ldr r3, [pc, #64] ; (8005dbc )
- 8005d7a: 685b ldr r3, [r3, #4]
- 8005d7c: 2b00 cmp r3, #0
- 8005d7e: d106 bne.n 8005d8e
+ 8005d04: 4b10 ldr r3, [pc, #64] ; (8005d48 )
+ 8005d06: 685b ldr r3, [r3, #4]
+ 8005d08: 2b00 cmp r3, #0
+ 8005d0a: d106 bne.n 8005d1a
{
eeprom_write_buffer.head=buff;
- 8005d80: 4a0e ldr r2, [pc, #56] ; (8005dbc )
- 8005d82: 693b ldr r3, [r7, #16]
- 8005d84: 6053 str r3, [r2, #4]
+ 8005d0c: 4a0e ldr r2, [pc, #56] ; (8005d48 )
+ 8005d0e: 693b ldr r3, [r7, #16]
+ 8005d10: 6053 str r3, [r2, #4]
eeprom_write_buffer.end=buff;
- 8005d86: 4a0d ldr r2, [pc, #52] ; (8005dbc )
- 8005d88: 693b ldr r3, [r7, #16]
- 8005d8a: 6093 str r3, [r2, #8]
- 8005d8c: e008 b.n 8005da0
+ 8005d12: 4a0d ldr r2, [pc, #52] ; (8005d48 )
+ 8005d14: 693b ldr r3, [r7, #16]
+ 8005d16: 6093 str r3, [r2, #8]
+ 8005d18: e008 b.n 8005d2c
}else
{
buff2=eeprom_write_buffer.end;
- 8005d8e: 4b0b ldr r3, [pc, #44] ; (8005dbc )
- 8005d90: 689b ldr r3, [r3, #8]
- 8005d92: 60fb str r3, [r7, #12]
+ 8005d1a: 4b0b ldr r3, [pc, #44] ; (8005d48 )
+ 8005d1c: 689b ldr r3, [r3, #8]
+ 8005d1e: 60fb str r3, [r7, #12]
buff2->next=buff;
- 8005d94: 68fb ldr r3, [r7, #12]
- 8005d96: 693a ldr r2, [r7, #16]
- 8005d98: 601a str r2, [r3, #0]
+ 8005d20: 68fb ldr r3, [r7, #12]
+ 8005d22: 693a ldr r2, [r7, #16]
+ 8005d24: 601a str r2, [r3, #0]
eeprom_write_buffer.end=buff;
- 8005d9a: 4a08 ldr r2, [pc, #32] ; (8005dbc )
- 8005d9c: 693b ldr r3, [r7, #16]
- 8005d9e: 6093 str r3, [r2, #8]
+ 8005d26: 4a08 ldr r2, [pc, #32] ; (8005d48 )
+ 8005d28: 693b ldr r3, [r7, #16]
+ 8005d2a: 6093 str r3, [r2, #8]
}
addoffset++;
- 8005da0: 8afb ldrh r3, [r7, #22]
- 8005da2: 3301 adds r3, #1
- 8005da4: 82fb strh r3, [r7, #22]
+ 8005d2c: 8afb ldrh r3, [r7, #22]
+ 8005d2e: 3301 adds r3, #1
+ 8005d30: 82fb strh r3, [r7, #22]
while(LONG--)
- 8005da6: 88bb ldrh r3, [r7, #4]
- 8005da8: 1e5a subs r2, r3, #1
- 8005daa: 80ba strh r2, [r7, #4]
- 8005dac: 2b00 cmp r3, #0
- 8005dae: d1cc bne.n 8005d4a
- 8005db0: e000 b.n 8005db4
+ 8005d32: 88bb ldrh r3, [r7, #4]
+ 8005d34: 1e5a subs r2, r3, #1
+ 8005d36: 80ba strh r2, [r7, #4]
+ 8005d38: 2b00 cmp r3, #0
+ 8005d3a: d1cc bne.n 8005cd6
+ 8005d3c: e000 b.n 8005d40
}else{return ;}
- 8005db2: bf00 nop
+ 8005d3e: bf00 nop
}
}
- 8005db4: 3718 adds r7, #24
- 8005db6: 46bd mov sp, r7
- 8005db8: bd80 pop {r7, pc}
- 8005dba: bf00 nop
- 8005dbc: 20000398 .word 0x20000398
+ 8005d40: 3718 adds r7, #24
+ 8005d42: 46bd mov sp, r7
+ 8005d44: bd80 pop {r7, pc}
+ 8005d46: bf00 nop
+ 8005d48: 20000398 .word 0x20000398
-08005dc0 :
+08005d4c :
//iic硬件接口
extern I2C_HandleTypeDef hi2c2;
void IIC_SAND_DATE(uint16_t DEVICE_ADD,uint16_t IN_DEVICE_ADD,char *DATAS,uint16_t LONG)
{
- 8005dc0: b580 push {r7, lr}
- 8005dc2: b088 sub sp, #32
- 8005dc4: af04 add r7, sp, #16
- 8005dc6: 60ba str r2, [r7, #8]
- 8005dc8: 461a mov r2, r3
- 8005dca: 4603 mov r3, r0
- 8005dcc: 81fb strh r3, [r7, #14]
- 8005dce: 460b mov r3, r1
- 8005dd0: 81bb strh r3, [r7, #12]
- 8005dd2: 4613 mov r3, r2
- 8005dd4: 80fb strh r3, [r7, #6]
+ 8005d4c: b580 push {r7, lr}
+ 8005d4e: b088 sub sp, #32
+ 8005d50: af04 add r7, sp, #16
+ 8005d52: 60ba str r2, [r7, #8]
+ 8005d54: 461a mov r2, r3
+ 8005d56: 4603 mov r3, r0
+ 8005d58: 81fb strh r3, [r7, #14]
+ 8005d5a: 460b mov r3, r1
+ 8005d5c: 81bb strh r3, [r7, #12]
+ 8005d5e: 4613 mov r3, r2
+ 8005d60: 80fb strh r3, [r7, #6]
HAL_I2C_Mem_Write(&hi2c2,DEVICE_ADD,IN_DEVICE_ADD,I2C_MEMADD_SIZE_8BIT,DATAS,LONG,100);
- 8005dd6: 89ba ldrh r2, [r7, #12]
- 8005dd8: 89f9 ldrh r1, [r7, #14]
- 8005dda: 2364 movs r3, #100 ; 0x64
- 8005ddc: 9302 str r3, [sp, #8]
- 8005dde: 88fb ldrh r3, [r7, #6]
- 8005de0: 9301 str r3, [sp, #4]
- 8005de2: 68bb ldr r3, [r7, #8]
- 8005de4: 9300 str r3, [sp, #0]
- 8005de6: 2301 movs r3, #1
- 8005de8: 4803 ldr r0, [pc, #12] ; (8005df8 )
- 8005dea: f7fc fbfb bl 80025e4
+ 8005d62: 89ba ldrh r2, [r7, #12]
+ 8005d64: 89f9 ldrh r1, [r7, #14]
+ 8005d66: 2364 movs r3, #100 ; 0x64
+ 8005d68: 9302 str r3, [sp, #8]
+ 8005d6a: 88fb ldrh r3, [r7, #6]
+ 8005d6c: 9301 str r3, [sp, #4]
+ 8005d6e: 68bb ldr r3, [r7, #8]
+ 8005d70: 9300 str r3, [sp, #0]
+ 8005d72: 2301 movs r3, #1
+ 8005d74: 4803 ldr r0, [pc, #12] ; (8005d84 )
+ 8005d76: f7fc fc35 bl 80025e4
}
- 8005dee: bf00 nop
- 8005df0: 3710 adds r7, #16
- 8005df2: 46bd mov sp, r7
- 8005df4: bd80 pop {r7, pc}
- 8005df6: bf00 nop
- 8005df8: 200001f0 .word 0x200001f0
+ 8005d7a: bf00 nop
+ 8005d7c: 3710 adds r7, #16
+ 8005d7e: 46bd mov sp, r7
+ 8005d80: bd80 pop {r7, pc}
+ 8005d82: bf00 nop
+ 8005d84: 200001f0 .word 0x200001f0
-08005dfc :
+08005d88 :
void IIC_READ_DATE(uint16_t DEVICE_ADD,uint16_t IN_DEVICE_ADD,char *DATAS,uint16_t LONG)
{
- 8005dfc: b580 push {r7, lr}
- 8005dfe: b088 sub sp, #32
- 8005e00: af04 add r7, sp, #16
- 8005e02: 60ba str r2, [r7, #8]
- 8005e04: 461a mov r2, r3
- 8005e06: 4603 mov r3, r0
- 8005e08: 81fb strh r3, [r7, #14]
- 8005e0a: 460b mov r3, r1
- 8005e0c: 81bb strh r3, [r7, #12]
- 8005e0e: 4613 mov r3, r2
- 8005e10: 80fb strh r3, [r7, #6]
+ 8005d88: b580 push {r7, lr}
+ 8005d8a: b088 sub sp, #32
+ 8005d8c: af04 add r7, sp, #16
+ 8005d8e: 60ba str r2, [r7, #8]
+ 8005d90: 461a mov r2, r3
+ 8005d92: 4603 mov r3, r0
+ 8005d94: 81fb strh r3, [r7, #14]
+ 8005d96: 460b mov r3, r1
+ 8005d98: 81bb strh r3, [r7, #12]
+ 8005d9a: 4613 mov r3, r2
+ 8005d9c: 80fb strh r3, [r7, #6]
HAL_I2C_Mem_Read(&hi2c2,DEVICE_ADD,IN_DEVICE_ADD,I2C_MEMADD_SIZE_8BIT,DATAS,LONG,100);
- 8005e12: 89ba ldrh r2, [r7, #12]
- 8005e14: 89f9 ldrh r1, [r7, #14]
- 8005e16: 2364 movs r3, #100 ; 0x64
- 8005e18: 9302 str r3, [sp, #8]
- 8005e1a: 88fb ldrh r3, [r7, #6]
- 8005e1c: 9301 str r3, [sp, #4]
- 8005e1e: 68bb ldr r3, [r7, #8]
- 8005e20: 9300 str r3, [sp, #0]
- 8005e22: 2301 movs r3, #1
- 8005e24: 4803 ldr r0, [pc, #12] ; (8005e34 )
- 8005e26: f7fc fcd7 bl 80027d8
+ 8005d9e: 89ba ldrh r2, [r7, #12]
+ 8005da0: 89f9 ldrh r1, [r7, #14]
+ 8005da2: 2364 movs r3, #100 ; 0x64
+ 8005da4: 9302 str r3, [sp, #8]
+ 8005da6: 88fb ldrh r3, [r7, #6]
+ 8005da8: 9301 str r3, [sp, #4]
+ 8005daa: 68bb ldr r3, [r7, #8]
+ 8005dac: 9300 str r3, [sp, #0]
+ 8005dae: 2301 movs r3, #1
+ 8005db0: 4803 ldr r0, [pc, #12] ; (8005dc0 )
+ 8005db2: f7fc fd11 bl 80027d8
}
- 8005e2a: bf00 nop
- 8005e2c: 3710 adds r7, #16
- 8005e2e: 46bd mov sp, r7
- 8005e30: bd80 pop {r7, pc}
- 8005e32: bf00 nop
- 8005e34: 200001f0 .word 0x200001f0
+ 8005db6: bf00 nop
+ 8005db8: 3710 adds r7, #16
+ 8005dba: 46bd mov sp, r7
+ 8005dbc: bd80 pop {r7, pc}
+ 8005dbe: bf00 nop
+ 8005dc0: 200001f0 .word 0x200001f0
-08005e38 :
+08005dc4 :
#include "key.h"
struct button k1,k2,k3;
void GEI_BUTTON_CODE(struct button *bt,uint8_t in)
{
- 8005e38: b580 push {r7, lr}
- 8005e3a: b082 sub sp, #8
- 8005e3c: af00 add r7, sp, #0
- 8005e3e: 6078 str r0, [r7, #4]
- 8005e40: 460b mov r3, r1
- 8005e42: 70fb strb r3, [r7, #3]
+ 8005dc4: b580 push {r7, lr}
+ 8005dc6: b082 sub sp, #8
+ 8005dc8: af00 add r7, sp, #0
+ 8005dca: 6078 str r0, [r7, #4]
+ 8005dcc: 460b mov r3, r1
+ 8005dce: 70fb strb r3, [r7, #3]
#define t 250
bt->code=0;
- 8005e44: 687b ldr r3, [r7, #4]
- 8005e46: 2200 movs r2, #0
- 8005e48: 601a str r2, [r3, #0]
+ 8005dd0: 687b ldr r3, [r7, #4]
+ 8005dd2: 2200 movs r2, #0
+ 8005dd4: 601a str r2, [r3, #0]
if(in==0)
- 8005e4a: 78fb ldrb r3, [r7, #3]
- 8005e4c: 2b00 cmp r3, #0
- 8005e4e: d138 bne.n 8005ec2
+ 8005dd6: 78fb ldrb r3, [r7, #3]
+ 8005dd8: 2b00 cmp r3, #0
+ 8005dda: d138 bne.n 8005e4e
{
if(bt->lock==0)
- 8005e50: 687b ldr r3, [r7, #4]
- 8005e52: 791b ldrb r3, [r3, #4]
- 8005e54: 2b00 cmp r3, #0
- 8005e56: d120 bne.n 8005e9a
+ 8005ddc: 687b ldr r3, [r7, #4]
+ 8005dde: 791b ldrb r3, [r3, #4]
+ 8005de0: 2b00 cmp r3, #0
+ 8005de2: d120 bne.n 8005e26
{
if(HAL_GetTick()time+t)
- 8005e58: f7fb ff80 bl 8001d5c
- 8005e5c: 4602 mov r2, r0
- 8005e5e: 687b ldr r3, [r7, #4]
- 8005e60: 689b ldr r3, [r3, #8]
- 8005e62: 33fa adds r3, #250 ; 0xfa
- 8005e64: 429a cmp r2, r3
- 8005e66: d20d bcs.n 8005e84
+ 8005de4: f7fb ffba bl 8001d5c
+ 8005de8: 4602 mov r2, r0
+ 8005dea: 687b ldr r3, [r7, #4]
+ 8005dec: 689b ldr r3, [r3, #8]
+ 8005dee: 33fa adds r3, #250 ; 0xfa
+ 8005df0: 429a cmp r2, r3
+ 8005df2: d20d bcs.n 8005e10
{
bt->times++;
- 8005e68: 687b ldr r3, [r7, #4]
- 8005e6a: 68db ldr r3, [r3, #12]
- 8005e6c: 1c5a adds r2, r3, #1
- 8005e6e: 687b ldr r3, [r7, #4]
- 8005e70: 60da str r2, [r3, #12]
+ 8005df4: 687b ldr r3, [r7, #4]
+ 8005df6: 68db ldr r3, [r3, #12]
+ 8005df8: 1c5a adds r2, r3, #1
+ 8005dfa: 687b ldr r3, [r7, #4]
+ 8005dfc: 60da str r2, [r3, #12]
bt->time=HAL_GetTick();
- 8005e72: f7fb ff73 bl 8001d5c
- 8005e76: 4602 mov r2, r0
- 8005e78: 687b ldr r3, [r7, #4]
- 8005e7a: 609a str r2, [r3, #8]
+ 8005dfe: f7fb ffad bl 8001d5c
+ 8005e02: 4602 mov r2, r0
+ 8005e04: 687b ldr r3, [r7, #4]
+ 8005e06: 609a str r2, [r3, #8]
bt->lock=1;
- 8005e7c: 687b ldr r3, [r7, #4]
- 8005e7e: 2201 movs r2, #1
- 8005e80: 711a strb r2, [r3, #4]
- 8005e82: e00a b.n 8005e9a
+ 8005e08: 687b ldr r3, [r7, #4]
+ 8005e0a: 2201 movs r2, #1
+ 8005e0c: 711a strb r2, [r3, #4]
+ 8005e0e: e00a b.n 8005e26
}else
{
bt->times=1;
- 8005e84: 687b ldr r3, [r7, #4]
- 8005e86: 2201 movs r2, #1
- 8005e88: 60da str r2, [r3, #12]
+ 8005e10: 687b ldr r3, [r7, #4]
+ 8005e12: 2201 movs r2, #1
+ 8005e14: 60da str r2, [r3, #12]
bt->time=HAL_GetTick();
- 8005e8a: f7fb ff67 bl 8001d5c
- 8005e8e: 4602 mov r2, r0
- 8005e90: 687b ldr r3, [r7, #4]
- 8005e92: 609a str r2, [r3, #8]
+ 8005e16: f7fb ffa1 bl 8001d5c
+ 8005e1a: 4602 mov r2, r0
+ 8005e1c: 687b ldr r3, [r7, #4]
+ 8005e1e: 609a str r2, [r3, #8]
bt->lock=1;
- 8005e94: 687b ldr r3, [r7, #4]
- 8005e96: 2201 movs r2, #1
- 8005e98: 711a strb r2, [r3, #4]
+ 8005e20: 687b ldr r3, [r7, #4]
+ 8005e22: 2201 movs r2, #1
+ 8005e24: 711a strb r2, [r3, #4]
}
}
if(bt->lock==1)
- 8005e9a: 687b ldr r3, [r7, #4]
- 8005e9c: 791b ldrb r3, [r3, #4]
- 8005e9e: 2b01 cmp r3, #1
- 8005ea0: d10f bne.n 8005ec2
+ 8005e26: 687b ldr r3, [r7, #4]
+ 8005e28: 791b ldrb r3, [r3, #4]
+ 8005e2a: 2b01 cmp r3, #1
+ 8005e2c: d10f bne.n 8005e4e
{
if(HAL_GetTick()>bt->time+t)
- 8005ea2: f7fb ff5b bl 8001d5c
- 8005ea6: 4602 mov r2, r0
- 8005ea8: 687b ldr r3, [r7, #4]
- 8005eaa: 689b ldr r3, [r3, #8]
- 8005eac: 33fa adds r3, #250 ; 0xfa
- 8005eae: 429a cmp r2, r3
- 8005eb0: d907 bls.n 8005ec2
+ 8005e2e: f7fb ff95 bl 8001d5c
+ 8005e32: 4602 mov r2, r0
+ 8005e34: 687b ldr r3, [r7, #4]
+ 8005e36: 689b ldr r3, [r3, #8]
+ 8005e38: 33fa adds r3, #250 ; 0xfa
+ 8005e3a: 429a cmp r2, r3
+ 8005e3c: d907 bls.n 8005e4e
{
bt->code=-1;
- 8005eb2: 687b ldr r3, [r7, #4]
- 8005eb4: f04f 32ff mov.w r2, #4294967295
- 8005eb8: 601a str r2, [r3, #0]
+ 8005e3e: 687b ldr r3, [r7, #4]
+ 8005e40: f04f 32ff mov.w r2, #4294967295
+ 8005e44: 601a str r2, [r3, #0]
bt->times=-1;
- 8005eba: 687b ldr r3, [r7, #4]
- 8005ebc: f04f 32ff mov.w r2, #4294967295
- 8005ec0: 60da str r2, [r3, #12]
+ 8005e46: 687b ldr r3, [r7, #4]
+ 8005e48: f04f 32ff mov.w r2, #4294967295
+ 8005e4c: 60da str r2, [r3, #12]
}
}
}
if(in==1)
- 8005ec2: 78fb ldrb r3, [r7, #3]
- 8005ec4: 2b01 cmp r3, #1
- 8005ec6: d10f bne.n 8005ee8
+ 8005e4e: 78fb ldrb r3, [r7, #3]
+ 8005e50: 2b01 cmp r3, #1
+ 8005e52: d10f bne.n 8005e74
{
if(bt->lock==1)
- 8005ec8: 687b ldr r3, [r7, #4]
- 8005eca: 791b ldrb r3, [r3, #4]
- 8005ecc: 2b01 cmp r3, #1
- 8005ece: d10b bne.n 8005ee8
+ 8005e54: 687b ldr r3, [r7, #4]
+ 8005e56: 791b ldrb r3, [r3, #4]
+ 8005e58: 2b01 cmp r3, #1
+ 8005e5a: d10b bne.n 8005e74
{
if(bt->code==-1)
- 8005ed0: 687b ldr r3, [r7, #4]
- 8005ed2: 681b ldr r3, [r3, #0]
- 8005ed4: f1b3 3fff cmp.w r3, #4294967295
- 8005ed8: d003 beq.n 8005ee2
+ 8005e5c: 687b ldr r3, [r7, #4]
+ 8005e5e: 681b ldr r3, [r3, #0]
+ 8005e60: f1b3 3fff cmp.w r3, #4294967295
+ 8005e64: d003 beq.n 8005e6e
{
}else
{
bt->code=bt->times;
- 8005eda: 687b ldr r3, [r7, #4]
- 8005edc: 68da ldr r2, [r3, #12]
- 8005ede: 687b ldr r3, [r7, #4]
- 8005ee0: 601a str r2, [r3, #0]
+ 8005e66: 687b ldr r3, [r7, #4]
+ 8005e68: 68da ldr r2, [r3, #12]
+ 8005e6a: 687b ldr r3, [r7, #4]
+ 8005e6c: 601a str r2, [r3, #0]
}
bt->lock=0;
- 8005ee2: 687b ldr r3, [r7, #4]
- 8005ee4: 2200 movs r2, #0
- 8005ee6: 711a strb r2, [r3, #4]
+ 8005e6e: 687b ldr r3, [r7, #4]
+ 8005e70: 2200 movs r2, #0
+ 8005e72: 711a strb r2, [r3, #4]
}
}
}
- 8005ee8: bf00 nop
- 8005eea: 3708 adds r7, #8
- 8005eec: 46bd mov sp, r7
- 8005eee: bd80 pop {r7, pc}
+ 8005e74: bf00 nop
+ 8005e76: 3708 adds r7, #8
+ 8005e78: 46bd mov sp, r7
+ 8005e7a: bd80 pop {r7, pc}
-08005ef0 :
+08005e7c :
//SPI写数据
//向触摸屏IC写入1byte数据
//num:要写入的数据
void TP_Write_Byte(char num)
{
- 8005ef0: b580 push {r7, lr}
- 8005ef2: b084 sub sp, #16
- 8005ef4: af00 add r7, sp, #0
- 8005ef6: 4603 mov r3, r0
- 8005ef8: 71fb strb r3, [r7, #7]
+ 8005e7c: b580 push {r7, lr}
+ 8005e7e: b084 sub sp, #16
+ 8005e80: af00 add r7, sp, #0
+ 8005e82: 4603 mov r3, r0
+ 8005e84: 71fb strb r3, [r7, #7]
for(uint8_t count=0;count<8;count++)
- 8005efa: 2300 movs r3, #0
- 8005efc: 73fb strb r3, [r7, #15]
- 8005efe: e020 b.n 8005f42
+ 8005e86: 2300 movs r3, #0
+ 8005e88: 73fb strb r3, [r7, #15]
+ 8005e8a: e020 b.n 8005ece
{
if(num&0x80){TDIN(1);}
- 8005f00: f997 3007 ldrsb.w r3, [r7, #7]
- 8005f04: 2b00 cmp r3, #0
- 8005f06: da06 bge.n 8005f16
- 8005f08: 2201 movs r2, #1
- 8005f0a: f44f 7100 mov.w r1, #512 ; 0x200
- 8005f0e: 4811 ldr r0, [pc, #68] ; (8005f54 )
- 8005f10: f7fc fa0b bl 800232a
- 8005f14: e005 b.n 8005f22
+ 8005e8c: f997 3007 ldrsb.w r3, [r7, #7]
+ 8005e90: 2b00 cmp r3, #0
+ 8005e92: da06 bge.n 8005ea2
+ 8005e94: 2201 movs r2, #1
+ 8005e96: f44f 7100 mov.w r1, #512 ; 0x200
+ 8005e9a: 4811 ldr r0, [pc, #68] ; (8005ee0 )
+ 8005e9c: f7fc fa45 bl 800232a
+ 8005ea0: e005 b.n 8005eae
else {TDIN(0);}
- 8005f16: 2200 movs r2, #0
- 8005f18: f44f 7100 mov.w r1, #512 ; 0x200
- 8005f1c: 480d ldr r0, [pc, #52] ; (8005f54 )
- 8005f1e: f7fc fa04 bl 800232a
+ 8005ea2: 2200 movs r2, #0
+ 8005ea4: f44f 7100 mov.w r1, #512 ; 0x200
+ 8005ea8: 480d ldr r0, [pc, #52] ; (8005ee0 )
+ 8005eaa: f7fc fa3e bl 800232a
num<<=1;
- 8005f22: 79fb ldrb r3, [r7, #7]
- 8005f24: 005b lsls r3, r3, #1
- 8005f26: 71fb strb r3, [r7, #7]
+ 8005eae: 79fb ldrb r3, [r7, #7]
+ 8005eb0: 005b lsls r3, r3, #1
+ 8005eb2: 71fb strb r3, [r7, #7]
TCLK(0);
- 8005f28: 2200 movs r2, #0
- 8005f2a: 2102 movs r1, #2
- 8005f2c: 480a ldr r0, [pc, #40] ; (8005f58 )
- 8005f2e: f7fc f9fc bl 800232a
+ 8005eb4: 2200 movs r2, #0
+ 8005eb6: 2102 movs r1, #2
+ 8005eb8: 480a ldr r0, [pc, #40] ; (8005ee4 )
+ 8005eba: f7fc fa36 bl 800232a
TCLK(1); //上升沿有效
- 8005f32: 2201 movs r2, #1
- 8005f34: 2102 movs r1, #2
- 8005f36: 4808 ldr r0, [pc, #32] ; (8005f58 )
- 8005f38: f7fc f9f7 bl 800232a
+ 8005ebe: 2201 movs r2, #1
+ 8005ec0: 2102 movs r1, #2
+ 8005ec2: 4808 ldr r0, [pc, #32] ; (8005ee4 )
+ 8005ec4: f7fc fa31 bl 800232a
for(uint8_t count=0;count<8;count++)
- 8005f3c: 7bfb ldrb r3, [r7, #15]
- 8005f3e: 3301 adds r3, #1
- 8005f40: 73fb strb r3, [r7, #15]
- 8005f42: 7bfb ldrb r3, [r7, #15]
- 8005f44: 2b07 cmp r3, #7
- 8005f46: d9db bls.n 8005f00
+ 8005ec8: 7bfb ldrb r3, [r7, #15]
+ 8005eca: 3301 adds r3, #1
+ 8005ecc: 73fb strb r3, [r7, #15]
+ 8005ece: 7bfb ldrb r3, [r7, #15]
+ 8005ed0: 2b07 cmp r3, #7
+ 8005ed2: d9db bls.n 8005e8c
}
}
- 8005f48: bf00 nop
- 8005f4a: bf00 nop
- 8005f4c: 3710 adds r7, #16
- 8005f4e: 46bd mov sp, r7
- 8005f50: bd80 pop {r7, pc}
- 8005f52: bf00 nop
- 8005f54: 40011c00 .word 0x40011c00
- 8005f58: 40010c00 .word 0x40010c00
+ 8005ed4: bf00 nop
+ 8005ed6: bf00 nop
+ 8005ed8: 3710 adds r7, #16
+ 8005eda: 46bd mov sp, r7
+ 8005edc: bd80 pop {r7, pc}
+ 8005ede: bf00 nop
+ 8005ee0: 40011c00 .word 0x40011c00
+ 8005ee4: 40010c00 .word 0x40010c00
-08005f5c :
+08005ee8 :
//SPI读数据
//从触摸屏IC读取adc值
//CMD:指令
//返回值:读到的数据
uint16_t TP_Read_AD(char CMD)
{
- 8005f5c: b580 push {r7, lr}
- 8005f5e: b084 sub sp, #16
- 8005f60: af00 add r7, sp, #0
- 8005f62: 4603 mov r3, r0
- 8005f64: 71fb strb r3, [r7, #7]
+ 8005ee8: b580 push {r7, lr}
+ 8005eea: b084 sub sp, #16
+ 8005eec: af00 add r7, sp, #0
+ 8005eee: 4603 mov r3, r0
+ 8005ef0: 71fb strb r3, [r7, #7]
uint16_t Num=0;
- 8005f66: 2300 movs r3, #0
- 8005f68: 81fb strh r3, [r7, #14]
+ 8005ef2: 2300 movs r3, #0
+ 8005ef4: 81fb strh r3, [r7, #14]
TCLK(0); //先拉低时钟
- 8005f6a: 2200 movs r2, #0
- 8005f6c: 2102 movs r1, #2
- 8005f6e: 482b ldr r0, [pc, #172] ; (800601c )
- 8005f70: f7fc f9db bl 800232a
+ 8005ef6: 2200 movs r2, #0
+ 8005ef8: 2102 movs r1, #2
+ 8005efa: 482b ldr r0, [pc, #172] ; (8005fa8 )
+ 8005efc: f7fc fa15 bl 800232a
TDIN(0); //拉低数据线
- 8005f74: 2200 movs r2, #0
- 8005f76: f44f 7100 mov.w r1, #512 ; 0x200
- 8005f7a: 4829 ldr r0, [pc, #164] ; (8006020 )
- 8005f7c: f7fc f9d5 bl 800232a
+ 8005f00: 2200 movs r2, #0
+ 8005f02: f44f 7100 mov.w r1, #512 ; 0x200
+ 8005f06: 4829 ldr r0, [pc, #164] ; (8005fac