Signed-off-by: kevin <kevin@lmve.net>

This commit is contained in:
2022-04-20 17:36:23 +08:00
parent 9c0cf8f89b
commit 9669b4d0da
57 changed files with 4378 additions and 2680 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ static uint32_t play_delay;
if(notes == NULL) if(notes == NULL)
{ {
//play_ones(0,0); play_ones(0,0);
}else }else
{ {
if(busy_flag==0) if(busy_flag==0)
+2 -2
View File
@@ -176,11 +176,11 @@ void mymain()
HAL_TIM_PWM_Start(&htim2,TIM_CHANNEL_3);//启动n通道的pwm HAL_TIM_PWM_Start(&htim2,TIM_CHANNEL_3);//启动n通道的pwm
MUTE(0); MUTE(0);
add_a_note(1000,50,1000); //add_a_note(1000,50,1000);
while(1) while(1)
{ {
char get_char_temp; OLED_Str(0,0,16,"hello",1);
fps_++; fps_++;
+25 -12
View File
@@ -120,27 +120,25 @@ char OLED_buff[Y_WIDTH_][X_WIDTH];
/* /*
加速缓存 加速缓存
*/ */
char OLED_speedup[128]; char OLED_speedup[Y_WIDTH_][X_WIDTH];
/* /*
将显存发送到硬件 将显存发送到硬件
*/ */
void OLED_Cache_to_hardware() void OLED_Cache_to_hardware()
{ {
char a,b=0; char b=0;
for(uint8_t y=0;y<Y_WIDTH_;y++) for(uint8_t y=0;y<Y_WIDTH_;y++)
{ {
OLED_Set_Pos(0,y); OLED_Set_Pos(0,y);
a=0x80>>y;
for(uint8_t x=0;x<X_WIDTH;x++) for(uint8_t x=0;x<X_WIDTH;x++)
{ {
if(a&OLED_speedup[x]) if(OLED_buff[y][x]!=OLED_speedup[y][x])
{ {
if(b==0){b=1;OLED_Set_Pos(x,y);} if(b==0){b=1;OLED_Set_Pos(x,y);}
OLED_WrDat(OLED_buff[y][x]); OLED_WrDat(OLED_buff[y][x]);
OLED_speedup[y][x]=OLED_buff[y][x];
OLED_speedup[x]&=~a; OLED_buff[y][x]=0x00;
//OLED_buff[y][x]=0xff;
}else }else
{b=0;} {b=0;}
@@ -860,12 +858,11 @@ void OLED_set_dot(unsigned char x,unsigned char y,unsigned char dot_type)
case 3:break; case 3:break;
} }
if(temp!=OLED_buff[y1][x])
{
OLED_buff[y1][x]=temp;
OLED_speedup[x]|=0x80>>y1; OLED_buff[y1][x]=temp;
}
} }
/* /*
@@ -1015,6 +1012,22 @@ void OLED_Str(unsigned char x,unsigned char y,unsigned char size,char *str,unsig
} }
/*
几何绘图
*/
/*画横线*/
void OLED_HL(unsigned char x,unsigned char y,unsigned char size,unsigned char dot_type)
{
}
/*画竖线*/
void OLED_VL(unsigned char x,unsigned char y,unsigned char size,unsigned char dot_type)
{
}
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -21,30 +21,20 @@ Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.9.0
Dialog DLL: TCM.DLL V1.53.0.0 Dialog DLL: TCM.DLL V1.53.0.0
<h2>Project:</h2> <h2>Project:</h2>
C:\Users\wuwen\Desktop\morse_code_trainer\f103c8t6_keil\MDK-ARM\f103c8t6_KEIL.uvprojx C:\Users\kevin\Desktop\morse_code_trainer\f103c8t6_keil\MDK-ARM\f103c8t6_KEIL.uvprojx
Project File Date: 04/17/2022 Project File Date: 04/19/2022
<h2>Output:</h2> <h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' *** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'f103c8t6_KEIL' Build target 'f103c8t6_KEIL'
compiling mymain.c... compiling oled.c...
MYDEIVERS\oled.h(22): warning: #1295-D: Deprecated declaration OLED_Cache_to_hardware - give arg types MYDEIVERS\oled.h(22): warning: #1295-D: Deprecated declaration OLED_Cache_to_hardware - give arg types
void OLED_Cache_to_hardware(); void OLED_Cache_to_hardware();
MYDEIVERS\buzzer.h(16): warning: #1295-D: Deprecated declaration buzzer_play_server - give arg types MYDEIVERS\oled.c: 1 warning, 0 errors
char buzzer_play_server();
MYDEIVERS\mymain.h(22): warning: #1295-D: Deprecated declaration mymain - give arg types
void mymain();
MYDEIVERS\mymain.c(178): warning: #188-D: enumerated type mixed with another type
MUTE(0);
MYDEIVERS\mymain.c(187): warning: #223-D: function "sprintf" declared implicitly
sprintf(str,"FPS:%d",fps);
MYDEIVERS\mymain.c(183): warning: #177-D: variable "get_char_temp" was declared but never referenced
char get_char_temp;
MYDEIVERS\mymain.c: 6 warnings, 0 errors
linking... linking...
Program Size: Code=9676 RO-data=3712 RW-data=28 ZI-data=2940 Program Size: Code=9144 RO-data=3712 RW-data=28 ZI-data=3836
FromELF: creating hex file... FromELF: creating hex file...
"f103c8t6_KEIL\f103c8t6_KEIL.axf" - 0 Error(s), 6 Warning(s). "f103c8t6_KEIL\f103c8t6_KEIL.axf" - 0 Error(s), 1 Warning(s).
<h2>Software Packages used:</h2> <h2>Software Packages used:</h2>
@@ -61,14 +51,14 @@ Package Vendor: Keil
<h2>Collection of Component include folders:</h2> <h2>Collection of Component include folders:</h2>
.\RTE\_f103c8t6_KEIL .\RTE\_f103c8t6_KEIL
C:\Users\wuwen\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include C:\Users\kevin\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
C:\Users\wuwen\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include C:\Users\kevin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include
<h2>Collection of Component Files used:</h2> <h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.5.0 * Component: ARM::CMSIS:CORE:5.5.0
Include file: CMSIS\Core\Include\tz_context.h Include file: CMSIS\Core\Include\tz_context.h
Build Time Elapsed: 00:00:00 Build Time Elapsed: 00:00:03
</pre> </pre>
</body> </body>
</html> </html>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -475,8 +475,8 @@ ARM Macro Assembler Page 8
00000000 00000000
Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw
ork --depend=f103c8t6_keil\startup_stm32f103xb.d -of103c8t6_keil\startup_stm32f ork --depend=f103c8t6_keil\startup_stm32f103xb.d -of103c8t6_keil\startup_stm32f
103xb.o -I.\RTE\_f103c8t6_KEIL -IC:\Users\wuwen\AppData\Local\Arm\Packs\ARM\CMS 103xb.o -I.\RTE\_f103c8t6_KEIL -IC:\Users\kevin\AppData\Local\Arm\Packs\ARM\CMS
IS\5.8.0\CMSIS\Core\Include -IC:\Users\wuwen\AppData\Local\Arm\Packs\Keil\STM32 IS\5.8.0\CMSIS\Core\Include -IC:\Users\kevin\AppData\Local\Arm\Packs\Keil\STM32
F1xx_DFP\2.4.0\Device\Include --predefine="__EVAL SETA 1" --predefine="__UVISIO F1xx_DFP\2.4.0\Device\Include --predefine="__EVAL SETA 1" --predefine="__UVISIO
N_VERSION SETA 536" --predefine="_RTE_ SETA 1" --predefine="STM32F10X_MD SETA 1 N_VERSION SETA 536" --predefine="_RTE_ SETA 1" --predefine="STM32F10X_MD SETA 1
" --predefine="_RTE_ SETA 1" --list=startup_stm32f103xb.lst startup_stm32f103xb " --predefine="_RTE_ SETA 1" --list=startup_stm32f103xb.lst startup_stm32f103xb