Get rid of the superfluous ';'

This commit is contained in:
SSYYL 2021-07-19 18:39:06 +08:00
commit 99f6a13540
6 changed files with 236 additions and 99 deletions

View file

@ -263,23 +263,23 @@ void Epd::SetLut_by_host(unsigned char* lut_vcom, unsigned char* lut_ww, unsign
unsigned char count;
SendCommand(0x20); //VCOM
for(count=0; count<60; count++)
for(count=0; count<42; count++)
SendData(lut_vcom[count]);
SendCommand(0x21); //LUTBW
for(count=0; count<60; count++)
for(count=0; count<42; count++)
SendData(lut_ww[count]);
SendCommand(0x22); //LUTBW
for(count=0; count<60; count++)
for(count=0; count<42; count++)
SendData(lut_bw[count]);
SendCommand(0x23); //LUTWB
for(count=0; count<60; count++)
for(count=0; count<42; count++)
SendData(lut_wb[count]);
SendCommand(0x24); //LUTBB
for(count=0; count<60; count++)
for(count=0; count<42; count++)
SendData(lut_bb[count]);
}

View file

@ -145,23 +145,23 @@ static void EPD_7IN5_V2_LUT(UBYTE* lut_vcom, UBYTE* lut_ww, UBYTE* lut_bw, UBYT
UBYTE count;
EPD_SendCommand(0x20); //VCOM
for(count=0; count<60; count++)
for(count=0; count<42; count++)
EPD_SendData(lut_vcom[count]);
EPD_SendCommand(0x21); //LUTBW
for(count=0; count<60; count++)
for(count=0; count<42; count++)
EPD_SendData(lut_ww[count]);
EPD_SendCommand(0x22); //LUTBW
for(count=0; count<60; count++)
for(count=0; count<42; count++)
EPD_SendData(lut_bw[count]);
EPD_SendCommand(0x23); //LUTWB
for(count=0; count<60; count++)
for(count=0; count<42; count++)
EPD_SendData(lut_wb[count]);
EPD_SendCommand(0x24); //LUTBB
for(count=0; count<60; count++)
for(count=0; count<42; count++)
EPD_SendData(lut_bb[count]);
}

View file

@ -174,31 +174,31 @@ class EPD:
self.send_data(lut[158])
def SetWindows(self, Xstart, Ystart, Xend, Yend):
self.send_command(0x44); # SET_RAM_X_ADDRESS_START_END_POSITION
self.send_data((Xstart>>3) & 0xFF);
self.send_data((Xend>>3) & 0xFF);
self.send_command(0x44) # SET_RAM_X_ADDRESS_START_END_POSITION
self.send_data((Xstart>>3) & 0xFF)
self.send_data((Xend>>3) & 0xFF)
self.send_command(0x45); # SET_RAM_Y_ADDRESS_START_END_POSITION
self.send_data(Ystart & 0xFF);
self.send_data((Ystart >> 8) & 0xFF);
self.send_data(Yend & 0xFF);
self.send_data((Yend >> 8) & 0xFF);
self.send_command(0x45) # SET_RAM_Y_ADDRESS_START_END_POSITION
self.send_data(Ystart & 0xFF)
self.send_data((Ystart >> 8) & 0xFF)
self.send_data(Yend & 0xFF)
self.send_data((Yend >> 8) & 0xFF)
def SetCursor(self, Xstart, Ystart):
self.send_command(0x4E); # SET_RAM_X_ADDRESS_COUNTER
self.send_data(Xstart & 0xFF);
self.send_command(0x4E) # SET_RAM_X_ADDRESS_COUNTER
self.send_data(Xstart & 0xFF)
self.send_command(0x4F); # SET_RAM_Y_ADDRESS_COUNTER
self.send_data(Ystart & 0xFF);
self.send_data((Ystart >> 8) & 0xFF);
self.send_command(0x4F) # SET_RAM_Y_ADDRESS_COUNTER
self.send_data(Ystart & 0xFF)
self.send_data((Ystart >> 8) & 0xFF)
def init(self, isPartial):
if (epdconfig.module_init() != 0):
return -1
if(isPartial):
logging.debug("full refresh")
logging.debug("partial refresh")
self.reset()
self.ReadBusy()
@ -225,7 +225,7 @@ class EPD:
self.ReadBusy()
else:
logging.debug("partial refresh")
logging.debug("full refresh")
# EPD hardware init start
self.reset()

View file

@ -44,25 +44,47 @@ class EPD:
self.height = EPD_HEIGHT
WF_PARTIAL_2IN9 = [
0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x80,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x40,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0A,0x0,0x0,0x0,0x0,0x0,0x2,
0x1,0x0,0x0,0x0,0x0,0x0,0x0,
0x1,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,