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)
{
//play_ones(0,0);
play_ones(0,0);
}else
{
if(busy_flag==0)
+2 -2
View File
@@ -176,11 +176,11 @@ void mymain()
HAL_TIM_PWM_Start(&htim2,TIM_CHANNEL_3);//启动n通道的pwm
MUTE(0);
add_a_note(1000,50,1000);
//add_a_note(1000,50,1000);
while(1)
{
char get_char_temp;
OLED_Str(0,0,16,"hello",1);
fps_++;
+26 -13
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()
{
char a,b=0;
char b=0;
for(uint8_t y=0;y<Y_WIDTH_;y++)
{
OLED_Set_Pos(0,y);
a=0x80>>y;
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);}
OLED_WrDat(OLED_buff[y][x]);
OLED_speedup[x]&=~a;
//OLED_buff[y][x]=0xff;
OLED_WrDat(OLED_buff[y][x]);
OLED_speedup[y][x]=OLED_buff[y][x];
OLED_buff[y][x]=0x00;
}else
{b=0;}
@@ -860,12 +858,11 @@ void OLED_set_dot(unsigned char x,unsigned char y,unsigned char dot_type)
case 3:break;
}
if(temp!=OLED_buff[y1][x])
{
OLED_buff[y1][x]=temp;
OLED_buff[y1][x]=temp;
OLED_speedup[x]|=0x80>>y1;
}
}
/*
@@ -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)
{
}