Added a 2.13V3 Arduino GUI library usage routine

This commit is contained in:
SSYYL 2023-02-16 15:35:08 +08:00
commit cb2805f9b7
8 changed files with 113 additions and 38 deletions

View file

@ -40,7 +40,7 @@ int EPD_test(void)
}
printf("e-Paper Init and Clear...\r\n");
EPD_2IN7_V2_Init();
EPD_2IN7_V2_Init();
EPD_2IN7_V2_Clear();
@ -95,8 +95,8 @@ int EPD_test(void)
Paint_DrawNum(10, 33, 123456789, &Font12, BLACK, WHITE);
Paint_DrawNum(10, 50, 987654321, &Font16, WHITE, BLACK);
Paint_DrawString_CN(130, 0,"ÄãºÃabc", &Font12CN, BLACK, WHITE);
Paint_DrawString_CN(130, 20, "΢ѩµç×Ó", &Font24CN, WHITE, BLACK);
Paint_DrawString_CN(130, 0,"<EFBFBD><EFBFBD><EFBFBD>abc", &Font12CN, BLACK, WHITE);
Paint_DrawString_CN(130, 20, "΢ѩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", &Font24CN, WHITE, BLACK);
EPD_2IN7_V2_Display_Fast(BlackImage);
DEV_Delay_ms(3000);
@ -147,8 +147,8 @@ int EPD_test(void)
Paint_DrawNum(10, 33, 123456789, &Font12, BLACK, WHITE);
Paint_DrawNum(10, 50, 987654321, &Font16, WHITE, BLACK);
Paint_DrawString_CN(130, 0,"ÄãºÃabc", &Font12CN, BLACK, WHITE);
Paint_DrawString_CN(130, 20, "΢ѩµç×Ó", &Font24CN, WHITE, BLACK);
Paint_DrawString_CN(130, 0,"<EFBFBD><EFBFBD><EFBFBD>abc", &Font12CN, BLACK, WHITE);
Paint_DrawString_CN(130, 20, "΢ѩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", &Font24CN, WHITE, BLACK);
EPD_2IN7_V2_Display_Base(BlackImage);
DEV_Delay_ms(3000);
@ -233,11 +233,11 @@ int EPD_test(void)
Paint_DrawString_EN(10, 20, "hello world", &Font12, GRAY3, GRAY1);
Paint_DrawNum(10, 33, 123456789, &Font12, GRAY4, GRAY2);
Paint_DrawNum(10, 50, 987654321, &Font16, GRAY1, GRAY4);
Paint_DrawString_CN(150, 0,"ÄãºÃabc", &Font12CN, GRAY4, GRAY1);
Paint_DrawString_CN(150, 20,"ÄãºÃabc", &Font12CN, GRAY3, GRAY2);
Paint_DrawString_CN(150, 40,"ÄãºÃabc", &Font12CN, GRAY2, GRAY3);
Paint_DrawString_CN(150, 60,"ÄãºÃabc", &Font12CN, GRAY1, GRAY4);
Paint_DrawString_CN(10, 130, "΢ѩµç×Ó", &Font24CN, GRAY1, GRAY4);
Paint_DrawString_CN(150, 0,"<EFBFBD><EFBFBD><EFBFBD>abc", &Font12CN, GRAY4, GRAY1);
Paint_DrawString_CN(150, 20,"<EFBFBD><EFBFBD><EFBFBD>abc", &Font12CN, GRAY3, GRAY2);
Paint_DrawString_CN(150, 40,"<EFBFBD><EFBFBD><EFBFBD>abc", &Font12CN, GRAY2, GRAY3);
Paint_DrawString_CN(150, 60,"<EFBFBD><EFBFBD><EFBFBD>abc", &Font12CN, GRAY1, GRAY4);
Paint_DrawString_CN(10, 130, "΢ѩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", &Font24CN, GRAY1, GRAY4);
EPD_2IN7_V2_4GrayDisplay(BlackImage);
DEV_Delay_ms(3000);

View file

@ -94,8 +94,8 @@ int EPD_test(void)
Paint_DrawNum(10, 33, 123456789, &Font12, BLACK, WHITE);
Paint_DrawNum(10, 50, 987654321, &Font16, WHITE, BLACK);
Paint_DrawString_CN(130, 0,"你好abc", &Font12CN, BLACK, WHITE);
Paint_DrawString_CN(130, 20, "微雪电子", &Font24CN, WHITE, BLACK);
Paint_DrawString_CN(130, 0, "ÄãºÃabc", &Font12CN, BLACK, WHITE);
Paint_DrawString_CN(130, 20, "΢ѩµç×Ó", &Font24CN, WHITE, BLACK);
EPD_2IN9_V2_Display_Base(BlackImage);
DEV_Delay_ms(3000);

View file

@ -164,24 +164,24 @@ parameter:
******************************************************************************/
void EPD_2IN7_V2_Init(void)
{
EPD_2IN7_V2_Reset();
EPD_2IN7_V2_ReadBusy();
EPD_2IN7_V2_SendCommand(0x12); //SWRESET
EPD_2IN7_V2_ReadBusy();
EPD_2IN7_V2_Reset();
EPD_2IN7_V2_ReadBusy();
EPD_2IN7_V2_SendCommand(0x45); //set Ram-Y address start/end position
EPD_2IN7_V2_SendData(0x00);
EPD_2IN7_V2_SendData(0x00);
EPD_2IN7_V2_SendData(0x07); //0x0107-->(263+1)=264
EPD_2IN7_V2_SendData(0x01);
EPD_2IN7_V2_SendCommand(0x12); //SWRESET
EPD_2IN7_V2_ReadBusy();
EPD_2IN7_V2_SendCommand(0x4F); // set RAM y address count to 0;
EPD_2IN7_V2_SendData(0x00);
EPD_2IN7_V2_SendData(0x00);
EPD_2IN7_V2_SendCommand(0x45); //set Ram-Y address start/end position
EPD_2IN7_V2_SendData(0x00);
EPD_2IN7_V2_SendData(0x00);
EPD_2IN7_V2_SendData(0x07); //0x0107-->(263+1)=264
EPD_2IN7_V2_SendData(0x01);
EPD_2IN7_V2_SendCommand(0x11); // data entry mode
EPD_2IN7_V2_SendData(0x03);
EPD_2IN7_V2_SendCommand(0x4F); // set RAM y address count to 0;
EPD_2IN7_V2_SendData(0x00);
EPD_2IN7_V2_SendData(0x00);
EPD_2IN7_V2_SendCommand(0x11); // data entry mode
EPD_2IN7_V2_SendData(0x03);
}
void EPD_2IN7_V2_Init_Fast(void)