Przeglądaj źródła

修改光敏电阻上拉为1M,调整阈值。

Deyauo 2 miesięcy temu
rodzic
commit
61a7cabea0

+ 3 - 3
Debug/Exe/tail_light_stm8.hex

@@ -45,8 +45,8 @@
 :1082C000AE002FCD86E5A604CD86FDAE002FCD866F
 :1082D000CAAE002FCD8AD7AE002FCD8ACBA603CD54
 :1082E00086FDBE02CF002DAE040072B0002DCF007F
-:1082F0002BCE002BA300502406350100142010CEF5
-:10830000002BA300652508725F001435010015CC11
+:1082F0002BCE002BA300642406350100142010CEE1
+:10830000002BA302BD2508725F001435010015CCB7
 :1083100081C09093B701931C0004B60143F4931CF1
 :108320000004F7B600A480A1002723B600A410A182
 :1083300000270890F6BA0190F72007B6014390F4A1
@@ -158,7 +158,7 @@
 :1089D0000897581C000AFECD8A79CC81C489FE9084
 :1089E00093855C5C905D271C89FEBF00855C5C897B
 :1089F000FEBF02855C5C515A92D60092D7025A2A79
-:108A0000F75120D981000F006400FA010101010033
+:108A0000F75120D981000F005000C8010101010079
 :108A10000000000000000000000000000000000056
 :108A2000000000000000000000000000B701909E60
 :108A3000C75262909FC752639EC752609FC75261E0

BIN
Debug/Exe/tail_light_stm8.out


+ 2 - 2
Debug/List/tail_light_stm8.map

@@ -1,6 +1,6 @@
 ###############################################################################
 #
-# IAR ELF Linker V3.10.1.201 for STM8                     07/Jun/2025  19:54:12
+# IAR ELF Linker V3.10.1.201 for STM8                     09/Jun/2025  20:51:19
 # Copyright 2010-2017 IAR Systems AB.
 #
 #    Output file  =  
@@ -8,7 +8,7 @@
 #    Map file     =  
 #        C:\Users\hero\Desktop\USB_AutoLight\Debug\List\tail_light_stm8.map
 #    Command line =  
-#        -f C:\Users\hero\AppData\Local\Temp\EW2C1F.tmp
+#        -f C:\Users\hero\AppData\Local\Temp\EW3AC5.tmp
 #        (C:\Users\hero\Desktop\USB_AutoLight\Debug\Obj\delay.o
 #        C:\Users\hero\Desktop\USB_AutoLight\Debug\Obj\hw_init.o
 #        C:\Users\hero\Desktop\USB_AutoLight\Debug\Obj\key.o

Plik diff jest za duży
+ 1 - 1
settings/tail_light_stm8.dbgdt


+ 5 - 5
settings/tail_light_stm8.dnx

@@ -49,7 +49,7 @@
         <MultiCoreRunAll>1</MultiCoreRunAll>
     </Simulator>
     <DebugChecksum>
-        <Checksum>1150133013</Checksum>
+        <Checksum>3980947613</Checksum>
     </DebugChecksum>
     <RecentFlashDownload>
         <Path>C:\Users\hero\Desktop\Taillight_Code\stm8_prj\Code\Debug\Exe\tail_light_stm8.out</Path>
@@ -69,15 +69,15 @@
         <GraphEnabled>0</GraphEnabled>
         <ShowTimeLog>1</ShowTimeLog>
     </DataSample>
+    <TermIOLog>
+        <LoggingEnabled>_ 0</LoggingEnabled>
+        <LogFile>_ ""</LogFile>
+    </TermIOLog>
     <LogFile>
         <LoggingEnabled>_ 0</LoggingEnabled>
         <LogFile>_ ""</LogFile>
         <Category>_ 0</Category>
     </LogFile>
-    <TermIOLog>
-        <LoggingEnabled>_ 0</LoggingEnabled>
-        <LogFile>_ ""</LogFile>
-    </TermIOLog>
     <Breakpoints>
         <Count>0</Count>
     </Breakpoints>

Plik diff jest za duży
+ 1 - 1
settings/tail_light_stm8.wsdt


+ 238 - 238
tail_light_stm8.dep

@@ -5,432 +5,424 @@
     <configuration>
         <name>Debug</name>
         <outputs>
-            <file>$PROJ_DIR$\lib\src\stm8s_exti.c</file>
-            <file>$PROJ_DIR$\usr\src\led.c</file>
-            <file>$PROJ_DIR$\lib\src\stm8s_tim4.c</file>
-            <file>$PROJ_DIR$\usr\src\i2c_analog.c</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_tim2.o</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_adc1.h</file>
-            <file>$PROJ_DIR$\usr\src\hw_init.c</file>
-            <file>$PROJ_DIR$\lib\src\stm8s_adc1.c</file>
-            <file>$PROJ_DIR$\lib\src\stm8s_rst.c</file>
-            <file>$PROJ_DIR$\lib\src\stm8s_tim1.c</file>
-            <file>$PROJ_DIR$\lib\src\stm8s_gpio.c</file>
-            <file>$PROJ_DIR$\usr\src\delay.c</file>
-            <file>$PROJ_DIR$\lib\src\stm8s_clk.c</file>
-            <file>$PROJ_DIR$\usr\src\main.c</file>
-            <file>$PROJ_DIR$\usr\src\stm8s_it.c</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_clk.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\sc7a20.o</file>
-            <file>$PROJ_DIR$\lib\src\stm8s_tim2.c</file>
-            <file>$PROJ_DIR$\usr\src\key.c</file>
-            <file>$PROJ_DIR$\usr\src\tasks.c</file>
-            <file>$PROJ_DIR$\usr\inc\i2c_analog.h</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_spi.h</file>
-            <file>$PROJ_DIR$\usr\src\sc7a20.c</file>
-            <file>$PROJ_DIR$\Debug\Obj\i2c_analog.o</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_beep.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\key.pbi</file>
-            <file>$PROJ_DIR$\usr\inc\key.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_it.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\tasks.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\hw_init.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_rst.pbi</file>
-            <file>$PROJ_DIR$\Debug\Obj\sc7a20.pbi</file>
-            <file>$PROJ_DIR$\usr\inc\sc7a20.h</file>
-            <file>$PROJ_DIR$\Debug\Exe\tail_light_stm8.hex</file>
-            <file>$PROJ_DIR$\Debug\Obj\hw_init.pbi</file>
-            <file>$PROJ_DIR$\Debug\Obj\main.o</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_gpio.h</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_tim1.h</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_itc.h</file>
-            <file>$TOOLKIT_DIR$\lib\dbgstm8smd.a</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_exti.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_clk.__cstat.et</file>
-            <file>$PROJ_DIR$\usr\inc\tasks.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_rst.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\led.__cstat.et</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_awu.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\i2c_analog.pbi</file>
-            <file>$PROJ_DIR$\Debug\Obj\led.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_adc1.__cstat.et</file>
-            <file>$PROJ_DIR$\usr\inc\stm8s_conf.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\hw_init.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\key.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_rst.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\tail_light_stm8.pbd</file>
-            <file>$PROJ_DIR$\Debug\Obj\delay.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_adc1.pbi</file>
+            <file>$PROJ_DIR$\Debug\Obj\sc7a20.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\led.pbi</file>
+            <file>$PROJ_DIR$\usr\inc\stm8s_it.h</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_uart1.h</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_flash.h</file>
+            <file>$PROJ_DIR$\usr\inc\delay.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_adc1.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_exti.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\i2c_analog.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\delay.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_tim1.__cstat.et</file>
+            <file>$TOOLKIT_DIR$\inc\c\intrinsics.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_clk.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_tim1.pbi</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_clk.pbi</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_rst.__cstat.et</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_tim4.h</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_i2c.h</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_wwdg.h</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_iwdg.h</file>
+            <file>$PROJ_DIR$\usr\inc\hw_init.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_gpio.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_exti.pbi</file>
+            <file>$PROJ_DIR$\Debug\Exe\tail_light_stm8.out</file>
+            <file>$PROJ_DIR$\Debug\Obj\delay.pbi</file>
             <file>$PROJ_DIR$\Debug\Obj\stm8s_tim4.pbi</file>
             <file>$PROJ_DIR$\Debug\Obj\stm8s_tim4.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\tail_light_stm8.pbd</file>
             <file>$PROJ_DIR$\Debug\Obj\stm8s_gpio.o</file>
-            <file>$PROJ_DIR$\usr\inc\led.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_it.pbi</file>
             <file>$PROJ_DIR$\Debug\Obj\tasks.pbi</file>
             <file>$PROJ_DIR$\Debug\Obj\tasks.__cstat.et</file>
-            <file>$PROJ_DIR$\usr\inc\system_settings.h</file>
             <file>$PROJ_DIR$\lib\inc\stm8s.h</file>
             <file>$PROJ_DIR$\Debug\Obj\main.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
+            <file>$PROJ_DIR$\usr\inc\system_settings.h</file>
             <file>$PROJ_DIR$\Debug\Obj\stm8s_tim2.pbi</file>
+            <file>$PROJ_DIR$\Debug\Obj\delay.__cstat.et</file>
+            <file>$PROJ_DIR$\usr\inc\led.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_it.pbi</file>
             <file>$PROJ_DIR$\Debug\Obj\stm8s_tim2.__cstat.et</file>
             <file>$PROJ_DIR$\Debug\Obj\stm8s_tim1.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\hw_init.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\key.o</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_rst.h</file>
             <file>$PROJ_DIR$\Debug\List\tail_light_stm8.map</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_tim4.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_it.__cstat.et</file>
-            <file>$TOOLKIT_DIR$\config\lnkstm8s003f3.icf</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_gpio.pbi</file>
             <file>$PROJ_DIR$\lib\inc\stm8s_exti.h</file>
             <file>$PROJ_DIR$\lib\inc\stm8s_tim2.h</file>
             <file>$PROJ_DIR$\Debug\Obj\key.__cstat.et</file>
             <file>$TOOLKIT_DIR$\lib\dlstm8smn.a</file>
-            <file>$PROJ_DIR$\Debug\Obj\i2c_analog.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\delay.o</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_tim1.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_clk.o</file>
-            <file>$TOOLKIT_DIR$\inc\c\intrinsics.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_tim1.pbi</file>
-            <file>$PROJ_DIR$\Debug\Obj\led.pbi</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_exti.__cstat.et</file>
-            <file>$PROJ_DIR$\usr\inc\stm8s_it.h</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_uart1.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_adc1.o</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_flash.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_adc1.pbi</file>
-            <file>$PROJ_DIR$\Debug\Obj\sc7a20.__cstat.et</file>
-            <file>$PROJ_DIR$\usr\inc\delay.h</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_tim4.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_clk.pbi</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_rst.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\delay.pbi</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_i2c.h</file>
-            <file>$PROJ_DIR$\usr\inc\hw_init.h</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_wwdg.h</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_gpio.__cstat.et</file>
-            <file>$PROJ_DIR$\Debug\Obj\stm8s_exti.pbi</file>
-            <file>$PROJ_DIR$\lib\inc\stm8s_iwdg.h</file>
-            <file>$PROJ_DIR$\Debug\Exe\tail_light_stm8.out</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_gpio.pbi</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_tim4.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_it.__cstat.et</file>
+            <file>$TOOLKIT_DIR$\config\lnkstm8s003f3.icf</file>
+            <file>$PROJ_DIR$\Debug\Obj\tasks.o</file>
+            <file>$PROJ_DIR$\usr\inc\sc7a20.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\hw_init.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\hw_init.pbi</file>
+            <file>$PROJ_DIR$\Debug\Obj\main.o</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_gpio.h</file>
+            <file>$TOOLKIT_DIR$\lib\dbgstm8smd.a</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_clk.__cstat.et</file>
+            <file>$PROJ_DIR$\usr\inc\tasks.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_rst.o</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_awu.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\led.__cstat.et</file>
+            <file>$PROJ_DIR$\Debug\Obj\i2c_analog.pbi</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_itc.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\led.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_adc1.__cstat.et</file>
+            <file>$PROJ_DIR$\usr\inc\key.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_rst.pbi</file>
+            <file>$PROJ_DIR$\Debug\Exe\tail_light_stm8.hex</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_tim1.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\sc7a20.pbi</file>
+            <file>$PROJ_DIR$\usr\inc\stm8s_conf.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_exti.o</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_it.o</file>
+            <file>$PROJ_DIR$\lib\src\stm8s_clk.c</file>
+            <file>$PROJ_DIR$\lib\src\stm8s_gpio.c</file>
+            <file>$PROJ_DIR$\usr\src\main.c</file>
+            <file>$PROJ_DIR$\usr\inc\i2c_analog.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\i2c_analog.o</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_beep.h</file>
+            <file>$PROJ_DIR$\Debug\Obj\key.pbi</file>
+            <file>$PROJ_DIR$\lib\src\stm8s_tim1.c</file>
+            <file>$PROJ_DIR$\usr\src\key.c</file>
+            <file>$PROJ_DIR$\lib\src\stm8s_exti.c</file>
+            <file>$PROJ_DIR$\usr\src\delay.c</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_adc1.h</file>
+            <file>$PROJ_DIR$\usr\src\tasks.c</file>
+            <file>$PROJ_DIR$\usr\src\led.c</file>
+            <file>$PROJ_DIR$\Debug\Obj\stm8s_tim2.o</file>
+            <file>$PROJ_DIR$\lib\src\stm8s_adc1.c</file>
+            <file>$PROJ_DIR$\lib\src\stm8s_rst.c</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_spi.h</file>
+            <file>$PROJ_DIR$\usr\src\stm8s_it.c</file>
+            <file>$PROJ_DIR$\lib\src\stm8s_tim4.c</file>
+            <file>$PROJ_DIR$\lib\inc\stm8s_clk.h</file>
+            <file>$PROJ_DIR$\usr\src\hw_init.c</file>
+            <file>$PROJ_DIR$\Debug\Obj\sc7a20.o</file>
+            <file>$PROJ_DIR$\lib\src\stm8s_tim2.c</file>
+            <file>$PROJ_DIR$\usr\src\sc7a20.c</file>
+            <file>$PROJ_DIR$\usr\src\i2c_analog.c</file>
         </outputs>
         <file>
-            <name>$PROJ_DIR$\lib\src\stm8s_exti.c</name>
+            <name>$PROJ_DIR$\Debug\Exe\tail_light_stm8.out</name>
             <outputs>
                 <tool>
-                    <name>ICCSTM8</name>
-                    <file> 40</file>
-                </tool>
-                <tool>
-                    <name>BICOMP</name>
-                    <file> 101</file>
+                    <name>ILINK</name>
+                    <file> 45</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 85</file>
+                    <name>OBJCOPY</name>
+                    <file> 72</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
-                    <name>ICCSTM8</name>
-                    <file> 74 64 49 5 45 24 15 89 36 97 38 102 53 21 37 75 93 87 99 82</file>
-                </tool>
-                <tool>
-                    <name>BICOMP</name>
-                    <file> 37 49 74 5 38 87 64 24 36 53 93 82 45 15 89 97 102 21 75 99</file>
+                    <name>ILINK</name>
+                    <file> 53 10 42 43 68 58 7 13 76 29 63 41 92 27 54 49 60</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\usr\src\led.c</name>
+            <name>$PROJ_DIR$\lib\src\stm8s_clk.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 47</file>
+                    <file> 13</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 84</file>
+                    <name>__cstat</name>
+                    <file> 61</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 44</file>
+                    <name>BICOMP</name>
+                    <file> 15</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 59 64 49 5 45 24 15 74 89 36 97 38 102 53 21 37 75 93 87 99 82</file>
+                    <file> 98 32 75 89 64 83 46 5 59 18 67 20 44 95 73 47 17 4 19 12</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 15 21 97 64 82 45 89 102 75 99 49 5 24 74 36 38 53 37 93 87 59</file>
+                    <file> 18 98 95 32 12 64 5 20 47 19 75 89 83 46 59 67 44 73 17 4</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\lib\src\stm8s_tim4.c</name>
+            <name>$PROJ_DIR$\lib\src\stm8s_gpio.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 57</file>
+                    <file> 29</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 56</file>
+                    <name>__cstat</name>
+                    <file> 22</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 70</file>
+                    <name>BICOMP</name>
+                    <file> 50</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 93 64 49 5 45 24 15 74 89 36 97 38 102 53 21 37 75 87 99 82</file>
+                    <file> 59 32 75 89 64 83 98 46 5 18 67 20 44 95 73 47 17 4 19 12</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 21 15 64 97 82 45 89 102 75 99 49 5 24 74 36 38 53 37 93 87</file>
+                    <file> 32 98 95 18 12 64 5 20 47 19 75 89 83 46 59 67 44 73 17 4</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\usr\src\i2c_analog.c</name>
+            <name>$PROJ_DIR$\usr\src\main.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 23</file>
+                    <file> 58</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 46</file>
+                    <name>__cstat</name>
+                    <file> 33</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 78</file>
+                    <name>BICOMP</name>
+                    <file> 34</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 20 64 49 5 45 24 15 74 89 36 97 38 102 53 21 37 75 93 87 99 82</file>
+                    <file> 32 75 89 64 83 98 46 5 59 18 67 20 44 95 73 47 17 4 19 12 21 70 38 62 6</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 74 49 37 5 38 87 64 24 36 53 93 82 45 15 89 97 102 21 75 99 20</file>
+                    <file> 67 89 4 32 62 75 46 73 70 83 59 44 17 21 38 6 12 64 98 5 18 20 95 47 19</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\usr\src\hw_init.c</name>
+            <name>$PROJ_DIR$\lib\src\stm8s_tim1.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 50</file>
+                    <file> 41</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 34</file>
+                    <name>__cstat</name>
+                    <file> 11</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 29</file>
+                    <name>BICOMP</name>
+                    <file> 14</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 64 49 5 45 24 15 74 89 36 97 38 102 53 21 37 75 93 87 99 82 98</file>
+                    <file> 73 32 75 89 64 83 98 46 5 59 18 67 20 44 95 47 17 4 19 12</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 74 49 37 5 38 87 64 24 36 53 93 98 82 45 15 89 97 102 21 75 99</file>
+                    <file> 32 17 59 83 44 75 89 46 67 73 4 12 64 98 5 18 20 95 47 19</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\lib\src\stm8s_adc1.c</name>
+            <name>$PROJ_DIR$\usr\src\key.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 88</file>
-                </tool>
-                <tool>
-                    <name>BICOMP</name>
-                    <file> 90</file>
+                    <file> 43</file>
                 </tool>
                 <tool>
                     <name>__cstat</name>
                     <file> 48</file>
                 </tool>
+                <tool>
+                    <name>BICOMP</name>
+                    <file> 84</file>
+                </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 5 64 49 45 24 15 74 89 36 97 38 102 53 21 37 75 93 87 99 82</file>
+                    <file> 70 32 75 89 64 83 98 46 5 59 18 67 20 44 95 73 47 17 4 19 12 35</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 74 49 37 5 38 87 64 24 36 53 93 82 45 15 89 97 102 21 75 99</file>
+                    <file> 83 44 32 59 17 75 89 46 67 73 4 35 12 64 98 5 18 20 95 47 19 70</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\lib\src\stm8s_rst.c</name>
+            <name>$PROJ_DIR$\lib\src\stm8s_exti.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 43</file>
+                    <file> 76</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 30</file>
+                    <name>__cstat</name>
+                    <file> 8</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 95</file>
+                    <name>BICOMP</name>
+                    <file> 23</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 53 64 49 5 45 24 15 74 89 36 97 38 102 21 37 75 93 87 99 82</file>
+                    <file> 46 32 75 89 64 83 98 5 59 18 67 20 44 95 73 47 17 4 19 12</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 97 15 21 82 45 89 102 75 99 64 49 5 24 74 36 38 53 37 93 87</file>
+                    <file> 73 75 46 89 67 4 32 83 59 44 17 12 64 98 5 18 20 95 47 19</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\lib\src\stm8s_tim1.c</name>
+            <name>$PROJ_DIR$\usr\src\delay.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 68</file>
+                    <file> 10</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 83</file>
+                    <name>__cstat</name>
+                    <file> 37</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 80</file>
+                    <name>BICOMP</name>
+                    <file> 25</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 37 64 49 5 45 24 15 74 89 36 97 38 102 53 21 75 93 87 99 82</file>
+                    <file> 6 32 75 89 64 83 98 46 5 59 18 67 20 44 95 73 47 17 4 19 12</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 64 93 36 24 53 49 5 74 38 37 87 82 45 15 89 97 102 21 75 99</file>
+                    <file> 18 98 95 12 64 5 20 47 19 32 75 89 83 46 59 67 44 73 17 4 6</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\lib\src\stm8s_gpio.c</name>
+            <name>$PROJ_DIR$\usr\src\tasks.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 58</file>
+                    <file> 54</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 73</file>
+                    <name>__cstat</name>
+                    <file> 31</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 100</file>
+                    <name>BICOMP</name>
+                    <file> 30</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 36 64 49 5 45 24 15 74 89 97 38 102 53 21 37 75 93 87 99 82</file>
+                    <file> 35 32 75 89 64 83 98 46 5 59 18 67 20 44 95 73 47 17 4 19 12 38 70 21 6</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 64 15 21 97 82 45 89 102 75 99 49 5 24 74 36 38 53 37 93 87</file>
+                    <file> 46 32 75 73 6 89 67 4 70 83 59 44 17 38 21 12 64 98 5 18 20 95 47 19 35</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\usr\src\delay.c</name>
+            <name>$PROJ_DIR$\usr\src\led.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 79</file>
+                    <file> 68</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 96</file>
+                    <name>__cstat</name>
+                    <file> 65</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 55</file>
+                    <name>BICOMP</name>
+                    <file> 2</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 92 64 49 5 45 24 15 74 89 36 97 38 102 53 21 37 75 93 87 99 82</file>
+                    <file> 38 32 75 89 64 83 98 46 5 59 18 67 20 44 95 73 47 17 4 19 12</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 97 15 21 82 45 89 102 75 99 64 49 5 24 74 36 38 53 37 93 87 92</file>
+                    <file> 98 95 18 32 12 64 5 20 47 19 75 89 83 46 59 67 44 73 17 4 38</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\lib\src\stm8s_clk.c</name>
+            <name>$PROJ_DIR$\lib\src\stm8s_adc1.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 81</file>
+                    <file> 7</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 94</file>
+                    <name>__cstat</name>
+                    <file> 69</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 41</file>
+                    <name>BICOMP</name>
+                    <file> 0</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 15 64 49 5 45 24 74 89 36 97 38 102 53 21 37 75 93 87 99 82</file>
+                    <file> 89 32 75 64 83 98 46 5 59 18 67 20 44 95 73 47 17 4 19 12</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 97 15 21 64 82 45 89 102 75 99 49 5 24 74 36 38 53 37 93 87</file>
+                    <file> 46 75 73 89 67 4 32 83 59 44 17 12 64 98 5 18 20 95 47 19</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\usr\src\main.c</name>
+            <name>$PROJ_DIR$\lib\src\stm8s_rst.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 35</file>
+                    <file> 63</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 52</file>
+                    <name>__cstat</name>
+                    <file> 16</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 65</file>
+                    <name>BICOMP</name>
+                    <file> 71</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 64 49 5 45 24 15 74 89 36 97 38 102 53 21 37 75 93 87 99 82 98 26 59 42 92</file>
+                    <file> 44 32 75 89 64 83 98 46 5 59 18 67 20 95 73 47 17 4 19 12</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 38 5 87 64 42 49 74 37 26 24 36 53 93 98 59 92 82 45 15 89 97 102 21 75 99</file>
+                    <file> 18 98 95 12 64 5 20 47 19 32 75 89 83 46 59 67 44 73 17 4</file>
                 </tool>
             </inputs>
         </file>
@@ -439,106 +431,106 @@
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 27</file>
+                    <file> 77</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 60</file>
+                    <name>__cstat</name>
+                    <file> 52</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 71</file>
+                    <name>BICOMP</name>
+                    <file> 39</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 86 64 49 5 45 24 15 74 89 36 97 38 102 53 21 37 75 93 87 99 82</file>
+                    <file> 3 32 75 89 64 83 98 46 5 59 18 67 20 44 95 73 47 17 4 19 12</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 36 64 93 24 53 49 5 74 38 37 87 82 45 15 89 97 102 21 75 99 86</file>
+                    <file> 59 32 17 83 44 75 89 46 67 73 4 12 64 98 5 18 20 95 47 19 3</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\lib\src\stm8s_tim2.c</name>
+            <name>$PROJ_DIR$\lib\src\stm8s_tim4.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 4</file>
+                    <file> 27</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 66</file>
+                    <name>__cstat</name>
+                    <file> 51</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 67</file>
+                    <name>BICOMP</name>
+                    <file> 26</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 75 64 49 5 45 24 15 74 89 36 97 38 102 53 21 37 93 87 99 82</file>
+                    <file> 17 32 75 89 64 83 98 46 5 59 18 67 20 44 95 73 47 4 19 12</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 64 24 53 36 93 49 5 74 38 37 87 75 82 45 15 89 97 102 21 99</file>
+                    <file> 95 98 32 18 12 64 5 20 47 19 75 89 83 46 59 67 44 73 17 4</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\usr\src\key.c</name>
+            <name>$PROJ_DIR$\usr\src\hw_init.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 51</file>
+                    <file> 42</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 25</file>
+                    <name>__cstat</name>
+                    <file> 56</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 76</file>
+                    <name>BICOMP</name>
+                    <file> 57</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 26 64 49 5 45 24 15 74 89 36 97 38 102 53 21 37 75 93 87 99 82 63</file>
+                    <file> 32 75 89 64 83 98 46 5 59 18 67 20 44 95 73 47 17 4 19 12 21</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 24 53 64 36 93 49 5 74 38 37 87 63 82 45 15 89 97 102 21 75 99 26</file>
+                    <file> 46 75 73 89 67 4 32 83 59 44 17 21 12 64 98 5 18 20 95 47 19</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\usr\src\tasks.c</name>
+            <name>$PROJ_DIR$\lib\src\stm8s_tim2.c</name>
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 28</file>
+                    <file> 92</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 61</file>
+                    <name>__cstat</name>
+                    <file> 40</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 62</file>
+                    <name>BICOMP</name>
+                    <file> 36</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 63 64 49 5 45 24 15 74 89 36 97 38 102 53 21 37 75 93 87 99 82 59 26 98 92</file>
+                    <file> 47 32 75 89 64 83 98 46 5 59 18 67 20 44 95 73 17 4 19 12</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 74 64 49 37 92 5 38 87 26 24 36 53 93 59 98 82 45 15 89 97 102 21 75 99 63</file>
+                    <file> 32 83 44 59 17 75 89 46 67 73 4 47 12 64 98 5 18 20 95 19</file>
                 </tool>
             </inputs>
         </file>
@@ -547,44 +539,52 @@
             <outputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 16</file>
+                    <file> 100</file>
                 </tool>
                 <tool>
-                    <name>BICOMP</name>
-                    <file> 31</file>
+                    <name>__cstat</name>
+                    <file> 1</file>
                 </tool>
                 <tool>
-                    <name>__cstat</name>
-                    <file> 91</file>
+                    <name>BICOMP</name>
+                    <file> 74</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
                     <name>ICCSTM8</name>
-                    <file> 32 64 49 5 45 24 15 74 89 36 97 38 102 53 21 37 75 93 87 99 82 20 92</file>
+                    <file> 55 32 75 89 64 83 98 46 5 59 18 67 20 44 95 73 47 17 4 19 12 81 6</file>
                 </tool>
                 <tool>
                     <name>BICOMP</name>
-                    <file> 5 87 38 64 49 74 37 92 24 36 53 93 20 82 45 15 89 97 102 21 75 99 32</file>
+                    <file> 89 4 67 32 75 46 73 6 83 59 44 17 81 12 64 98 5 18 20 95 47 19 55</file>
                 </tool>
             </inputs>
         </file>
         <file>
-            <name>$PROJ_DIR$\Debug\Exe\tail_light_stm8.out</name>
+            <name>$PROJ_DIR$\usr\src\i2c_analog.c</name>
             <outputs>
                 <tool>
-                    <name>ILINK</name>
-                    <file> 69</file>
+                    <name>ICCSTM8</name>
+                    <file> 82</file>
                 </tool>
                 <tool>
-                    <name>OBJCOPY</name>
-                    <file> 33</file>
+                    <name>__cstat</name>
+                    <file> 9</file>
+                </tool>
+                <tool>
+                    <name>BICOMP</name>
+                    <file> 66</file>
                 </tool>
             </outputs>
             <inputs>
                 <tool>
-                    <name>ILINK</name>
-                    <file> 72 79 50 51 47 35 88 81 40 58 43 68 4 57 28 77 39</file>
+                    <name>ICCSTM8</name>
+                    <file> 81 32 75 89 64 83 98 46 5 59 18 67 20 44 95 73 47 17 4 19 12</file>
+                </tool>
+                <tool>
+                    <name>BICOMP</name>
+                    <file> 46 75 73 89 67 4 32 83 59 44 17 12 64 98 5 18 20 95 47 19 81</file>
                 </tool>
             </inputs>
         </file>
@@ -593,7 +593,7 @@
             <outputs>
                 <tool>
                     <name>ILINK</name>
-                    <file> 103 69</file>
+                    <file> 24 45</file>
                 </tool>
             </outputs>
         </file>

+ 1 - 1
usr/src/led.c

@@ -1,6 +1,6 @@
 #include "led.h"
 
-uint16_t BrightlessLevelPulse[3] = {15, 100, 250};
+uint16_t BrightlessLevelPulse[3] = {15, 80, 200};
 uint32_t OnDelayTimeCnt = 0;
 
 /*

+ 3 - 4
usr/src/tasks.c

@@ -168,14 +168,13 @@ void taskC(void)//50ms
   AD_LightFltSum += ((AD_Value << 3) - AD_LightFltSum) >> 4;
   AD_Light = AD_LightFltSum >> 3;
   Light_Level = 1024 - AD_Light;//¹âÇ¿¶ÈµÈ¼¶£¬1-1024      
-  if(Light_Level < 80)
+  if(Light_Level < 100)
   {
     Light_EN = 1;
   }
-  else if(Light_Level > 100)
+  else if(Light_Level > 700)
   {
     Light_EN = 0;
     Delay_EN = 1;
-  }
-  
+  }  
 }

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików