出现了一个奇怪的bug,又自己好了

This commit is contained in:
2021-09-18 11:48:27 +08:00
parent 3a77ca9988
commit 061acbf55d
8 changed files with 3983 additions and 7367 deletions
+2 -2
View File
@@ -1,3 +1,3 @@
8DF89ED150041C4CBC7CB9A9CAA90856=4CEDEAF73CDABB08FD3583A2D7D4A47A
DC22A860405A8BF2F2C095E5B6529F12=4CEDEAF73CDABB08FD3583A2D7D4A47A
8DF89ED150041C4CBC7CB9A9CAA90856=20C2D6F91D80C6D694FB7168229B3696
DC22A860405A8BF2F2C095E5B6529F12=20C2D6F91D80C6D694FB7168229B3696
eclipse.preferences.version=1
Binary file not shown.
+3576 -6407
View File
File diff suppressed because it is too large Load Diff
+377 -949
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -95,7 +95,7 @@ ProjectManager.DeviceId=STM32F030F4Px
ProjectManager.FirmwarePackage=STM32Cube FW_F0 V1.11.3
ProjectManager.FreePins=false
ProjectManager.HalAssertFull=false
ProjectManager.HeapSize=0x200
ProjectManager.HeapSize=0x400
ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=1
@@ -110,7 +110,7 @@ ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=STM32CubeIDE
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=true
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_ADC_Init-ADC-false-HAL-true
RCC.AHBFreq_Value=48000000
RCC.APB1Freq_Value=48000000
RCC.APB1TimFreq_Value=48000000
+1
View File
@@ -75,5 +75,6 @@
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;"/>
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
</launchConfiguration>
+24 -6
View File
@@ -80,7 +80,7 @@ void display()
h_buff=0,l_buff=0;
h_buff=~0x01;
l_buff=d_num_data[0][dis_buff.d_num[0]];
l_buff=dis_buff.d_num[0]>=10?0:d_num_data[0][dis_buff.d_num[0]];
if(dis_buff.dot1==1)
{
l_buff|=0x80;
@@ -89,7 +89,7 @@ void display()
h_buff=0,l_buff=0;
h_buff=~0x80;
l_buff=d_num_data[1][dis_buff.d_num[1]];
l_buff=dis_buff.d_num[0]>=10?0:d_num_data[1][dis_buff.d_num[1]];
if(dis_buff.dot2==1)
{
l_buff|=0x10;
@@ -98,7 +98,7 @@ void display()
h_buff=0,l_buff=0;
h_buff=~0x40;
l_buff=d_num_data[0][dis_buff.d_num[2]];
l_buff=dis_buff.d_num[0]>=10?0:d_num_data[0][dis_buff.d_num[2]];
if(dis_buff.dot3==1)
{
l_buff|=0x80;
@@ -107,7 +107,7 @@ void display()
h_buff=0,l_buff=0;
h_buff=0xC1;
l_buff=d_num_data[1][dis_buff.d_num[3]];
l_buff=dis_buff.d_num[0]>=10?0:d_num_data[1][dis_buff.d_num[3]];
if(dis_buff.dot4==1)
{
l_buff|=0x10;
@@ -134,6 +134,7 @@ void display()
void mymain()
{
uint32_t runtime=0;
uint8_t mode=0;
MOTA(0);
MOTB(0);
@@ -141,14 +142,23 @@ void mymain()
HC595_RCK(0);
HC595_SCK(0);
dis_buff.d_num[0]=0xff;
dis_buff.d_num[1]=0xff;
dis_buff.d_num[2]=0xff;
dis_buff.d_num[3]=0xff;
while(1)
{
switch(mode)
{
case 0:
break;
}
if(HAL_GetTick()>runtime)
{
runtime+=1000;
/*
dis_buff.d_num[0]=rand()%10;
dis_buff.d_num[1]=rand()%10;
dis_buff.d_num[2]=rand()%10;
@@ -161,6 +171,14 @@ void mymain()
dis_buff.led_n=rand()%2;
dis_buff.led_p=rand()%2;
dis_buff.led_run=rand()%2;
*/
if(dis_buff.led_run==1)
{
dis_buff.led_run=0;
}else
{
dis_buff.led_run=1;
}
}
GEI_BUTTON_CODE(&key1,KEY1);
+1 -1
View File
@@ -39,7 +39,7 @@ ENTRY(Reset_Handler)
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
_Min_Heap_Size = 0x200 ; /* required amount of heap */
_Min_Heap_Size = 0x400 ; /* required amount of heap */
_Min_Stack_Size = 0x400 ; /* required amount of stack */
/* Memories definition */