Add 4.37inch e-Paper (G) STM32 program and fix some bugs.

This commit is contained in:
SSYYL 2022-08-16 16:59:55 +08:00
commit 77accf11dd
32 changed files with 4453 additions and 1186 deletions

View file

@ -262,14 +262,21 @@ parameter:
******************************************************************************/
void Paint_Clear(UWORD Color)
{
if(Paint.Scale == 2 || Paint.Scale == 4){
if(Paint.Scale == 2) {
for (UWORD Y = 0; Y < Paint.HeightByte; Y++) {
for (UWORD X = 0; X < Paint.WidthByte; X++ ) {//8 pixel = 1 byte
UDOUBLE Addr = X + Y*Paint.WidthByte;
Paint.Image[Addr] = Color;
}
}
}else if(Paint.Scale == 7){
}else if(Paint.Scale == 4) {
for (UWORD Y = 0; Y < Paint.HeightByte; Y++) {
for (UWORD X = 0; X < Paint.WidthByte; X++ ) {
UDOUBLE Addr = X + Y*Paint.WidthByte;
Paint.Image[Addr] = (Color<<6)|(Color<<4)|(Color<<2)|Color;
}
}
}else if(Paint.Scale == 7) {
for (UWORD Y = 0; Y < Paint.HeightByte; Y++) {
for (UWORD X = 0; X < Paint.WidthByte; X++ ) {
UDOUBLE Addr = X + Y*Paint.WidthByte;

View file

@ -125,11 +125,6 @@ typedef enum {
#define GRAY3 0x01 //gray
#define GRAY4 0x00 //white
//colour
#define Black_4Color 0x00
#define White_4Color 0x01
#define Yellow_4Color 0x02
#define Red_4Color 0x03
/**
* The size of the point
**/