Skip to content

Commit

Permalink
fix: EPD_3in7_U的数据访问有越界
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed Nov 21, 2024
1 parent 62012cc commit 5894e49
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/epaper/EPD_3in7_U.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void EPD_3in7_U_lut_GC(void)
{
UBYTE count;
EPD_3in7_U_SendCommand(0x20); // vcom
for(count = 0; count < 56 ; count++)
for(count = 0; count < sizeof(EPD_3in7_U_lut_R20_GC) ; count++)
{
EPD_3in7_U_SendData(EPD_3in7_U_lut_R20_GC[count]);
}
Expand All @@ -280,7 +280,7 @@ void EPD_3in7_U_lut_GC(void)
if(EPD_3in7_U_Flag == 0)
{
EPD_3in7_U_SendCommand(0x22); // bw r
for(count = 0; count < 56 ; count++)
for(count = 0; count < sizeof(EPD_3in7_U_lut_R22_GC) ; count++)
{
EPD_3in7_U_SendData(EPD_3in7_U_lut_R22_GC[count]);
}
Expand All @@ -297,7 +297,7 @@ void EPD_3in7_U_lut_GC(void)
else
{
EPD_3in7_U_SendCommand(0x22); // bw r
for(count = 0; count < 56 ; count++)
for(count = 0; count < sizeof(EPD_3in7_U_lut_R23_GC) ; count++)
{
EPD_3in7_U_SendData(EPD_3in7_U_lut_R23_GC[count]);
}
Expand All @@ -317,7 +317,7 @@ void EPD_3in7_U_lut_DU(void)
{
UBYTE count;
EPD_3in7_U_SendCommand(0x20); // vcom
for(count = 0; count < 56 ; count++)
for(count = 0; count < sizeof(EPD_3in7_U_lut_R20_DU) ; count++)
{
EPD_3in7_U_SendData(EPD_3in7_U_lut_R20_DU[count]);
}
Expand All @@ -337,7 +337,7 @@ void EPD_3in7_U_lut_DU(void)
if(EPD_3in7_U_Flag == 0)
{
EPD_3in7_U_SendCommand(0x22); // bw r
for(count = 0; count < 56 ; count++)
for(count = 0; count < sizeof(EPD_3in7_U_lut_R22_DU) ; count++)
{
EPD_3in7_U_SendData(EPD_3in7_U_lut_R22_DU[count]);
}
Expand All @@ -354,7 +354,7 @@ void EPD_3in7_U_lut_DU(void)
else
{
EPD_3in7_U_SendCommand(0x22); // bw r
for(count = 0; count < 56 ; count++)
for(count = 0; count < sizeof(EPD_3in7_U_lut_R23_DU) ; count++)
{
EPD_3in7_U_SendData(EPD_3in7_U_lut_R23_DU[count]);
}
Expand Down

0 comments on commit 5894e49

Please sign in to comment.