ADC通道好像有问题

This commit is contained in:
2021-11-05 00:26:34 +08:00
parent 1b84ff76e5
commit 44deedff4b
8 changed files with 1536 additions and 1313 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ static void MX_ADC_Init(void)
hadc.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
hadc.Init.LowPowerAutoWait = DISABLE;
hadc.Init.LowPowerAutoPowerOff = DISABLE;
hadc.Init.ContinuousConvMode = DISABLE;
hadc.Init.ContinuousConvMode = ENABLE;
hadc.Init.DiscontinuousConvMode = DISABLE;
hadc.Init.ExternalTrigConv = ADC_SOFTWARE_START;
hadc.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
Binary file not shown.
+1411 -1223
View File
File diff suppressed because it is too large Load Diff
+82 -82
View File
@@ -3534,7 +3534,7 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id
0x0000000008000000 g_pfnVectors
0x00000000080000c0 . = ALIGN (0x4)
.text 0x00000000080000c0 0x3d70
.text 0x00000000080000c0 0x3ec8
0x00000000080000c0 . = ALIGN (0x4)
*(.text)
.text 0x00000000080000c0 0x48 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
@@ -3801,109 +3801,109 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id
.text.check_need_reset
0x0000000008003340 0xd8 ./my_software/my_code.o
0x0000000008003340 check_need_reset
.text.my_code 0x0000000008003418 0x804 ./my_software/my_code.o
.text.my_code 0x0000000008003418 0x95c ./my_software/my_code.o
0x0000000008003418 my_code
.text.r480_init
0x0000000008003c1c 0x20 ./my_software/r480r.o
0x0000000008003c1c r480_init
.text.read_433_exit
0x0000000008003c3c 0x138 ./my_software/r480r.o
0x0000000008003c3c read_433_exit
.text.HAL_GPIO_EXTI_Callback
0x0000000008003d74 0x20 ./my_software/r480r.o
0x0000000008003d74 HAL_GPIO_EXTI_Callback
0x0000000008003d74 r480_init
.text.read_433_exit
0x0000000008003d94 0x138 ./my_software/r480r.o
0x0000000008003d94 read_433_exit
.text.HAL_GPIO_EXTI_Callback
0x0000000008003ecc 0x20 ./my_software/r480r.o
0x0000000008003ecc HAL_GPIO_EXTI_Callback
.text.HAL_TIM_PeriodElapsedCallback
0x0000000008003d94 0x2c ./my_software/r480r.o
0x0000000008003d94 HAL_TIM_PeriodElapsedCallback
0x0000000008003eec 0x2c ./my_software/r480r.o
0x0000000008003eec HAL_TIM_PeriodElapsedCallback
.text.__libc_init_array
0x0000000008003dc0 0x48 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(lib_a-init.o)
0x0000000008003dc0 __libc_init_array
.text.memset 0x0000000008003e08 0x10 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(lib_a-memset.o)
0x0000000008003e08 memset
0x0000000008003f18 0x48 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(lib_a-init.o)
0x0000000008003f18 __libc_init_array
.text.memset 0x0000000008003f60 0x10 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(lib_a-memset.o)
0x0000000008003f60 memset
*(.glue_7)
.glue_7 0x0000000008003e18 0x0 linker stubs
.glue_7 0x0000000008003f70 0x0 linker stubs
*(.glue_7t)
.glue_7t 0x0000000008003e18 0x0 linker stubs
.glue_7t 0x0000000008003f70 0x0 linker stubs
*(.eh_frame)
.eh_frame 0x0000000008003e18 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
.eh_frame 0x0000000008003f70 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
*(.init)
.init 0x0000000008003e18 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crti.o
0x0000000008003e18 _init
.init 0x0000000008003e1c 0x8 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtn.o
.init 0x0000000008003f70 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crti.o
0x0000000008003f70 _init
.init 0x0000000008003f74 0x8 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtn.o
*(.fini)
.fini 0x0000000008003e24 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crti.o
0x0000000008003e24 _fini
.fini 0x0000000008003e28 0x8 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtn.o
0x0000000008003e30 . = ALIGN (0x4)
0x0000000008003e30 _etext = .
.fini 0x0000000008003f7c 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crti.o
0x0000000008003f7c _fini
.fini 0x0000000008003f80 0x8 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtn.o
0x0000000008003f88 . = ALIGN (0x4)
0x0000000008003f88 _etext = .
.vfp11_veneer 0x0000000008003e30 0x0
.vfp11_veneer 0x0000000008003e30 0x0 linker stubs
.vfp11_veneer 0x0000000008003f88 0x0
.vfp11_veneer 0x0000000008003f88 0x0 linker stubs
.v4_bx 0x0000000008003e30 0x0
.v4_bx 0x0000000008003e30 0x0 linker stubs
.v4_bx 0x0000000008003f88 0x0
.v4_bx 0x0000000008003f88 0x0 linker stubs
.iplt 0x0000000008003e30 0x0
.iplt 0x0000000008003e30 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
.iplt 0x0000000008003f88 0x0
.iplt 0x0000000008003f88 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
.rodata 0x0000000008003e30 0x58
0x0000000008003e30 . = ALIGN (0x4)
.rodata 0x0000000008003f88 0x60
0x0000000008003f88 . = ALIGN (0x4)
*(.rodata)
.rodata 0x0000000008003e30 0x20 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.o
.rodata 0x0000000008003f88 0x20 ./Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.o
*(.rodata*)
.rodata.AHBPrescTable
0x0000000008003e50 0x10 ./Core/Src/system_stm32f0xx.o
0x0000000008003e50 AHBPrescTable
0x0000000008003fa8 0x10 ./Core/Src/system_stm32f0xx.o
0x0000000008003fa8 AHBPrescTable
.rodata.LED_Tab
0x0000000008003e60 0x12 ./my_software/my_code.o
0x0000000008003e60 LED_Tab
*fill* 0x0000000008003e72 0x2
0x0000000008003fb8 0x12 ./my_software/my_code.o
0x0000000008003fb8 LED_Tab
*fill* 0x0000000008003fca 0x2
.rodata.my_code
0x0000000008003e74 0x14 ./my_software/my_code.o
0x0000000008003e88 . = ALIGN (0x4)
0x0000000008003fcc 0x1c ./my_software/my_code.o
0x0000000008003fe8 . = ALIGN (0x4)
.rel.dyn 0x0000000008003e88 0x0
.rel.iplt 0x0000000008003e88 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
.rel.dyn 0x0000000008003fe8 0x0
.rel.iplt 0x0000000008003fe8 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
.ARM.extab 0x0000000008003e88 0x0
0x0000000008003e88 . = ALIGN (0x4)
.ARM.extab 0x0000000008003fe8 0x0
0x0000000008003fe8 . = ALIGN (0x4)
*(.ARM.extab* .gnu.linkonce.armextab.*)
0x0000000008003e88 . = ALIGN (0x4)
0x0000000008003fe8 . = ALIGN (0x4)
.ARM 0x0000000008003e88 0x0
0x0000000008003e88 . = ALIGN (0x4)
0x0000000008003e88 __exidx_start = .
.ARM 0x0000000008003fe8 0x0
0x0000000008003fe8 . = ALIGN (0x4)
0x0000000008003fe8 __exidx_start = .
*(.ARM.exidx*)
0x0000000008003e88 __exidx_end = .
0x0000000008003e88 . = ALIGN (0x4)
0x0000000008003fe8 __exidx_end = .
0x0000000008003fe8 . = ALIGN (0x4)
.preinit_array 0x0000000008003e88 0x0
0x0000000008003e88 . = ALIGN (0x4)
0x0000000008003e88 PROVIDE (__preinit_array_start = .)
.preinit_array 0x0000000008003fe8 0x0
0x0000000008003fe8 . = ALIGN (0x4)
0x0000000008003fe8 PROVIDE (__preinit_array_start = .)
*(.preinit_array*)
0x0000000008003e88 PROVIDE (__preinit_array_end = .)
0x0000000008003e88 . = ALIGN (0x4)
0x0000000008003fe8 PROVIDE (__preinit_array_end = .)
0x0000000008003fe8 . = ALIGN (0x4)
.init_array 0x0000000008003e88 0x4
0x0000000008003e88 . = ALIGN (0x4)
0x0000000008003e88 PROVIDE (__init_array_start = .)
.init_array 0x0000000008003fe8 0x4
0x0000000008003fe8 . = ALIGN (0x4)
0x0000000008003fe8 PROVIDE (__init_array_start = .)
*(SORT_BY_NAME(.init_array.*))
*(.init_array*)
.init_array 0x0000000008003e88 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
0x0000000008003e8c PROVIDE (__init_array_end = .)
0x0000000008003e8c . = ALIGN (0x4)
.init_array 0x0000000008003fe8 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
0x0000000008003fec PROVIDE (__init_array_end = .)
0x0000000008003fec . = ALIGN (0x4)
.fini_array 0x0000000008003e8c 0x4
0x0000000008003e8c . = ALIGN (0x4)
.fini_array 0x0000000008003fec 0x4
0x0000000008003fec . = ALIGN (0x4)
[!provide] PROVIDE (__fini_array_start = .)
*(SORT_BY_NAME(.fini_array.*))
*(.fini_array*)
.fini_array 0x0000000008003e8c 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
.fini_array 0x0000000008003fec 0x4 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
[!provide] PROVIDE (__fini_array_end = .)
0x0000000008003e90 . = ALIGN (0x4)
0x0000000008003e90 _sidata = LOADADDR (.data)
0x0000000008003ff0 . = ALIGN (0x4)
0x0000000008003ff0 _sidata = LOADADDR (.data)
.data 0x0000000020000000 0xc load address 0x0000000008003e90
.data 0x0000000020000000 0xc load address 0x0000000008003ff0
0x0000000020000000 . = ALIGN (0x4)
0x0000000020000000 _sdata = .
*(.data)
@@ -3923,11 +3923,11 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id
*fill* 0x0000000020000009 0x3
0x000000002000000c _edata = .
.igot.plt 0x000000002000000c 0x0 load address 0x0000000008003e9c
.igot.plt 0x000000002000000c 0x0 load address 0x0000000008003ffc
.igot.plt 0x000000002000000c 0x0 /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/crtbegin.o
0x000000002000000c . = ALIGN (0x4)
.bss 0x000000002000000c 0x164 load address 0x0000000008003e9c
.bss 0x000000002000000c 0x164 load address 0x0000000008003ffc
0x000000002000000c _sbss = .
0x000000002000000c __bss_start__ = _sbss
*(.bss)
@@ -3973,7 +3973,7 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id
0x0000000020000170 __bss_end__ = _ebss
._user_heap_stack
0x0000000020000170 0x600 load address 0x0000000008003e9c
0x0000000020000170 0x600 load address 0x0000000008003ffc
0x0000000020000170 . = ALIGN (0x8)
[!provide] PROVIDE (end = .)
0x0000000020000170 PROVIDE (_end = .)
@@ -4053,7 +4053,7 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id
LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libm.a
LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_2.0.0.202105311346/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/thumb/v6-m/nofp/libgcc.a
.debug_info 0x0000000000000000 0xbe72
.debug_info 0x0000000000000000 0xbeb2
.debug_info 0x0000000000000000 0xf4c ./Core/Src/main.o
.debug_info 0x0000000000000f4c 0xcdc ./Core/Src/stm32f0xx_hal_msp.o
.debug_info 0x0000000000001c28 0x76a ./Core/Src/stm32f0xx_it.o
@@ -4072,8 +4072,8 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id
.debug_info 0x0000000000009f93 0x2d3 ./my_software/gpio.o
.debug_info 0x000000000000a266 0x3cc ./my_software/ht1621.o
.debug_info 0x000000000000a632 0x3ea ./my_software/iic.o
.debug_info 0x000000000000aa1c 0xb67 ./my_software/my_code.o
.debug_info 0x000000000000b583 0x8ef ./my_software/r480r.o
.debug_info 0x000000000000aa1c 0xba7 ./my_software/my_code.o
.debug_info 0x000000000000b5c3 0x8ef ./my_software/r480r.o
.debug_abbrev 0x0000000000000000 0x22ae
.debug_abbrev 0x0000000000000000 0x23c ./Core/Src/main.o
@@ -4229,7 +4229,7 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id
.debug_macro 0x0000000000010216 0x4c ./my_software/my_code.o
.debug_macro 0x0000000000010262 0x1e0 ./my_software/r480r.o
.debug_line 0x0000000000000000 0xf1bf
.debug_line 0x0000000000000000 0xf24c
.debug_line 0x0000000000000000 0x8df ./Core/Src/main.o
.debug_line 0x00000000000008df 0x793 ./Core/Src/stm32f0xx_hal_msp.o
.debug_line 0x0000000000001072 0x7a5 ./Core/Src/stm32f0xx_it.o
@@ -4248,10 +4248,10 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id
.debug_line 0x000000000000c3c8 0x725 ./my_software/gpio.o
.debug_line 0x000000000000caed 0x835 ./my_software/ht1621.o
.debug_line 0x000000000000d322 0x923 ./my_software/iic.o
.debug_line 0x000000000000dc45 0xd89 ./my_software/my_code.o
.debug_line 0x000000000000e9ce 0x7f1 ./my_software/r480r.o
.debug_line 0x000000000000dc45 0xe16 ./my_software/my_code.o
.debug_line 0x000000000000ea5b 0x7f1 ./my_software/r480r.o
.debug_str 0x0000000000000000 0x5f5cc
.debug_str 0x0000000000000000 0x5f5f6
.debug_str 0x0000000000000000 0x5c9bc ./Core/Src/main.o
0x5cd69 (size before relaxing)
.debug_str 0x000000000005c9bc 0x84 ./Core/Src/stm32f0xx_hal_msp.o
@@ -4288,9 +4288,9 @@ LOAD /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.id
0x5c4ba (size before relaxing)
.debug_str 0x000000000005f0e7 0x256 ./my_software/iic.o
0x5c2f3 (size before relaxing)
.debug_str 0x000000000005f33d 0x1d8 ./my_software/my_code.o
0x5ca75 (size before relaxing)
.debug_str 0x000000000005f515 0xb7 ./my_software/r480r.o
.debug_str 0x000000000005f33d 0x202 ./my_software/my_code.o
0x5ca9f (size before relaxing)
.debug_str 0x000000000005f53f 0xb7 ./my_software/r480r.o
0x5c64b (size before relaxing)
.comment 0x0000000000000000 0x53
+1 -1
View File
@@ -3,4 +3,4 @@ my_code.c:77:6:hc2_sever 16 static
my_code.c:104:6:moto_server 8 static
my_code.c:210:6:HT1621_Display_GetButton 24 static
my_code.c:255:6:check_need_reset 16 static
my_code.c:288:6:my_code 40 static
my_code.c:288:6:my_code 48 static
+2
View File
@@ -1,4 +1,6 @@
#MicroXplorer Configuration settings - do not modify
ADC.ContinuousConvMode=ENABLE
ADC.IPParameters=ContinuousConvMode
File.Version=6
GPIO.groupedBy=Group By Peripherals
KeepUserPlacement=false
+37 -5
View File
@@ -295,19 +295,21 @@ void my_code()
long countdown=1000;
long countdown_set=15000;
char moto_in1,moto_in2;
uint16_t moto_in1_pp=0,moto_in2_pp=0;
HT1621_Init();
r480_init();
config.begin=0;
AT24CXX_Read(16,(char *)&config,sizeof(config_setting));
AT24CXX_Read(32,(char *)&config,sizeof(config_setting));
if(config.begin!=0xab||check_need_reset())
{
mode=0;
r480.key=0;
}
mode=6;
while(1)
{
@@ -359,7 +361,7 @@ void my_code()
r480.add[0]=0;
r480.add[1]=0;
mode=1;
AT24CXX_Write(16,(char *)&config,sizeof(config_setting));
AT24CXX_Write(32,(char *)&config,sizeof(config_setting));
}
break;
@@ -450,7 +452,7 @@ void my_code()
moto.moto2a=0;
moto.moto2b=10;
}
if(key4.code!=0)
if(key4.code!=0||(moto_in1==1&&READ_MOT_IN1==0))
{
mode=1;
}
@@ -505,7 +507,7 @@ void my_code()
moto.moto2a=10;
moto.moto2b=0;
}
if(key4.code!=0)
if(key4.code!=0||(moto_in2==1&&READ_MOT_IN2==0))
{
mode=1;
}
@@ -564,6 +566,17 @@ void my_code()
dis_buff.d_num[1]=dis_buff.d_num[1]==0?16:dis_buff.d_num[1];
break;
case 6:
moto.moto1a=10;
moto.moto1b=0;
moto.moto2a=10;
moto.moto2b=0;
dis_buff.d_num[3]=(ADCC.adc_value[1])%10;
dis_buff.d_num[2]=(ADCC.adc_value[1]/10)%10;
dis_buff.d_num[1]=((ADCC.adc_value[1]/100)%10);
dis_buff.d_num[0]=((ADCC.adc_value[1]/1000)%10);
break;
// case 5:
// //overload
@@ -658,6 +671,25 @@ void my_code()
dis_buff.button_flag[2]=0;
dis_buff.button_flag[3]=0;
if(moto_in1!=READ_MOT_IN1)
{
moto_in1_pp++;
if(moto_in1_pp==100)
{
moto_in1_pp=0;
moto_in1=READ_MOT_IN1;
}
}
if(moto_in2!=READ_MOT_IN2)
{
moto_in2_pp++;
if(moto_in2_pp==100)
{
moto_in2_pp=0;
moto_in2=READ_MOT_IN2;
}
}
HT1621_Display_GetButton();
hc2_sever();
+2 -1
View File
@@ -27,8 +27,9 @@ void my_code();
typedef struct
{
char begin;
char key_code[2];
char begin;
int time;
}config_setting;